This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how can i stop a running process to do a backtrace?


Paul Pluzhnikov wrote:
On Sat, Jul 19, 2008 at 8:03 AM, Jelle de Jong
<jelledejong@powercraft.nl> wrote:

After the sshfs froze i did a killall -9 sshfs

Well, don't do *that* (it causes the kernel to obliterate the process completely). Try "killall sshfs", or "killall -SIGABRT sshfs", or "killall -SIGQUIT sshfs".

If one of the above wakes sshfs up, then you'll have a chance to debug it.

Thank you all for the good information.


I managed to create three backtraces after the sshfs program froze. I attached one of them as example. I something is obvious wrong with the report please tell me.

I took the reports upstream to the sshfs developers.

Thank you all,

Kind regards,

Jelle
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
(gdb) handle SIG33 pass nostop noprint
Signal        Stop  Print   Pass to program Description
SIG33         No    No  Yes     Real-time event 33
(gdb) set pagination 0
(gdb) attach 1973
Attaching to process 1973
Reading symbols from /usr/bin/sshfs...Reading symbols from /usr/lib/debug/usr/bin/sshfs...done.
done.
Reading symbols from /usr/lib/libfuse.so.2...done.
Loaded symbols for /usr/lib/libfuse.so.2
Reading symbols from /lib/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libgthread-2.0.so.0...done.
Loaded symbols for /usr/lib/libgthread-2.0.so.0
Reading symbols from /lib/i686/cmov/librt.so.1...done.
Loaded symbols for /lib/i686/cmov/librt.so.1
Reading symbols from /usr/lib/libglib-2.0.so.0...done.
Loaded symbols for /usr/lib/libglib-2.0.so.0
Reading symbols from /lib/i686/cmov/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c72960 (LWP 1973)]
[New Thread 0xb7c4fb90 (LWP 1974)]
Loaded symbols for /lib/i686/cmov/libpthread.so.0
Reading symbols from /lib/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libselinux.so.1...done.
Loaded symbols for /lib/libselinux.so.1
Reading symbols from /usr/lib/libpcre.so.3...done.
Loaded symbols for /usr/lib/libpcre.so.3
0xb7f1a424 in __kernel_vsyscall ()
(gdb) continue
Continuing.

Program received signal SIGTERM, Terminated.
[Switching to Thread 0xb7c72960 (LWP 1973)]
0xb7f1a424 in __kernel_vsyscall ()
(gdb) backtrace full
#0  0xb7f1a424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7e1d3a5 in sem_wait@@GLIBC_2.1 () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0x0804b2c8 in sftp_request_wait (req=0xfffffe00, type=5 '\005', expect_type=103 'g', outbuf=0xbfb36488) at sshfs.c:1616
    err = <value optimized out>
#3  0x0804c28a in sftp_request_iov (type=<value optimized out>, iov=<value optimized out>, count=<value optimized out>, expect_type=103 'g', outbuf=0xbfb36488) at sshfs.c:1735
    req = (struct request *) 0xb7306f90
#4  0x0804c2cf in sftp_request (type=0 '\0', buf=<value optimized out>, expect_type=<value optimized out>, outbuf=0xbfb36488) at sshfs.c:1744
    iov = {iov_base = 0xb730acb0, iov_len = 20}
#5  0x0804f9ef in sshfs_read (path=0xb730b0d0 "/home/user/media/series/DVD/DVD_S05/DVD_S05D05B.iso", rbuf=0xb731f6f8 "", size=65536, offset=6602395648, fi=0xbfb365bc) at sshfs.c:2268
    sf = (struct sshfs_file *) 0xb73012e0
#6  0xb7ef826e in fuse_fs_read () from /usr/lib/libfuse.so.2
No symbol table info available.
#7  0xb7efca13 in ?? () from /usr/lib/libfuse.so.2
No symbol table info available.
#8  0x098485a0 in ?? ()
No symbol table info available.
#9  0xb730b0d0 in ?? ()
No symbol table info available.
#10 0xb731f6f8 in ?? ()
No symbol table info available.
#11 0x00010000 in ?? ()
No symbol table info available.
#12 0x89889000 in ?? ()
No symbol table info available.
#13 0x00000001 in ?? ()
No symbol table info available.
#14 0xbfb365bc in ?? ()
No symbol table info available.
#15 0x00000000 in ?? ()
No symbol table info available.
(gdb) info registers
eax            0xfffffe00   -512
ecx            0x80 128
edx            0x0  0
ebx            0xb7306f94   -1221562476
esp            0xbfb36390   0xbfb36390
ebp            0xbfb363e8   0xbfb363e8
esi            0x0  0
edi            0x67 103
eip            0xb7f1a424   0xb7f1a424 <__kernel_vsyscall+16>
eflags         0x246    [ PF ZF IF ]
cs             0x73 115
ss             0x7b 123
ds             0x7b 123
es             0x7b 123
fs             0x0  0
gs             0x33 51
(gdb) thread apply all backtrace

Thread 2 (Thread 0xb7c4fb90 (LWP 1974)):
#0  0xb7f1a424 in __kernel_vsyscall ()
#1  0xb7e1e09b in read () from /lib/i686/cmov/libpthread.so.0
#2  0x08049fa9 in do_read (buf=<value optimized out>) at sshfs.c:1111
#3  0x0804a9a2 in sftp_read (type=0xb7c4f367 "g", buf=0xb7c4f34c) at sshfs.c:1142
#4  0x0804aac1 in process_requests (data_=0x0) at sshfs.c:1202
#5  0xb7e174b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#6  0xb7d9638e in clone () from /lib/i686/cmov/libc.so.6

Thread 1 (Thread 0xb7c72960 (LWP 1973)):
#0  0xb7f1a424 in __kernel_vsyscall ()
#1  0xb7e1d3a5 in sem_wait@@GLIBC_2.1 () from /lib/i686/cmov/libpthread.so.0
#2  0x0804b2c8 in sftp_request_wait (req=0xfffffe00, type=5 '\005', expect_type=103 'g', outbuf=0xbfb36488) at sshfs.c:1616
#3  0x0804c28a in sftp_request_iov (type=<value optimized out>, iov=<value optimized out>, count=<value optimized out>, expect_type=103 'g', outbuf=0xbfb36488) at sshfs.c:1735
#4  0x0804c2cf in sftp_request (type=0 '\0', buf=<value optimized out>, expect_type=<value optimized out>, outbuf=0xbfb36488) at sshfs.c:1744
#5  0x0804f9ef in sshfs_read (path=0xb730b0d0 "/home/user/download/usenet/series/DVD/DVD_S05/DVD_S05D05B.iso", rbuf=0xb731f6f8 "", size=65536, offset=6602395648, fi=0xbfb365bc) at sshfs.c:2268
#6  0xb7ef826e in fuse_fs_read () from /usr/lib/libfuse.so.2
#7  0xb7efca13 in ?? () from /usr/lib/libfuse.so.2
#8  0x098485a0 in ?? ()
#9  0xb730b0d0 in ?? ()
#10 0xb731f6f8 in ?? ()
#11 0x00010000 in ?? ()
#12 0x89889000 in ?? ()
#13 0x00000001 in ?? ()
#14 0xbfb365bc in ?? ()
#15 0x00000000 in ?? ()
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) Detaching from program: /usr/bin/sshfs, process 1973

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]