This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 182006 - kudzu segfaults on ppc iBook clamshell
kudzu segfaults on ppc iBook clamshell
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kudzu (Show other bugs)
rawhide
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-18 17:31 EST by Richard Hughes
Modified: 2014-03-16 22:58 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.2.32-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-22 14:02:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch for this issue (479 bytes, patch)
2006-02-22 13:07 EST, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Richard Hughes 2006-02-18 17:31:19 EST
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?)
Comment 1 Bill Nottingham 2006-02-19 00:44:10 EST
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.
Comment 2 Bill Nottingham 2006-02-19 00:46:58 EST
a) did this work previously?
b) do you have 1) usb 2) pcmcia network devices?
Comment 3 Richard Hughes 2006-02-19 04:11:19 EST
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.
Comment 4 Bill Nottingham 2006-02-20 13:10:25 EST
When you're hit the segfault in gdb, enter 'up' until you are at that frame.
Comment 5 Richard Hughes 2006-02-22 06:45:25 EST
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.
Comment 6 Bill Nottingham 2006-02-22 13:07:24 EST
Created attachment 125048 [details]
patch for this issue

If you rebuild with this patch, does it fix it?
Comment 7 Richard Hughes 2006-02-22 13:45:39 EST
Yes, this patch fixes the segfault. Many thanks.
Comment 8 Bill Nottingham 2006-02-22 14:02:20 EST
Added in 1.2.32-1.

Note You need to log in before you can comment on or make changes to this bug.