Description of problem: kudzu segfaults on ppc iBook clamshell with really worrying gdb backtrace. Version-Release number of selected component (if applicable): kudzu-1.2.30-1.ppc How reproducible: Always Steps to Reproduce: 1. Install fc rawhide on iBook clamshell 2. Restart Actual results: kudzu segfaults. Expected results: kudzu to run as expected. Additional info: GNU gdb Red Hat Linux (6.3.0.0-1.98.2rh) 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 "ppc-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0fec5240 in strcmp () from /lib/libc.so.6 #0 0x0fec5240 in strcmp () from /lib/libc.so.6 #1 0x100057d0 in removeMatchingDevices (list=Variable "list" is not available. ) at kudzu.c:919 #2 0x10007e50 in matchNetDevices (devlist=0x100d5fc8) at kudzu.c:1025 #3 0x28044444 in ?? () #4 0x10008554 in probeDevices (probeClass=CLASS_UNSPEC, probeBus=Variable "probeBus" is not available. ) at kudzu.c:848 #5 0x24002402 in ?? () #6 0x10004bf8 in main (argc=Variable "argc" is not available. ) at hwconf.c:938 #7 0x22000422 in ?? () #8 0x0fe5d600 in generic_start_main () from /lib/libc.so.6 #9 0x0fe5d600 in generic_start_main () from /lib/libc.so.6 #10 0x0fe5d600 in generic_start_main () from /lib/libc.so.6 Previous frame inner to this frame (corrupt stack?)
So, essentially, you have a network device that doesn't have the device field of the structure initialized. That's Not Supposed To Happen. Getting an idea of what *dev and *current are in the removeMatchingDevices frame would be good; I can glance over the code to see if there's a backdoor in that allows device to not be set at that point.
a) did this work previously? b) do you have 1) usb 2) pcmcia network devices?
How do I go to the removeMatchingDevices frame? a) I'm sure this works on my i386 box with the below dongle for FC4. b) I have no PCMCIA devices. I do have a USB 802.11b zd1201 adapeter installed. Details are here http://linux-lc100020.sourceforge.net Thanks for your help. Richard.
When you're hit the segfault in gdb, enter 'up' until you are at that frame.
I've just installed FC5T3 and it failes the same. Quote Bill: >You need to go up to the removeMatchingDevices frame for it >to find the variables (gdb) set args -p (gdb) run Starting program: /sbin/kudzu -p Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0x100000 Program received signal SIGSEGV, Segmentation fault. 0x0ff03280 in strcmp () from /lib/libc.so.6 (gdb) up #1 0x100057d0 in removeMatchingDevices (list=Variable "list" is not available. ) at kudzu.c:919 919 if (strcmp(dev->device, current->device)) continue; (gdb) p *dev $1 = {next = 0x100d6260, index = 0, type = CLASS_NETWORK, bus = BUS_USB, device = 0x0, driver = 0x100d5b50 "zd1201", desc = 0x100d5f40 "USB WLAN", detached = 0, classprivate = 0x0, newDevice = 0x10010160 <usbNewDevice>, freeDevice = 0x100103f0 <usbFreeDevice>, writeDevice = 0x10010300 <usbWriteDevice>, compareDevice = 0x100102a0 <usbCompareDevice>} (gdb) p *current $2 = {next = 0x100da420, index = 8, type = CLASS_NETWORK, bus = BUS_PCI, device = 0x100d5c38 "eth0", driver = 0x100d62c0 "sungem", desc = 0x100d6118 "Apple Computer Inc. UniNorth GMAC (Sun GEM)", detached = 0, classprivate = 0x101501d0, newDevice = 0x10009db0 <pciNewDevice>, freeDevice = 0x10009c50 <pciFreeDevice>, writeDevice = 0x1000a050 <pciWriteDevice>, compareDevice = 0x10009f20 <pciCompareDevice>} (gdb) bt #0 0x0ff03280 in strcmp () from /lib/libc.so.6 #1 0x100057d0 in removeMatchingDevices (list=Variable "list" is not available. ) at kudzu.c:919 #2 0x10007e50 in matchNetDevices (devlist=0x100d6080) at kudzu.c:1025 #3 0x28044444 in ?? () #4 0x10008554 in probeDevices (probeClass=CLASS_UNSPEC, probeBus=Variable "probeBus" is not available. ) at kudzu.c:848 #5 0x240044a2 in ?? () #6 0x10004bf8 in main (argc=Variable "argc" is not available. ) at hwconf.c:938 #7 0x22000422 in ?? () #8 0x0fe9b600 in generic_start_main () from /lib/libc.so.6 #9 0x0fe9b600 in generic_start_main () from /lib/libc.so.6 #10 0x0fe9b600 in generic_start_main () from /lib/libc.so.6 Previous frame inner to this frame (corrupt stack?) I can give you ssh access to the box if that would aid debugging. Many thanks. Richard.
Created attachment 125048 [details] patch for this issue If you rebuild with this patch, does it fix it?
Yes, this patch fixes the segfault. Many thanks.
Added in 1.2.32-1.