All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG]:   problem when shutting down ppp connection since 2.5.70
@ 2003-06-30  2:35 Chris Friesen
  2003-06-30  6:07 ` Paul Rolland
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Chris Friesen @ 2003-06-30  2:35 UTC (permalink / raw)
  To: paulus; +Cc: linux-kernel, linux-ppp

Summary:
On 2.5.70 and later kernels, shutting down a pppoe connection causes 
pppd to hang and results in a usage count stuck at 1.

Details:

I have a pppoe dsl connection and I use the roaring penguin stuff that 
comes default with Mandrake 9.  My connection is brought up at init 
time.  With kernels past 2.5.69, if I try and shut down the connection I 
get logs as follows:


Jun 29 17:18:29 doug adsl-stop: Killing pppd
Jun 29 17:18:29 doug pppd[779]: Terminating on signal 15.
Jun 29 17:18:29 doug adsl-stop: Killing adsl-connect
Jun 29 17:18:29 doug pppd[779]: Connection terminated.
Jun 29 17:18:29 doug pppd[779]: Connect time 1.3 minutes.
Jun 29 17:18:29 doug pppd[779]: Sent 902 bytes, received 588 bytes.
Jun 29 17:18:32 doug pppoe[781]: Session 2991 terminated -- received 
PADT from peer
Jun 29 17:18:32 doug pppoe[781]: Sent PADT
Jun 29 17:18:39 doug kernel: unregister_netdevice: waiting for ppp0 to 
become free. Usage count = 1
Jun 29 17:18:45 doug ntpd[1094]: sendto(132.246.168.148): Invalid argument
Jun 29 17:18:46 doug smbd[1510]: [2003/06/29 17:18:46, 0] 
smbd/server.c:open_sockets(238)
Jun 29 17:18:46 doug smbd[1510]:   Got SIGHUP
Jun 29 17:18:46 doug smb: smbd -HUP succeeded
Jun 29 17:18:49 doug kernel: unregister_netdevice: waiting for ppp0 to 
become free. Usage count = 1
Jun 29 17:19:29 doug last message repeated 4 times
Jun 29 17:20:39 doug last message repeated 7 times


Also, pppd is stuck in a busy-loop, and isn't killable even with -9. 
Interestingly, top shows it in the R state.  I thought that wasn't 
supposed to happen?

With 2.5.69, the shutdown messages look like:

Jun 29 21:56:17 doug adsl-stop: Killing pppd
Jun 29 21:56:17 doug pppd[778]: Terminating on signal 15.
Jun 29 21:56:17 doug adsl-stop: Killing adsl-connect
Jun 29 21:56:17 doug pppd[778]: Connection terminated.
Jun 29 21:56:17 doug pppd[778]: Connect time 9.7 minutes.
Jun 29 21:56:17 doug pppd[778]: Sent 1510 bytes, received 588 bytes.
Jun 29 21:56:17 doug pppoe[781]: read (asyncReadFromPPP): Session 14: 
Input/output error
Jun 29 21:56:17 doug pppoe[781]: Sent PADT
Jun 29 21:56:17 doug pppd[778]: Exit.

The cpu is an athlon xp, no modules loaded.

One interesting tidbit is that this doesn't seem to happen if I remove 
the dsl connection from init and do it manually later.

I did a quick scan of the ppp*.c files in drivers/net and these are the 
ones with updates that went into 2.5.70.

Affected files are:
ppp_deflate.c 1.10
ppp_generic.c 1.25-1.30
ppp_synctty.c 1.9

Affected userids:
akpm
davem
paulus
torvalds


If anyone wants to propose a patch, I'm willing to try it out.

Thanks,

Chris


-- 
Chris Friesen                    | MailStop: 043/33/F10
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com


^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [BUG]:   problem when shutting down ppp connection since 2.5.70
@ 2003-07-14 11:43 Paul Rolland
  0 siblings, 0 replies; 17+ messages in thread
From: Paul Rolland @ 2003-07-14 11:43 UTC (permalink / raw)
  To: 'Paul Rolland', 'Stephen Hemminger', cfriesen,
	paulus
  Cc: linux-ppp, netdev

Hello,

I'm sorry, the patch was not complete, it should have considered the
BUG_ON too...

Here is one that is fine on my system :
--- dev.c.orig  2003-07-14 13:41:33.000000000 +0200
+++ dev.c       2003-07-14 13:34:27.000000000 +0200
@@ -2742,7 +2742,7 @@
        unsigned long rebroadcast_time, warning_time;
 
        rebroadcast_time = warning_time = jiffies;
-       while (atomic_read(&dev->refcnt) != 0) {
+       while (atomic_read(&dev->refcnt) > 0) {
                if (time_after(jiffies, rebroadcast_time + 1 * HZ)) {
                        rtnl_shlock();
                        rtnl_exlock();
@@ -2836,7 +2836,7 @@
                        dev->reg_state = NETREG_UNREGISTERED;
 
                        netdev_wait_allrefs(dev);
-                       BUG_ON(atomic_read(&dev->refcnt));
+                       BUG_ON(atomic_read(&dev->refcnt) > 0);
 
                        netdev_finish_unregister(dev);
                        break;

Still don't understand why refcnt is really bad (negative value),
but at least the machine is working...

Paul

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have a vitally important role serving as a bad example.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2003-07-14 11:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-30  2:35 [BUG]: problem when shutting down ppp connection since 2.5.70 Chris Friesen
2003-06-30  6:07 ` Paul Rolland
2003-06-30  8:05   ` Russell King
2003-06-30  8:03     ` David S. Miller
2003-06-30  8:23       ` Russell King
2003-06-30  8:42         ` Paul Rolland
2003-06-30 11:18 ` Paul Mackerras
2003-06-30 11:36   ` Paul Mackerras
2003-06-30 14:02   ` Chris Friesen
2003-06-30 15:37     ` Stephen Hemminger
2003-06-30 16:41       ` Chris Friesen
2003-07-01  2:26   ` Chris Friesen
2003-07-03  5:17 ` Chris Friesen
2003-07-06  9:43   ` Paul Rolland
2003-07-09 18:43     ` Stephen Hemminger
2003-07-14  9:16       ` Paul Rolland
  -- strict thread matches above, loose matches on Subject: below --
2003-07-14 11:43 Paul Rolland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.