Bug 177792 - init.d/network gets caught in eternal loop on shutdown
Summary: init.d/network gets caught in eternal loop on shutdown
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-14 01:34 UTC by emerson
Modified: 2014-03-17 02:57 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-10-19 03:36:32 UTC
Type: ---
Embargoed:


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

Description emerson 2006-01-14 01:34:54 UTC
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 18:57:33 UTC
Please attach your ifcfg-* files.

Comment 2 emerson 2006-01-18 07:35:02 UTC
Created attachment 123360 [details]
ifcfg-eth0

Comment 3 emerson 2006-01-18 07:35:30 UTC
Created attachment 123361 [details]
ifcfg-eth1

Comment 4 emerson 2006-01-18 07:36:11 UTC
Created attachment 123362 [details]
ifcfg-lo

Comment 5 emerson 2006-01-18 07:36:43 UTC
Created attachment 123363 [details]
ifcfg-wifi0

Comment 6 Bill Nottingham 2006-01-18 16:14:16 UTC
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 19:52:06 UTC
Created attachment 125415 [details]
patch for this

Does this patch fix it for you?

Comment 8 Bill Nottingham 2006-02-28 23:49:41 UTC
Created attachment 125431 [details]
patch, take 2

Here's a corrected patch.

Comment 9 emerson 2006-03-01 00:39:09 UTC
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-03-01 01:36:22 UTC
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-03-01 01:38:35 UTC
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 09:20:29 UTC
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 20:21:58 UTC
Does this still happen with FC5?

Comment 14 emerson 2006-10-18 20:29:34 UTC
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-19 03:36:32 UTC
OK, closing.


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