LinuxDC++ Segmentation Fault

Chat about twofo and other information sharing portals.

Moderator: Operators

Post Reply
Rampage
Posts: 243
Joined: Thu May 18, 2006 2:08 am
Location: London
Contact:

LinuxDC++ Segmentation Fault

Post by Rampage »

Hi,

I'm having some trouble with LinuxDC++ which gives the Segmentation Fault error as soon as I insert a Blank DVD in. It continues to give the error when I try load DC up again untill I remove the DVD. Any Ideas why this happens?

Loading: Hash database
Loading: Shared Files
Loading: Download Queue
Segmentation fault

Thanks

Edit: Also as soon as I have burnt the disk i can start up the application fine. So it seems to be a problem only when a blank CD/DVD is inserted.
xyzzy
Posts: 55
Joined: Fri Oct 21, 2005 5:00 pm
Location: Kent

Post by xyzzy »

Assuming the bug is in linuxdc++, you can investigate further by generating the backtrace with gdb. First, you need to compile linuxdc++ with debugging information:

$ CXXFLAGS="-g" CFLAGS="-g" scons debug=yes

Then run linuxdcpp inside gdb, which goes something like this:

$ gdb ./linuxdcpp
(gdb) start
[Switching to Thread ...
(gdb) cont
Program received signal SIGSEGV, Segmentation fault.
(gdb) bt full
<The backtrace data. Hopefully it will be useful.>
(gdb) quit
The program is running. Exit anyway? (y or n)y
$
Rampage
Posts: 243
Joined: Thu May 18, 2006 2:08 am
Location: London
Contact:

Post by Rampage »

Hi,

Thanks for the guide on that. I ran linuxdcpp in gdb. Here is what I got and I haven't a clue what it means :(.

Thanks for the help :)

Loading: Shared Files
UnBZFilter end, 773172/271824 = 2.8444
[New Thread 0xb6855b90 (LWP 4659)]
Loading: Download Queue
[New Thread 0xb6054b90 (LWP 4660)]
[New Thread 0xb5809b90 (LWP 4661)]
[New Thread 0xb5008b90 (LWP 4662)]
[New Thread 0xb471db90 (LWP 4663)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb471db90 (LWP 4663)]
0x00000000 in ?? ()
(gdb) bt full
#0 0x00000000 in ?? ()
No symbol table info available.
#1 0xb47a4f31 in ?? () from /usr/lib/libgio-2.0.so.0
No symbol table info available.
#2 0x086a5148 in ?? ()
No symbol table info available.
#3 0x00000000 in ?? ()
No symbol table info available.
(gdb) quit
The program is running. Exit anyway? (y or n) y
xyzzy
Posts: 55
Joined: Fri Oct 21, 2005 5:00 pm
Location: Kent

Post by xyzzy »

Yes, it's not a very helpful backtrace. 0x00000000 is a "null pointer", but ?? doesn't help finding where. I can't even be sure if the bug is in linuxdcpp or one of the libraries it uses. Report it on the linuxdcpp berlios.de project site if you haven't already, and someone more knowledgable will try to fix it.

Also, you may be able to work around the problem by disabling whatever system component checks the DVD drive. Maybe killing gnome-volume-manager (but then usb drives won't be auto-mounted, or other problems) or look at the "hal-disable-polling" man page.
Rampage
Posts: 243
Joined: Thu May 18, 2006 2:08 am
Location: London
Contact:

Post by Rampage »

Okay, thanks a lot. I will report it on the website. Also I am running the application under another user to block connections to off campus. I tried to run the application with a blank DVD in as my normal user and it runs fine. Not sure if that has something to do with it, but hope it works out. Thanks for the help.
User avatar
cocodude
Uber Forum Spammer
Posts: 629
Joined: Tue Oct 04, 2005 5:29 pm
Location: London
Contact:

Post by cocodude »

Assuming LinuxDC++ properly dies when it segfaults, you could also try running it with strace and seeing if any of the last few lines are helpful in diagnosing the problem. Just running 'strace linuxdcpp' should help. I'm not sure if you'll still get a load of useless tracing though.
http://www.gigatux.com - Value Linux Virtual/Shared Hosting
Rampage
Posts: 243
Joined: Thu May 18, 2006 2:08 am
Location: London
Contact:

Post by Rampage »

Okay I ran strace and got a lot of output on the terminal but when I try direct it to file I just get 4 lines which are the standard Loading stuff.

here is the output that I was able to copy from the terminal.

http://www.lordoberon.co.uk/strace

Thanks
User avatar
cocodude
Uber Forum Spammer
Posts: 629
Joined: Tue Oct 04, 2005 5:29 pm
Location: London
Contact:

Post by cocodude »

Rampage wrote:Okay I ran strace and got a lot of output on the terminal but when I try direct it to file I just get 4 lines which are the standard Loading stuff.
It was probably outputting on the stderr stream. When you do a normal redirect, it only outputs the stdout stream. You should try command &> output.txt to redirect both streams.
here is the output that I was able to copy from the terminal.

http://www.lordoberon.co.uk/strace
OK, unfortunately it's not that helpful. It tries to read a PNG file, succeeds, but then dies for some other reason. No idea I'm afraid.[/b]
http://www.gigatux.com - Value Linux Virtual/Shared Hosting
Rampage
Posts: 243
Joined: Thu May 18, 2006 2:08 am
Location: London
Contact:

Post by Rampage »

I asked around on the linuxdcpp irc channel and they told me to post a bug on launchpad.

I tried running other applications under user dc (not the user i am logged in as) and they all died with segmentation fault error. It is strange that I can run the applications fine with the user that is logged in. This only happens with an alternate user.

Lets hope this can be fixed. Thanks a lot for the help :)
BigG
Forum Spammer
Posts: 422
Joined: Tue Oct 04, 2005 6:52 pm
Location: Leicester

Post by BigG »

It's not attempting to write to somewhere that does not exist, is it [assuming that you have not set up a home directory for the other user...]
Image
Rampage
Posts: 243
Joined: Thu May 18, 2006 2:08 am
Location: London
Contact:

Post by Rampage »

I have set up a home directory for the other user, so it shouldn't be trying to write to somewhere that doesn't exist. I'm running ubuntu 8.04 and running dc++ in a screen after changing user by "su dc" and then running the application from shell. Not sure if you may be able to duplicate the error, but its happening to all applications not just linuxdcpp.
xyzzy
Posts: 55
Joined: Fri Oct 21, 2005 5:00 pm
Location: Kent

Post by xyzzy »

There's a good guide here: https://wiki.ubuntu.com/DebuggingProgramCrash and https://wiki.ubuntu.com/Backtrace .

I think you need to install libgtk2.0-0-dbg and libglib2.0-0-dbg and try again with gdb.

I couldn't reproduce any crash when running linuxdcpp under a different user on Fedora 8.
Rampage
Posts: 243
Joined: Thu May 18, 2006 2:08 am
Location: London
Contact:

Post by Rampage »

Hi, Thanks for the guides. I compiled linuxdcpp again with debug=1 after installing the two packages you mentioned and the backtrace gave the same output. Still no symbol table. Not sure what the problem is.

Anyone using ubuntu hardy that can try and see if this problem is happening with them.
User avatar
echelon
Uber Forum Spammer
Posts: 895
Joined: Fri Oct 07, 2005 8:22 pm

Post by echelon »

I haven't updated my ubuntu installs so cant really help.. it does seem an odd one really. I would have thought along the lines of BigG, but if u've created a home directory for the users that's probably not the case.

I still use valknut so I dont even have linuxdc installed. maybe it's just me but I think valknut is just fine as a client.
Post Reply