Bug 177792 - init.d/network gets caught in eternal loop on shutdown
init.d/network gets caught in eternal loop on shutdown
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-13 20:34 EST by emerson
Modified: 2014-03-16 22:57 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-18 23:36:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ifcfg-eth0 (112 bytes, text/plain)
2006-01-18 02:35 EST, emerson
no flags Details
ifcfg-eth1 (112 bytes, text/plain)
2006-01-18 02:35 EST, emerson
no flags Details
ifcfg-lo (254 bytes, text/plain)
2006-01-18 02:36 EST, emerson
no flags Details
ifcfg-wifi0 (113 bytes, text/plain)
2006-01-18 02:36 EST, emerson
no flags Details
patch for this (2.55 KB, patch)
2006-02-28 14:52 EST, Bill Nottingham
no flags Details | Diff
patch, take 2 (2.86 KB, patch)
2006-02-28 18:49 EST, Bill Nottingham
no flags Details | Diff
minor additional changes (1.93 KB, patch)
2006-02-28 20:38 EST, Bill Nottingham
no flags Details | Diff

  None (edit)
Description emerson 2006-01-13 20:34:54 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

Description of problem:
Switched to NetworkManager for my laptop.  Works really well to find and set up wireless, wired, etc networks.  I have an eth0 and an eth1 corresponding to my wired and wireless interfaces respectively.  I set those to "ONBOOT=no" so NetworkManager gets control of them, and at start time, all I get is "Starting loopback interface:  [  OK   ]" as expected.

On shutdown of my laptop, though, when init.d/network stop runs, it never exits.  Since we have already killed off X and the other consoles at this point, I can't kill it and am forced to shut down hard.

It seems to get caught in some kind of loop 'exec'ing /etc/sysconfig/network-scripts/ifdown and /etc/sysconfig/network-scripts/ifdown-eth over and over, apparently each calling the other.

I say this because if I run 'service network stop' from a terminal, 'top' and 'ps' conspire to tell me that one PID is bouncing around between ifdown and ifdown-eth, and ps tells me that the PID numbers are skyrocketing.

If I manually "ifconfig eth0 down" and "ifconfig eth1 down" before rebooting, all is well, it doesn't try to shut them down from init.d/network, it halts fine.

But "ifdown eth0" or "service network stop" (at shutdown time or while still at the desktop) will hang indefinately.

(this may end up being a NetworkManager bug, but since it's init.d/network that seizes up, I thought I'd start there.  I'm also filing it as 'high' since I get dirty filesystems and other nastiness from forced shutdowns if I forget the "ifconfig down" workaround.)

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

How reproducible:
Always

Steps to Reproduce:
1. Install NetworkManager, set it to run at start time
2. Set all interfaces to ONBOOT=no in /etc/sysconfig/network-scripts/ifcfg-eth*
3. Reboot to start machine with NetworkManager in charge of interfaces.
4. Reboot or halt.

Actual Results:  Shutting down interface eth0:(eternal wait with climbing PID's)

Expected Results:  "network start" didn't start the interfaces, so my thought is that "network stop" probably shouldn't be trying to stop them.  Should get only:

Shutting down loopback interface:   [  OK  ]

...and continue on merrily.

Additional info:
Comment 1 Bill Nottingham 2006-01-16 13:57:33 EST
Please attach your ifcfg-* files.
Comment 2 emerson 2006-01-18 02:35:02 EST
Created attachment 123360 [details]
ifcfg-eth0
Comment 3 emerson 2006-01-18 02:35:30 EST
Created attachment 123361 [details]
ifcfg-eth1
Comment 4 emerson 2006-01-18 02:36:11 EST
Created attachment 123362 [details]
ifcfg-lo
Comment 5 emerson 2006-01-18 02:36:43 EST
Created attachment 123363 [details]
ifcfg-wifi0
Comment 6 Bill Nottingham 2006-01-18 11:14:16 EST
If you remove one of eth0 or wifi0 does it still loop? (It still needs fixed,
just checking that that's what's causing it...)
Comment 7 Bill Nottingham 2006-02-28 14:52:06 EST
Created attachment 125415 [details]
patch for this

Does this patch fix it for you?
Comment 8 Bill Nottingham 2006-02-28 18:49:41 EST
Created attachment 125431 [details]
patch, take 2

Here's a corrected patch.
Comment 9 emerson 2006-02-28 19:39:09 EST
I applied this patch (the second one), and the behavior didn't change, I'm sorry
to say.  Still tries "Shutting down interface eth0" during shutdown.  I have
restarted and retried a couple times, but no joy.

Sorry I missed your question of 01/18 about removing eth0 or wifi0.  I have just
played around with that idea, and yes, moving ifcfg-eth0 out of the way will
make it work.  (It still says that it's shutting down eth1, but it doesn't hang
there.)

So at least I have a workaround.  Should those ifcfg- files even need to be
there at all, if NetworkManager is doing all the magic?

Thanks!
Comment 10 Bill Nottingham 2006-02-28 20:36:22 EST
No, they don't need to be there if you're using NM.

What sort of network state do you have when you're shutting down - which devices
are up?
Comment 11 Bill Nottingham 2006-02-28 20:38:35 EST
Created attachment 125436 [details]
minor additional changes

Here's some additional fixes for the shutdown logic, although I don't think
they'll change what you're seeing.
Comment 12 Christian Guelpen 2006-03-01 04:20:29 EST
I have the same problem and I had it before I used NetworkManager, too.

When the system tries to shutdown the network interfaces it sometimes just hangs
and I can only reboot hard. I have two network interfaces eth0 (ethernet) and
eth1 (wireless lan) and it seems the system is sometimes shuffling these, eth0
becomes eth1 and eth1 becomes eth0. I don't know when and why this happens, I
just notice it when it does not shutdown correctly.
The only thing I can do when it hangs is turn the wireless radio on/off on my
laptop and then I see something like: eth0 RF on
Even though wireless has been eth1 when I was using it before.
Comment 13 Bill Nottingham 2006-10-18 16:21:58 EDT
Does this still happen with FC5?
Comment 14 emerson 2006-10-18 16:29:34 EDT
I've been tracking rawhide on my laptop for a few months now, and have not seen
this behavior any more.  Not clear whether FC5 proper fixed it, but it has
gotten well sometime in the interim.  Thanks!
Comment 15 Bill Nottingham 2006-10-18 23:36:32 EDT
OK, closing.

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