You are not logged in.

#1 2014-08-13 15:41:16

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Ktorrent crashes, how can I create crash dumps?

Since a couple of months Ktorrent has been crashing and I've tried to create crash dumps but so far I've failed.
It will crash randomly, but usually about every 2 hours. It never works for more than about 5h.

When Ktorrent crashes it will bring up KCrash, but a useful crash dump can not be created because it says the file /usr/bin/ktorrent lacks debugging symbols.
I have rebuilt this the ktorrent (and libktorrent) packages to enable said symbols according to what is stated in the wiki.

The difference in my PKGBUILD being:

options=(debug !strip)

and

-DCMAKE_BUILD_TYPE=Debug \

I took a look at my /etc/makepkg.conf but can't find anything wrong.

The end of makepkg during normal build:

...
==> Tidying install...
  -> Purging unwanted files...
  -> Removing libtool files...
  -> Removing static library files...
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
==> Creating package "ktorrent"...
  -> Generating .PKGINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: ktorrent 4.3.1-2 (ons aug 13 11:53:33 CEST 2014)

The end of makepkg while building the debug package, note that 'Stripping unneded symbols...' is not printed:

...
==> Tidying install...
  -> Purging unwanted files...
  -> Removing libtool files...
  -> Removing static library files...
  -> Compressing man and info pages...
==> Creating package "ktorrent"...
  -> Generating .PKGINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: ktorrent 4.3.1-2 (ons aug 13 12:03:14 CEST 2014)

Is KCrash confused?

KCrash 1
KCrash 2
KCrash 3

Last edited by JKAbrams (2014-08-13 15:42:58)

Offline

#2 2014-08-15 22:02:01

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: Ktorrent crashes, how can I create crash dumps?

Trying out the gdb method as described in the wiki:

gdb ktorrent
GNU gdb (GDB) 7.8
...
Reading symbols from ktorrent...done.
(gdb) run
Starting program: /usr/bin/ktorrent 
Got object file from memory but can't read symbols: File truncated.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Warning: Object::connect: No such slot kt::PlainChartDrawer::RenderToImage() in /home/build/ktorrent/ktorrent/src/ktorrent-4.3.1/plugins/stats/drawer/PlainChartDrawer.cc:337
Warning: Object::connect: No such slot kt::PlainChartDrawer::RenderToImage() in /home/build/ktorrent/ktorrent/src/ktorrent-4.3.1/plugins/stats/drawer/PlainChartDrawer.cc:337
Warning: Object::connect: No such slot kt::PlainChartDrawer::RenderToImage() in /home/build/ktorrent/ktorrent/src/ktorrent-4.3.1/plugins/stats/drawer/PlainChartDrawer.cc:337
Warning: Object::connect: No such slot kt::PlainChartDrawer::RenderToImage() in /home/build/ktorrent/ktorrent/src/ktorrent-4.3.1/plugins/stats/drawer/PlainChartDrawer.cc:337
Warning: Object::connect: No such slot kt::PlainChartDrawer::RenderToImage() in /home/build/ktorrent/ktorrent/src/ktorrent-4.3.1/plugins/stats/drawer/PlainChartDrawer.cc:337
[Inferior 1 (process 5912) exited normally]

So the /usr/bin/ktorrent really does not have debug symbols anyway? How should I build it then?

(2h later, here is where ktorrent crashes, the kcrash-dialog opens (does that interfere with the operation of dbg btw?))

(gdb) Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QString)
Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QString)
KCrash: Application 'ktorrent' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/.kde4/socket-ii.csbnet.se/kdeinit4__0
Warning: QSocketNotifier: Invalid socket 20 and type 'Read', disabling...
Warning: QSocketNotifier: Invalid socket 21 and type 'Read', disabling...
Warning: QSocketNotifier: Invalid socket 21 and type 'Write', disabling...
Warning: QSocketNotifier: Invalid socket 20 and type 'Write', disabling...

(gdb) set logging file trace.log
(gdb) set logging on
Copying output to trace.log.
(gdb) apply all bt full
Undefined command: "apply".  Try "help".

Is this command supposed to work? Outdated wiki?
Try this instead as per wiki page:

(gdb) bt full
No stack.

No luck..

(Clicking Developer information in KCrash)

(gdb) Warning: QSocketNotifier: Invalid socket 588 and type 'Read', disabling...

I've got nothing interesting in trace.log.
The trace in KCrash is still only two lines with question marks.

I notice the 'warning: Could not load shared library symbols for linux-vdso.so.1.'
Thinking this might be a package I should rebuild with debugging symbols, if so what package?

locate linux-vdso.so

The file does not exist in my file system...

Is this (me not being able to create a crash dump) a issue with Arch packaging, an upstream bug in kcrash or just me doing something wrong?
Any advice appreciated.

Offline

#3 2014-08-15 22:08:51

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: Ktorrent crashes, how can I create crash dumps?

No, the linux-vdso.so was just a sidetrack (a bug in glibc gives a false warning about a non-existant file).

Offline

#4 2014-08-16 00:26:14

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: Ktorrent crashes, how can I create crash dumps?

Also tried building with adding

export CFLAGS="$CFLAGS -O0 -fbuiltin -g"
export CXXFLAGS="$CXXFLAGS -O0 -fbuiltin -g"

to the build() function, but gdb still gives me

Got object file from memory but can't read symbols: File truncated.

I guess the command '(gdb) apply all bt full' is supposed to be '(gdb) thread apply all bt full'.
But still no good trace...

Offline

#5 2014-08-25 07:20:44

w0land
Member
Registered: 2014-08-25
Posts: 2

Re: Ktorrent crashes, how can I create crash dumps?

Had the same problem with GDB (Got object file from memory but can't read symbols: File truncated.) For some reasons gdb cannot load some object files (bfd library returns error codes)
I got it solved by downgrading gdb to 7.7.

Hope this helps!

Offline

#6 2014-08-26 23:34:10

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: Ktorrent crashes, how can I create crash dumps?

w0land wrote:

Had the same problem with GDB (Got object file from memory but can't read symbols: File truncated.) For some reasons gdb cannot load some object files (bfd library returns error codes)
I got it solved by downgrading gdb to 7.7.

Hope this helps!

Thanks for the tip, I'm going to try downgrading gdb to 7.7 next time a get some free time as the version I'm using now is 7.8.

Offline

Board footer

Powered by FluxBB