Bug 54835 - module_upgrade segfaults on 32MB box
Summary: module_upgrade segfaults on 32MB box
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kudzu
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-20 16:49 UTC by jdalbec
Modified: 2014-03-17 02:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-12-02 21:41:39 UTC
Embargoed:


Attachments (Terms of Use)
Full strace output (27.66 KB, text/plain)
2001-10-22 23:09 UTC, jdalbec
no flags Details

Description jdalbec 2001-10-20 16:49:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.2) Gecko/20010628

Description of problem:
I have 32MB RAM on this box, which maxes out the motherboard.  When I
install a new kernel (or run module_upgrade from a shell) it segfaults. 
Strace shows that it's calling syslog() and passing a NULL pointer instead
of a string.  Memory allocation failure?

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Install a new kernel, or run '/usr/sbin/module_upgrade' as root.
2.
3.
	

Actual Results:  segfault

Expected Results:  normal return

Additional info:

Comment 1 Bill Nottingham 2001-10-22 14:43:03 UTC
Can you post the full strace?

I'm looking at the code here, and I don't see how it can segfault calling
syslog, as everything there has already been dereferenced previously.

Comment 2 jdalbec 2001-10-22 23:09:36 UTC
Created attachment 34642 [details]
Full strace output

Comment 3 jdalbec 2001-12-02 16:45:51 UTC
gdb shows a corrupt stack, so any pointer stored on the stack could have been
reset to NULL between the previous dereference and the call to syslog.

Comment 4 jdalbec 2001-12-02 21:41:34 UTC
It looks like the strace just before the segfault is a red herring.  The last
syslog() is a call to setLogLevel from modules.c.  I think I've found the real
problem.  In module_upgrade.c you call probeDevices(CLASS_UNSPEC, BUS_PCI,
(PROBE_ALL|PROBE_SAFE)) and immediately dereference the result.  But my
motherboard is (E)ISA-only, so probeDevices returns a NULL pointer because there
is no PCI bus to probe.  It looks like this needs to be converted to a pointer
to a NULL pointer for the rest of the code to work.  Does the rest of the code
do anything in that case?  If not, you could just bail out at that point.

Comment 5 Bill Nottingham 2002-01-04 03:15:28 UTC
This was fixed in kudzu-0.98.10-1, which is in 7.2. Sorry about the late reply.


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