Bug 67814 - /sbin/ifdown loops at boot when /var/lib/pcmcia/stab exists
/sbin/ifdown loops at boot when /var/lib/pcmcia/stab exists
Product: Fedora
Classification: Fedora
Component: pcmcia-cs (Show other bugs)
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Pete Zaitcev
Depends On:
  Show dependency treegraph
Reported: 2002-07-02 10:07 EDT by Need Real Name
Modified: 2008-08-02 19:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-10-25 16:08:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-07-02 10:07:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux)

Description of problem:
I've consistently had a problem with pcmcia startup hangs on several laptops running 7.3 after ungraceful shutdowns, and final figured it out I think.  When /var/lib/pcmcia/stab exists at boot time left over from the previous boot, /etc/init.d/pcmcia start tries to execute:

cat $RUN/stab | cleanup

which runs /etc/pcmcia/$CLASS stop $DEV

Tracing through, /sbin/ifdown line 50 checks to see if the device
is down, but for some reason doesn't believe this if DHCP is specified as $BOOTPROTO (can't figure out why this check is made?).
Execution therefore continues, even though eth0 is down, and line 53 executes "ip -o link show", which fails with "no such device".  The variable $FOUNDMACADDR isn't checked for a null result, and the script execs itself in the next if block at line 58 and loops with "no such device", but this output is suppressed in /etc/init.d/pcmcia, so startup just sees a hang.

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

How reproducible:

Steps to Reproduce:
1. ungraceful shutdown while pcmcia network up, or manually create /var/lib/pcmcia/stab (with $BOOTPROTO set to dhcp)
2. /etc/init.d/pcmcia start or reboot

Actual Results:  System hangs if being booted at PCMCIA startup.
If system is already booted and /etc/init.d/pcmcia startup is being executed manually, ^C frees this up (presumably by breaking into looped exec's of /sbin/ifdown).

Expected Results:  System should cope with erroneous presence of /var/lib/pcmcia/stab by testing properly for network status of eth0 and recover.

Additional info:

Classing this as severity "high" as it prevents successful boot (and I've seen it lots of times on several machines) - please reassign if this is inappropriate.

Suggested possible solutions:

1) Check for eth0 in /etc/init.d/pcmcia startup and only "cleanup" if really up (not a good solution)

2) In /sbin/ifdown:
#    if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
    if [ ! -z "$FOUNDMACADDR" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then

(better, but not completely clean)

3) Fix the call above in /sbin/ifdown to check_device_down to still discontinue execution even if $BOOTPROTO is dhcp (best solution?).
Comment 1 Darren Brierton 2003-04-23 10:21:53 EDT
I can confirm that this happens on RHL9 too. I was just aout to report it.
Comment 2 Jim Hollan 2003-11-17 06:46:06 EST
I have a very similar problem with Fedora Core 1. System hangs on boot
starting up pcmcia following an ungraceful shutdown.
Comment 3 Need Real Name 2005-07-10 21:03:51 EDT
It's nice to see this is still marked as NEW. It was my first bug report and I
put in lots of work!  Maybe it could be marked PREHISTORIC or something.
Comment 4 Pete Zaitcev 2005-10-27 23:04:21 EDT
Surely this is not a problem with FC5 Rawhide, if only because Hinds' pcmcia-cs
is replaced with pcmciautils. Please check if it works, if it's feasible.
Comment 5 Matthew Miller 2006-07-11 13:28:23 EDT
Fedora Core 1 is maintained by the Fedora Legacy project for security updates
only. If this problem is a security issue, please reopen and reassign to the
Fedora Legacy product. If it is not a security issue and hasn't been resolved in
the current FC5 updates or in the FC6 test release, reopen and change the
version to match.


NOTE: Fedora Core 1 is reaching the final end of support even by the Legacy
project. After Fedora Core 6 Test 2 is released (currently scheduled for July
26th), there will be no more security updates for FC1. Please use these next two
weeks to upgrade any remaining FC1 systems to a current release.

Comment 6 John Thacker 2006-10-25 16:08:20 EDT
Closed per above message and lack of response.  Note that FC1 is not even
supported by Fedora Legacy currently.

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