Bug 54835 - module_upgrade segfaults on 32MB box
module_upgrade segfaults on 32MB box
Product: Red Hat Linux
Classification: Retired
Component: kudzu (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-10-20 12:49 EDT by jdalbec
Modified: 2014-03-16 22:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-12-02 16:41:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description jdalbec 2001-10-20 12:49:21 EDT
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:

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

Actual Results:  segfault

Expected Results:  normal return

Additional info:
Comment 1 Bill Nottingham 2001-10-22 10:43:03 EDT
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 19:09:36 EDT
Created attachment 34642 [details]
Full strace output
Comment 3 jdalbec 2001-12-02 11:45:51 EST
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 16:41:34 EST
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-03 22:15:28 EST
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.