Red Hat Bugzilla – Bug 5780
rp3 segfault if DEVICE= line missing in ifcfg-XXX
Last modified: 2007-04-18 12:23:53 EDT
If the ifcfg-XXX file in /etc/sysconfig/network-scripts for
device XXX does not have a DEVICE= entry, rp3 will segfault.
At line 314 of interface.c, i->logicalName will be set to
NULL. At line 417, that null pointer is passed to strncmp
to compare it to "PPP". *BOOM*
Nothing that uses the ifcfg files works if the DEVICE= line is
missing. It is a critical data element in that file. None of
the tools that modifies that file should leave that line out.
How did it get left out in the first place?
I suppose I should be clearer: how did you create that network
configuration, what tools (if any) did you use to edit it, and
did you ever try to edit it by hand?
Sorry for the less-than-clear question before.
------- Additional Comments From 10/29/99 17:05 -------
I'm not sure how I created it. The one perhaps unusual thing I'm
doing is running two networks on one card, so I've got "ifconfig
eth0:0 192.168.0.1" in my rc.local, and a couple lines to enable IP
masquerading between that network and the other network. I don't know
what made the device entry in network-scripts. Looking at my notes of
what I've changed since installing RH 6.1, I don't see anything that
would have changed that file. I'm pretty sure the only hand editing I
did was to add in the DEVICE= entry after determining that its lack
was causing the crash.
Do you know if you used netcfg or linuxconf to set up the
ethernet device in the first place, or to modify it later,
or did you just set it up as part of the install process?
Hmm, it appears that enough people have this problem that we should
work around it in rp3 as well as try to resolve it at its source, so
the next version of rp3 should fix this. I would still appreciate a
list of any programs you used to modify the network configuration so
that I can try to search for the source of this problem and fix it
at its root.
*** Bug 5984 has been marked as a duplicate of this bug. ***
Upon updating a Redhat 6.0 i386 system to Redhat 6.1,
usernet (replaced with rp3) crashes when run (segmentation
All packages required by rp3 (according to rp3.spec provided
in the source distribution) are installed.
A sample stack trace follows:
stat("/etc/gnome/config//rp3", 0xbffff8a0) = -1 ENOENT (No
such file or directory)
stat("./gnome/config//rp3", 0xbffff894) = -1 ENOENT (No such
file or directory)
time(NULL) = 939987808
time(NULL) = 939987808
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 6
--- SIGSEGV (Segmentation fault) ---
------- Additional Comments From 10/18/99 23:26 -------
Upon upgrading a different i386 machine from RedHat 6.0 to RedHat 6.1,
I found the same results, rp3 (usernet) crashes.
I was able to fix this problem on both machines by running netcfg, and
removing an un-named interface from the Interfaces section of the
Network Configurator. As far as I can tell, the 'un-named' interface
did not exist before performing the upgrade from 6.0 to 6.1.
In result, rp3 runs fine.
------- Additional Comments From email@example.com 10/27/99 12:22 -------
Could the original reporter of this bug check bug 5780 and see
if it's the same problem?
------- Additional Comments From firstname.lastname@example.org 10/27/99 22:52 -------
It seems very similar. Beyond the stack trace, I did run rp3 under
xgdb, and the xgdb stack trace displayed an error similar to the one
listed in bug #5780. Unfortunately, I can not recall the exact xgdb
stack trace error display, but it should be easy enough to re-create.
------- Additional Comments From email@example.com 11/01/99 12:23 -------
Well, do any of the /etc/sysconfig/network-scripts/ifcfg-*
file not contain a line starting with "DEVICE="?
and see if it fixes the problem for you.
I'm going to assume that 1.0.2 fixes the bug, since I haven't heard back.
If that's not the case, please reopen the bug and let me know. Thanks!
I've marked it fixed in RawHide, but we have an upcoming errata release
as well once a few more bugs are fixed.