[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb fault



Hi, I've recently had locks while playing with old SCSI scanner
(Mustek Paragon 600 II CD) and Tekram DC315/U SCSI host adapter.

(If it is interesting to someone, please contact me privately.)

So i've made a debug kernel (adding makeoptions DEBUG="-g") to
a kernel config and ran a scanner poweroff test again (just switch
it's power off while system is running), got a lock, core was dumped,
i rebooted, wanted to trace it with gdb, but failed:

# gdb bsd.gdb                                                                  
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.9"...
(gdb) target kvm /var/crash/bsd.0.core
gdb in free(): error: page is already free
Abort trap (core dumped) 

This is a backtrace:

# gdb /usr/bin/gdb -c gdb.core                                                 
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.9"...
Core was generated by `gdb'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/libreadline.so.3.0...done.
Loaded symbols for /usr/lib/libreadline.so.3.0
Reading symbols from /usr/lib/libiberty.so.8.0...done.
Loaded symbols for /usr/lib/libiberty.so.8.0
Reading symbols from /usr/lib/libncurses.so.10.0...done.
Loaded symbols for /usr/lib/libncurses.so.10.0
Reading symbols from /usr/lib/libm.so.2.1...done.
Loaded symbols for /usr/lib/libm.so.2.1
Reading symbols from /usr/lib/libkvm.so.8.0...done.
Loaded symbols for /usr/lib/libkvm.so.8.0
Reading symbols from /usr/lib/libc.so.39.0...done.
Loaded symbols for /usr/lib/libc.so.39.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  0x067349b1 in kill () from /usr/lib/libc.so.39.0
(gdb) bt
#0  0x067349b1 in kill () from /usr/lib/libc.so.39.0
#1  0x0677108b in abort () at /usr/src/lib/libc/stdlib/abort.c:65
#2  0x06754a76 in wrterror (p=0x267032e8 "page is already free")
    at /usr/src/lib/libc/stdlib/malloc.c:434
#3  0x06754b37 in wrtwarning (p=0x267032e8 "page is already free")
    at /usr/src/lib/libc/stdlib/malloc.c:444
#4  0x06755fa3 in free_pages (ptr=0x81379000, index=529285, info=0x0)
    at /usr/src/lib/libc/stdlib/malloc.c:1307
#5  0x06755a6c in ifree (ptr=0x81379000)
    at /usr/src/lib/libc/stdlib/malloc.c:1728
#6  0x06755c29 in free (ptr=0x81379000)
    at /usr/src/lib/libc/stdlib/malloc.c:1791
#7  0x0007f909 in _kvm_freevtop (kd=0x81378000)
    at /usr/src/lib/libkvm/kvm_i386.c:79
#8  0x0007f189 in kvm_close (kd=0x81378000) at /usr/src/lib/libkvm/kvm.c:638
#9  0x0007e6a1 in _kvm_open (kd=0x81378000, 
    uf=0x8718bac0 "/usr/src/sys/arch/i386/compile/ULTRA/bsd.gdb", 
    mf=0x89103780 "/var/crash/bsd.0.core", sf=0x2007b442 "/dev/drum", flag=0, 
    errout=0xcfbc6390 " ") at /usr/src/lib/libkvm/kvm.c:300
#10 0x0007ef28 in kvm_openfiles (
    uf=0x8718bac0 "/usr/src/sys/arch/i386/compile/ULTRA/bsd.gdb", 
    mf=0x89103780 "/var/crash/bsd.0.core", sf=0x0, flag=0, 
    errout=0xcfbc6390 " ") at /usr/src/lib/libkvm/kvm.c:604
---Type <return> to continue, or q <return> to quit--- 
#11 0x1c01d4f6 in bsd_kvm_open ()
#12 0x1c02e4e6 in do_cfunc ()
#13 0x1c030006 in cmd_func ()
#14 0x1c00c786 in execute_command ()
#15 0x1c081dc6 in command_handler ()
#16 0x1c0821fe in command_line_handler ()
#17 0x020d6771 in rl_callback_read_char ()
    at /usr/src/gnu/lib/libreadline/callback.c:123
#18 0x1c081723 in rl_callback_read_char_wrapper ()
#19 0x1c081cde in stdin_event_handler ()
#20 0x1c081064 in handle_file_event ()
#21 0x1c080b67 in process_event ()
#22 0x1c080bb0 in gdb_do_one_event ()
#23 0x1c00c446 in do_catch_errors ()
#24 0x1c00c338 in catcher ()
#25 0x1c00c47e in catch_errors ()
#26 0x1c03afc3 in tui_command_loop ()
#27 0x1c07eef9 in current_interp_command_loop ()
#28 0x1c004b27 in captured_command_loop ()
#29 0x1c00c446 in do_catch_errors ()
#30 0x1c00c338 in catcher ()
#31 0x1c00c47e in catch_errors ()
#32 0x1c005397 in captured_main ()
---Type <return> to continue, or q <return> to quit---
#33 0x1c00c446 in do_catch_errors ()
#34 0x1c00c338 in catcher ()
#35 0x1c00c47e in catch_errors ()
#36 0x1c0056fb in gdb_main ()
#37 0x1c004af5 in main ()

The sources are current as of yesterday.