* pppd hangs on SIGHUP
@ 2010-01-20 5:20 Leslie Rhorer
2010-01-20 5:34 ` Bill Unruh
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-20 5:20 UTC (permalink / raw)
To: linux-ppp
Hello,
I am experiencing a strange, intermittent problem with pppd. I am
running pppd version 2.4.4 under Debian "Lenny" on an old Dell Optiplex
GX260 using kernel 2.6.26-2-686. I have a Calcomp A600 3G Wireless modem
dialing a broadband wireless carrier. The system is configured as a linux
router running an openvpn client over the ppp0 connection, with dnsmasq
providing DHCP clients on eth0 with IP configuration and ntp providing a
clock source. If I leave the router up and running, after 12 hours the ISP
disconnects the line. I can avoid this by sending a SIGHUP every few hours.
I of course have pppd running with the persist option, and usually pppd will
dutifully hang up the modem and start the chat session over again to obtain
connectivity. Frequently, however, pppd will simply hang rather than
restarting the connection. Subsequent SIGTERM or SIGHUP signals will do
nothing whatsoever. The only way (of which I know) to release the terminal
(/cev/ttyACM0) is to send a SIGKILL. After doing so, /dev/ttyACM0 is
released, and I can use a utility such as minicom to access the modem. I
can dial out and get a carrier. I can see the ppp authentication request
from the ISP. What I cannot do, however, is get pppd to come back up. If I
start pppd again, it opens the /dev/ttyACM0 device and creates the lockfile,
but it does not attempt to run chat or evidently do anything else other than
refresh the lockfile if it is stale. My only option at that point is to
reboot the host. A warm reboot allows the router to call out again.
Rebooting the router is a rather Draconian approach, not to mention the fact
it takes a little bit of time. The problem by no means happens every time,
but it does happen very frequently, perhaps one restart out of three. Is
there some way other than sending a SIGHUP to get pppd to hang up gracefully
and redial the line? Is there something I can do to get pppd to start
working properly when it hangs, short of rebooting the router?
Here is a snapshot from /var/log/syslog during one of the events:
Jan 19 19:35:29 Cricket pppd[2783]: Hangup (SIGHUP)
Jan 19 19:35:29 Cricket pppd[2783]: Connect time 152.1 minutes.
Jan 19 19:35:29 Cricket pppd[2783]: Sent 1551485 bytes, received 1648658
bytes.
Jan 19 19:35:29 Cricket pppd[2783]: Script /etc/ppp/ip-down started (pid
10026)
Jan 19 19:35:29 Cricket pppd[2783]: sent [LCP TermReq id=0xe "User request"]
Jan 19 19:35:29 Cricket pppd[2783]: Script /etc/ppp/ip-down finished (pid
10026), status = 0x0
Jan 19 19:35:32 Cricket pppd[2783]: sent [LCP TermReq id=0xf "User request"]
Jan 19 19:35:35 Cricket pppd[2783]: Connection terminated.
Jan 19 19:39:00 Cricket pppd[2783]: ioctl(TIOCSETD, N_TTY): Interrupted
system call (line 571)
Jan 19 19:39:01 Cricket pppd[2783]: tcsetattr: Interrupted system call (line
1010)
Jan 19 19:39:01 Cricket pppd[2783]: Hangup (SIGHUP)
Jan 19 19:39:01 Cricket pppd[2783]: Modem hangup
Jan 19 19:39:02 Cricket pppd[2783]: Hangup (SIGHUP)
Then nothing else. After I kill the process and restart pppd, I get
only a single line:
Jan 19 20:11:45 Cricket pppd[18566]: pppd 2.4.4 started by root, uid 0
Another time the log had the same results except it quit logging
after the ioctl(TIOCSETD, N_TTY) line.
I call pppd with `pppd call cricket`
Active options in the /etc/ppp/options file:
asyncmap 0
usehostname
noipdefault
usepeerdns
defaultroute
auth
local
lock
hide-password
debug
lcp-echo-interval 30
lcp-echo-failure 4
noipx
Contents of /etc/ppp/peers/cricket:
user "(830)388-4911@mycricket.com"
connect "/usr/sbin/chat -v -f /etc/ppp/chatfile"
/dev/ttyACM0
noipdefault
usepeerdns
defaultroute
persist
noauth
Contents of /etc/ppp/chatfile
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
"" "AT"
OK "ATDT#777"
CONNECT
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
@ 2010-01-20 5:34 ` Bill Unruh
2010-01-20 5:43 ` James Cameron
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Bill Unruh @ 2010-01-20 5:34 UTC (permalink / raw)
To: linux-ppp
On Tue, 19 Jan 2010, Leslie Rhorer wrote:
>
> Hello,
>
> I am experiencing a strange, intermittent problem with pppd. I am
> running pppd version 2.4.4 under Debian "Lenny" on an old Dell Optiplex
> GX260 using kernel 2.6.26-2-686. I have a Calcomp A600 3G Wireless modem
> dialing a broadband wireless carrier. The system is configured as a linux
> router running an openvpn client over the ppp0 connection, with dnsmasq
> providing DHCP clients on eth0 with IP configuration and ntp providing a
> clock source. If I leave the router up and running, after 12 hours the ISP
> disconnects the line. I can avoid this by sending a SIGHUP every few hours.
> I of course have pppd running with the persist option, and usually pppd will
> dutifully hang up the modem and start the chat session over again to obtain
> connectivity. Frequently, however, pppd will simply hang rather than
> restarting the connection. Subsequent SIGTERM or SIGHUP signals will do
> nothing whatsoever. The only way (of which I know) to release the terminal
> (/cev/ttyACM0) is to send a SIGKILL. After doing so, /dev/ttyACM0 is
> released, and I can use a utility such as minicom to access the modem. I
> can dial out and get a carrier. I can see the ppp authentication request
> from the ISP. What I cannot do, however, is get pppd to come back up. If I
> start pppd again, it opens the /dev/ttyACM0 device and creates the lockfile,
> but it does not attempt to run chat or evidently do anything else other than
> refresh the lockfile if it is stale. My only option at that point is to
> reboot the host. A warm reboot allows the router to call out again.
> Rebooting the router is a rather Draconian approach, not to mention the fact
> it takes a little bit of time. The problem by no means happens every time,
> but it does happen very frequently, perhaps one restart out of three. Is
> there some way other than sending a SIGHUP to get pppd to hang up gracefully
> and redial the line? Is there something I can do to get pppd to start
> working properly when it hangs, short of rebooting the router?
>
> Here is a snapshot from /var/log/syslog during one of the events:
>
> Jan 19 19:35:29 Cricket pppd[2783]: Hangup (SIGHUP)
> Jan 19 19:35:29 Cricket pppd[2783]: Connect time 152.1 minutes.
> Jan 19 19:35:29 Cricket pppd[2783]: Sent 1551485 bytes, received 1648658
> bytes.
> Jan 19 19:35:29 Cricket pppd[2783]: Script /etc/ppp/ip-down started (pid
> 10026)
> Jan 19 19:35:29 Cricket pppd[2783]: sent [LCP TermReq id=0xe "User request"]
> Jan 19 19:35:29 Cricket pppd[2783]: Script /etc/ppp/ip-down finished (pid
> 10026), status = 0x0
> Jan 19 19:35:32 Cricket pppd[2783]: sent [LCP TermReq id=0xf "User request"]
> Jan 19 19:35:35 Cricket pppd[2783]: Connection terminated.
> Jan 19 19:39:00 Cricket pppd[2783]: ioctl(TIOCSETD, N_TTY): Interrupted
> system call (line 571)
> Jan 19 19:39:01 Cricket pppd[2783]: tcsetattr: Interrupted system call (line
> 1010)
> Jan 19 19:39:01 Cricket pppd[2783]: Hangup (SIGHUP)
> Jan 19 19:39:01 Cricket pppd[2783]: Modem hangup
> Jan 19 19:39:02 Cricket pppd[2783]: Hangup (SIGHUP)
>
> Then nothing else. After I kill the process and restart pppd, I get
> only a single line:
>
> Jan 19 20:11:45 Cricket pppd[18566]: pppd 2.4.4 started by root, uid 0
>
> Another time the log had the same results except it quit logging
> after the ioctl(TIOCSETD, N_TTY) line.
>
>
> I call pppd with `pppd call cricket`
>
> Active options in the /etc/ppp/options file:
>
> asyncmap 0
Not needed.
> usehostname
not needed
> noipdefault
> usepeerdns
> defaultroute
> auth
definitely do not want.
You do not want them to authenticate to you.
> local
> lock
> hide-password
> debug
> lcp-echo-interval 30
> lcp-echo-failure 4
> noipx
>
> Contents of /etc/ppp/peers/cricket:
>
> user "(830)388-4911@mycricket.com"
> connect "/usr/sbin/chat -v -f /etc/ppp/chatfile"
> /dev/ttyACM0
> noipdefault
> usepeerdns
> defaultroute
> persist
> noauth
>
> Contents of /etc/ppp/chatfile
>
> ABORT "NO CARRIER"
> ABORT "NO DIALTONE"
> ABORT "ERROR"
> ABORT "NO ANSWER"
> ABORT "BUSY"
> "" "AT"
Try AT&F
instead
> OK "ATDT#777"
> CONNECT
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
2010-01-20 5:34 ` Bill Unruh
@ 2010-01-20 5:43 ` James Cameron
2010-01-20 5:47 ` James Cameron
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: James Cameron @ 2010-01-20 5:43 UTC (permalink / raw)
To: linux-ppp
Sounds normal. What do you have set for parameters holdoff and maxfail?
Perhaps you need non-default values. Ten is the default on my Debian
system for maxfail, which means your method would work ten times.
--
James Cameron
http://quozl.linux.org.au/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
2010-01-20 5:34 ` Bill Unruh
2010-01-20 5:43 ` James Cameron
@ 2010-01-20 5:47 ` James Cameron
2010-01-20 5:53 ` Leslie Rhorer
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: James Cameron @ 2010-01-20 5:47 UTC (permalink / raw)
To: linux-ppp
On Tue, Jan 19, 2010 at 09:34:05PM -0800, Bill Unruh wrote:
> Leslie wrote:
> >asyncmap 0
> Not needed.
Agreed, the default is zero.
> >auth
> definitely do not want.
> You do not want them to authenticate to you.
Generally true. This might be an exception though. And it shouldn't
have anything to do with the reported problem of connections not
persisting after a SIGHUP.
> >"" "AT"
> Try AT&F
> instead
That will have the side-effect of resetting the modem settings. Don't
do this if you've set them carefully prior to starting pppd.
--
James Cameron
http://quozl.linux.org.au/
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (2 preceding siblings ...)
2010-01-20 5:47 ` James Cameron
@ 2010-01-20 5:53 ` Leslie Rhorer
2010-01-20 6:10 ` Leslie Rhorer
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-20 5:53 UTC (permalink / raw)
To: linux-ppp
> > I call pppd with `pppd call cricket`
> >
> > Active options in the /etc/ppp/options file:
> >
> > asyncmap 0
> Not needed.
It was left as default.
> > usehostname
> not needed
Ditto.
> > auth
> definitely do not want.
> You do not want them to authenticate to you.
I know that, but the comment in the default options file says:
# Please do not disable this setting. It is expected to be standard in
# future releases of pppd. Use the call option (see manpage) to disable
# authentication for specific peers.
Which is why I left it enabled in the options file and set "noauth"
in the calling file.
> > Contents of /etc/ppp/chatfile
> >
> > ABORT "NO CARRIER"
> > ABORT "NO DIALTONE"
> > ABORT "ERROR"
> > ABORT "NO ANSWER"
> > ABORT "BUSY"
> > "" "AT"
> Try AT&F
> instead
AT&F doesn't seem to do anything. OTOH, it doesn't cause any
errors, but since pppd doesn't even spawn chat during this failure, it's
exceedingly unlikely it would make a difference.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (3 preceding siblings ...)
2010-01-20 5:53 ` Leslie Rhorer
@ 2010-01-20 6:10 ` Leslie Rhorer
2010-01-20 12:25 ` James Carlson
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-20 6:10 UTC (permalink / raw)
To: linux-ppp
> -----Original Message-----
> From: quozl@us.netrek.org [mailto:quozl@us.netrek.org] On Behalf Of James
> Cameron
> Sent: Tuesday, January 19, 2010 11:43 PM
> To: Leslie Rhorer
> Cc: linux-ppp@vger.kernel.org
> Subject: Re: pppd hangs on SIGHUP
>
> Sounds normal.
Normal that one cannot load and run pppd? I see no way in which
that could ever be construed as "normal".
> What do you have set for parameters holdoff and maxfail?
Both are default. I suppose I could increase the holdoff parameter.
> Perhaps you need non-default values. Ten is the default on my Debian
> system for maxfail, which means your method would work ten times.
From the man page (emphasis mine):
maxfail n
Terminate after n CONSECUTIVE FAILED connection attempts. A
value of 0 means no limit. The default value is 10.
First of all, it would make no sense at all for the system to
terminate after ten successful attempts. Secondly, it has never made it to
ten consecutive attempts, failed or otherwise. Finally, it isn't failing
after even a single connection attempt. It just hangs before even making
the attempt after what should be a graceful disconnect.
I do wonder, though, if I set the maxconnect value to some
moderately large value, rather than issuing an external SIGHUP, if pppd will
like it better? With the persist directive in place, will pppd exit
altogether, or will it terminate the connection and redial?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (4 preceding siblings ...)
2010-01-20 6:10 ` Leslie Rhorer
@ 2010-01-20 12:25 ` James Carlson
2010-01-21 2:20 ` Leslie Rhorer
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: James Carlson @ 2010-01-20 12:25 UTC (permalink / raw)
To: linux-ppp
Leslie Rhorer wrote:
> nothing whatsoever. The only way (of which I know) to release the terminal
> (/cev/ttyACM0) is to send a SIGKILL. After doing so, /dev/ttyACM0 is
> released, and I can use a utility such as minicom to access the modem. I
> can dial out and get a carrier. I can see the ppp authentication request
> from the ISP. What I cannot do, however, is get pppd to come back up. If I
> start pppd again, it opens the /dev/ttyACM0 device and creates the lockfile,
> but it does not attempt to run chat or evidently do anything else other than
> refresh the lockfile if it is stale. My only option at that point is to
If you attach a debugger to it, can you find out where it's stuck? (Or
at least run "pstack `pgrep pppd`"?)
The symptoms sound like a kernel bug, but it's hard to tell.
--
James Carlson 42.703N 71.076W <carlsonj@workingcode.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (5 preceding siblings ...)
2010-01-20 12:25 ` James Carlson
@ 2010-01-21 2:20 ` Leslie Rhorer
2010-01-21 2:47 ` Leslie Rhorer
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-21 2:20 UTC (permalink / raw)
To: linux-ppp
> -----Original Message-----
> From: linux-ppp-owner@vger.kernel.org [mailto:linux-ppp-
> owner@vger.kernel.org] On Behalf Of James Carlson
> Sent: Wednesday, January 20, 2010 6:26 AM
> To: Leslie Rhorer
> Cc: linux-ppp@vger.kernel.org
> Subject: Re: pppd hangs on SIGHUP
>
> Leslie Rhorer wrote:
> > nothing whatsoever. The only way (of which I know) to release the
> terminal
> > (/cev/ttyACM0) is to send a SIGKILL. After doing so, /dev/ttyACM0 is
> > released, and I can use a utility such as minicom to access the modem.
> I
> > can dial out and get a carrier. I can see the ppp authentication
> request
> > from the ISP. What I cannot do, however, is get pppd to come back up.
> If I
> > start pppd again, it opens the /dev/ttyACM0 device and creates the
> lockfile,
> > but it does not attempt to run chat or evidently do anything else other
> than
> > refresh the lockfile if it is stale. My only option at that point is to
>
> If you attach a debugger to it, can you find out where it's stuck? (Or
> at least run "pstack `pgrep pppd`"?)
I'll try that. Right now the system is in the middle of a 72 hour
test, but after that I'll force a hang and see what I get.
> The symptoms sound like a kernel bug, but it's hard to tell.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (6 preceding siblings ...)
2010-01-21 2:20 ` Leslie Rhorer
@ 2010-01-21 2:47 ` Leslie Rhorer
2010-01-21 12:39 ` James Carlson
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-21 2:47 UTC (permalink / raw)
To: linux-ppp
> >
> > If you attach a debugger to it, can you find out where it's stuck? (Or
> > at least run "pstack `pgrep pppd`"?)
>
> I'll try that. Right now the system is in the middle of a 72 hour
> test, but after that I'll force a hang and see what I get.
>
>
> > The symptoms sound like a kernel bug, but it's hard to tell.
>
Well, I set pppd to disconnect after 11 hours, 17 minutes, 11
seconds, and when it did, the process hung, again. It won't respond to
SIGTERM or SIGHUP. The command "pstack `pgrep pppd`" returns:
2875: /usr/sbin/pppd call cricket
(No symbols found)
0xb7f14424: ???? (8, 2, 808e580, bff2eaa8, 97aeea0, 97aeeb8)
0x08069654: ???? (8, ffffffff)
0x0806d751: ???? (807bee4, 0, 0, bff2eaf8, 808b884, ffffffff)
0x08062ca9: ???? (0, 0, 0, 806656f, 80813ae, 807c098) + 10
0x0805164b: ???? (80905e0, 80905e4, c, b3b, 0, c) + b0
0x0805226f: ???? (807bc70, 804f930, bff2ec38, b7d50455, 3, bff2ec64) + 50
0xb7d50455: ???? (8051890, 3, bff2ec64, 807bc70, 807bc60, b7f23250) +
400d13a8
Here is the output from lsof for pppd:
pppd 2875 root cwd DIR 3,2 4096 2 /
pppd 2875 root rtd DIR 3,2 4096 2 /
pppd 2875 root txt REG 3,2 269156 300045
/usr/sbin/pppd
pppd 2875 root mem REG 3,2 42504 246945
/lib/i686/cmov/libnss_files-2.7.so
pppd 2875 root mem REG 3,2 38444 246947
/lib/i686/cmov/libnss_nis-2.7.so
pppd 2875 root mem REG 3,2 87800 246942
/lib/i686/cmov/libnsl-2.7.so
pppd 2875 root mem REG 3,2 30436 246943
/lib/i686/cmov/libnss_compat-2.7.so
pppd 2875 root mem REG 3,2 1413540 246936
/lib/i686/cmov/libc-2.7.so
pppd 2875 root mem REG 3,2 166340 99420
/usr/lib/libpcap.so.0.9.8
pppd 2875 root mem REG 3,2 9680 246939
/lib/i686/cmov/libdl-2.7.so
pppd 2875 root mem REG 3,2 40440 237629
/lib/libpam.so.0.81.12
pppd 2875 root mem REG 3,2 38296 246938
/lib/i686/cmov/libcrypt-2.7.so
pppd 2875 root mem REG 3,2 8192 319525
/var/run/pppd2.tdb
pppd 2875 root mem REG 3,2 113248 237570
/lib/ld-2.7.so
pppd 2875 root 0u CHR 1,3 586
/dev/null
pppd 2875 root 1u CHR 1,3 586
/dev/null
pppd 2875 root 2u CHR 1,3 586
/dev/null
pppd 2875 root 3u unix 0xd391e900 8193
socket
pppd 2875 root 4u CHR 1,3 586
/dev/null
pppd 2875 root 5u sock 0,4 8204
can't identify protocol
pppd 2875 root 6u sock 0,4 8205
can't identify protocol
pppd 2875 root 7u REG 3,2 8192 319525
/var/run/pppd2.tdb
pppd 2875 root 8u CHR 166,0 4814
/dev/ttyACM0
grep 9141 root 1w REG 3,2 475 308542
/etc/ppp/pppdhang.txt
I am not deeply familiar with Linux. What is a good debugger
available for it, preferably from a Debian mirror?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (7 preceding siblings ...)
2010-01-21 2:47 ` Leslie Rhorer
@ 2010-01-21 12:39 ` James Carlson
2010-01-21 15:19 ` Leslie Rhorer
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: James Carlson @ 2010-01-21 12:39 UTC (permalink / raw)
To: linux-ppp
Leslie Rhorer wrote:
> 2875: /usr/sbin/pppd call cricket
> (No symbols found)
> 0xb7f14424: ???? (8, 2, 808e580, bff2eaa8, 97aeea0, 97aeeb8)
> 0x08069654: ???? (8, ffffffff)
> 0x0806d751: ???? (807bee4, 0, 0, bff2eaf8, 808b884, ffffffff)
> 0x08062ca9: ???? (0, 0, 0, 806656f, 80813ae, 807c098) + 10
> 0x0805164b: ???? (80905e0, 80905e4, c, b3b, 0, c) + b0
> 0x0805226f: ???? (807bc70, 804f930, bff2ec38, b7d50455, 3, bff2ec64) + 50
> 0xb7d50455: ???? (8051890, 3, bff2ec64, 807bc70, 807bc60, b7f23250) +
> 400d13a8
Compiling pppd first with "-g" would probably have been a good idea. It
looks like this is a system call on fd 8, which is the modem device:
> pppd 2875 root 8u CHR 166,0 4814
> /dev/ttyACM0
... but that's just a guess.
> I am not deeply familiar with Linux. What is a good debugger
> available for it, preferably from a Debian mirror?
The GNU debugger 'gdb' is decent.
--
James Carlson 42.703N 71.076W <carlsonj@workingcode.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (8 preceding siblings ...)
2010-01-21 12:39 ` James Carlson
@ 2010-01-21 15:19 ` Leslie Rhorer
2010-01-22 1:50 ` Leslie Rhorer
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-21 15:19 UTC (permalink / raw)
To: linux-ppp
> -----Original Message-----
> From: linux-ppp-owner@vger.kernel.org [mailto:linux-ppp-
> owner@vger.kernel.org] On Behalf Of James Carlson
> Sent: Thursday, January 21, 2010 6:40 AM
> To: Leslie Rhorer
> Cc: linux-ppp@vger.kernel.org
> Subject: Re: pppd hangs on SIGHUP
>
> Leslie Rhorer wrote:
> > 2875: /usr/sbin/pppd call cricket
> > (No symbols found)
> > 0xb7f14424: ???? (8, 2, 808e580, bff2eaa8, 97aeea0, 97aeeb8)
> > 0x08069654: ???? (8, ffffffff)
> > 0x0806d751: ???? (807bee4, 0, 0, bff2eaf8, 808b884, ffffffff)
> > 0x08062ca9: ???? (0, 0, 0, 806656f, 80813ae, 807c098) + 10
> > 0x0805164b: ???? (80905e0, 80905e4, c, b3b, 0, c) + b0
> > 0x0805226f: ???? (807bc70, 804f930, bff2ec38, b7d50455, 3, bff2ec64) +
> 50
> > 0xb7d50455: ???? (8051890, 3, bff2ec64, 807bc70, 807bc60, b7f23250) +
> > 400d13a8
>
> Compiling pppd first with "-g" would probably have been a good idea.
I'll try re-compiling it.
> It looks like this is a system call on fd 8, which is the modem device:
>
> > pppd 2875 root 8u CHR 166,0 4814
> > /dev/ttyACM0
>
> ... but that's just a guess.
>
> > I am not deeply familiar with Linux. What is a good debugger
> > available for it, preferably from a Debian mirror?
>
> The GNU debugger 'gdb' is decent.
I'll scarf it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (9 preceding siblings ...)
2010-01-21 15:19 ` Leslie Rhorer
@ 2010-01-22 1:50 ` Leslie Rhorer
2010-01-22 2:13 ` James Cameron
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-22 1:50 UTC (permalink / raw)
To: linux-ppp
> Leslie Rhorer wrote:
> > 2875: /usr/sbin/pppd call cricket
> > (No symbols found)
> > 0xb7f14424: ???? (8, 2, 808e580, bff2eaa8, 97aeea0, 97aeeb8)
> > 0x08069654: ???? (8, ffffffff)
> > 0x0806d751: ???? (807bee4, 0, 0, bff2eaf8, 808b884, ffffffff)
> > 0x08062ca9: ???? (0, 0, 0, 806656f, 80813ae, 807c098) + 10
> > 0x0805164b: ???? (80905e0, 80905e4, c, b3b, 0, c) + b0
> > 0x0805226f: ???? (807bc70, 804f930, bff2ec38, b7d50455, 3, bff2ec64) +
> 50
> > 0xb7d50455: ???? (8051890, 3, bff2ec64, 807bc70, 807bc60, b7f23250) +
> > 400d13a8
>
> Compiling pppd first with "-g" would probably have been a good idea.
OK, pardon my inexperience with C again, but I thought the compiler
options would be fairly obvious. They aren't, at least not to me. I looked
in the Makefile to see if there were any obvious compiler directives, but
there aren't. Nothing jumped out at me in the rules file, either.
Evidently, make is choosing the compile parameters, and I don't really know
where to insert a directive to force gcc to produce native debugging
symbols. Into which file (and what place, if it matters) do I insert the
directive and what syntax do I use?
The contents of the Makefile are just:
#!/usr/bin/make -f
all: sh.vars mk.vars
clean:
rm -f sh.vars mk.vars
mk.vars: vars.build vars
$(SHELL) vars.build vars make > $@
sh.vars: vars.build vars
$(SHELL) vars.build vars shell > $@
The rules file is:
#!/usr/bin/make -f
SHELL=/bin/bash -e
BUILD_UDEB := 1
include debian/scripts/vars
BUILD_DIR := $(SOURCE_DIR)/$(TAR_DIR)
B := $(BUILD_DIR)
D := $(CURDIR)/debian/ppp
PPPDDIR := 2.4.4
# Various collections of files for use with dh_* tools.
DOCS := FAQ README SETUP PLUGINS README.MPPE README.MSCHAP8? README.cbcp \
README.pppoe README.pwfd
DOCS2 := README.STATIC-IP README.win9x defaultroute
all: build
unpack: $(STAMP_DIR)/unpack
$(STAMP_DIR)/unpack:
$(MAKE) -f debian/sys-build.mk source.make
touch $@
# used by the maintainer
unpack.nopatch:
$(MAKE) -f debian/sys-build.mk source.build
# used by the maintainer
diff:
$(MAKE) -f debian/sys-build.mk make-diff
clean:
$(MAKE) -f debian/sys-build.mk source.clean
dh_clean
configure: $(STAMP_DIR)/configure
$(STAMP_DIR)/configure: $(STAMP_DIR)/unpack
dh_testdir
-$(MAKE) clean
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
./configure --prefix=/usr \
"
ifdef BUILD_UDEB
cd $B && if [ ! -d pppd-udeb/ ]; then \
mkdir pppd-udeb/ && \
cd pppd-udeb/ && \
sh $(CURDIR)/extra/lndir.sh ../pppd; \
fi
endif
touch $@
build: $(STAMP_DIR)/build
$(STAMP_DIR)/build: $(STAMP_DIR)/configure
dh_testdir
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
$(MAKE) \
"
touch $@
udeb: build-udeb
build-udeb: $(STAMP_DIR)/build-udeb
$(STAMP_DIR)/build-udeb: $(STAMP_DIR)/configure
ifdef BUILD_UDEB
dh_testdir
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
cd pppd-udeb/ && \
$(MAKE) COPTS=\"-Os -fomit-frame-pointer\" \
CHAPMS= USE_CRYPT= NO_CRYPT_HACK=1 MPPE= \
FILTER= HAVE_MULTILINK= USE_TDB= \
HAS_SHADOW= USE_PAM= HAVE_INET6= \
CBCP= USE_SRP= MAXOCTETS= USE_BUILTIN_CRYPTO=1 \
&& \
cd plugins/ && \
$(MAKE) COPTS=\"-Os -fomit-frame-pointer\" \
SUBDIRS='rp-pppoe pppoatm' PLUGINS= \
"
endif
touch $@
install: $(STAMP_DIR)/build $(STAMP_DIR)/build-udeb checkroot
dh_testdir
dh_clean -k
dh_installdirs
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
$(MAKE) install DESTDIR=$D/usr/ \
"
{ echo "Changelog extracted from README file:" ; \
echo ; \
sed -e "/^What's new in ppp-/,/package, see the Changes-2.3
file./!d" $B/README ; \
} > $B/changelog-from-README
binary-arch: install
rm -rf $D/etc/ppp/*-secrets
mv $D/usr/include/ $D-dev/usr/
install -m755 extra/pon extra/plog extra/poff $D/usr/bin/
cp extra/pon.completion $D/etc/bash_completion.d/pon
cp extra/options $D/etc/ppp/
install -m755 extra/ip-up extra/ip-down extra/ipv6-up
extra/ipv6-down \
$D/etc/ppp/
install -m755 extra/0000usepeerdns-up
$D/etc/ppp/ip-up.d/0000usepeerdns
install -m755 extra/0000usepeerdns-down \
$D/etc/ppp/ip-down.d/0000usepeerdns
install -m755 extra/apm $D/etc/apm/event.d/ppp
install -m644 extra/pap-secrets extra/chap-secrets \
extra/provider.peer extra/provider.chatscript \
$D/usr/share/ppp/
install -m644 extra/chatscript.pap $D/etc/chatscripts/pap
dh_installchangelogs -p ppp \
$B/changelog-from-README Changes-2.3
dh_installdocs -p ppp \
$(addprefix $B/,$(DOCS)) $(addprefix extra/,$(DOCS2))
dh_installexamples $B/scripts/ extra/autopppd extra/userscripts-* \
extra/popp extra/filters extra/options.ttyXX \
extra/peers-* extra/interfaces extra/per-linkname
# use our own version, not the upstream one
mv $D/usr/share/doc/ppp/examples/autopppd \
$D/usr/share/doc/ppp/examples/scripts/
dh_installman extra/pon.1 extra/pppoe-discovery.8
dh_link
dh_installlogrotate
dh_installinit --init-script=pppd-dns --no-start \
--update-rcd-params='start 38 S .'
dh_installpam
ifdef BUILD_UDEB
dh_installdirs -p ppp-udeb etc/ppp/peers/ usr/sbin/ \
usr/lib/pppd/$(PPPDDIR)/ usr/lib/post-base-installer.d/
grep '^[a-zA-Z0-9]' extra/options > $D-udeb/etc/ppp/options
# cp $B/chat/chat $D-udeb/usr/sbin/
cp $B/pppd-udeb/pppd $D-udeb/usr/sbin/
cp $B/pppd-udeb/pppd $B/pppd-udeb/plugins/rp-pppoe/pppoe-discovery \
$D-udeb/usr/sbin/
cp $B/pppd-udeb/plugins/rp-pppoe/rp-pppoe.so \
$B/pppd-udeb/plugins/pppoatm/pppoatm.so \
$D-udeb/usr/lib/pppd/$(PPPDDIR)/
cp extra/ppp-udeb.ip-up \
$D-udeb/etc/ppp/ip-up
chmod 0755 $D-udeb/etc/ppp/ip-up
install -m755 extra/ppp-udeb-postbaseinst \
$D-udeb/usr/lib/post-base-installer.d/30ppp
dh_installdebconf
endif
dh_strip -a
dh_compress -a
dh_fixperms -a
chown root:dip $D/usr/sbin/pppd \
$D/etc/ppp/ $D/etc/ppp/peers/ $D/etc/chatscripts/
chmod 4754 $D/usr/sbin/pppd
chmod 2750 $D/etc/ppp/peers/ $D/etc/chatscripts/
dh_md5sums -a
dh_shlibdeps -a
dh_installdeb -a
dh_gencontrol -a
dh_builddeb -a
binary-indep: install
dh_installchangelogs -i $B/changelog-from-README Changes-2.3
dh_installdocs -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_builddeb -i
checkroot:
test root = "`whoami`"
binary: binary-arch binary-indep
.PHONY: binary binary-arch binary-indep unpack configure build clean
checkroot
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (10 preceding siblings ...)
2010-01-22 1:50 ` Leslie Rhorer
@ 2010-01-22 2:13 ` James Cameron
2010-01-22 4:36 ` Leslie Rhorer
2010-01-23 17:40 ` Leslie Rhorer
13 siblings, 0 replies; 15+ messages in thread
From: James Cameron @ 2010-01-22 2:13 UTC (permalink / raw)
To: linux-ppp
I must be looking at different source. Ah, yes, I am. You're using
Debian patched source, I guess. Here's what I do to compile pppd with
debugging ...
git clone git://ozlabs.org/~paulus/ppp.git
... then ./configure and make ... and the -g flag is already used. You
may be using source that has had debugging disabled. Distribution
source often does this.
--
James Cameron
http://quozl.linux.org.au/
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (11 preceding siblings ...)
2010-01-22 2:13 ` James Cameron
@ 2010-01-22 4:36 ` Leslie Rhorer
2010-01-23 17:40 ` Leslie Rhorer
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-22 4:36 UTC (permalink / raw)
To: linux-ppp
> -----Original Message-----
> From: quozl@us.netrek.org [mailto:quozl@us.netrek.org] On Behalf Of James
> Cameron
> Sent: Thursday, January 21, 2010 8:13 PM
> To: Leslie Rhorer
> Cc: 'James Carlson'; linux-ppp@vger.kernel.org
> Subject: Re: pppd hangs on SIGHUP
>
> I must be looking at different source. Ah, yes, I am. You're using
> Debian patched source, I guess. Here's what I do to compile pppd with
> debugging ...
>
> git clone git://ozlabs.org/~paulus/ppp.git
>
> ... then ./configure and make ... and the -g flag is already used. You
> may be using source that has had debugging disabled. Distribution
> source often does this.
>
> --
> James Cameron
> http://quozl.linux.org.au/
Thanks. I think I got it working using the Debian source. It
compiled with the -g option, anyway. Right now I am running the command
under strace, and we can see what that reports during the next hang. When
it does hang, I'll run ddb against the hung process to see what it reports,
and I can post the contents of the strace files.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pppd hangs on SIGHUP
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
` (12 preceding siblings ...)
2010-01-22 4:36 ` Leslie Rhorer
@ 2010-01-23 17:40 ` Leslie Rhorer
13 siblings, 0 replies; 15+ messages in thread
From: Leslie Rhorer @ 2010-01-23 17:40 UTC (permalink / raw)
To: linux-ppp
[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]
> -----Original Message-----
> From: James Carlson [mailto:carlsonj@workingcode.com]
> Sent: Wednesday, January 20, 2010 6:26 AM
> To: Leslie Rhorer
> Cc: linux-ppp@vger.kernel.org
> Subject: Re: pppd hangs on SIGHUP
>
> Leslie Rhorer wrote:
> > nothing whatsoever. The only way (of which I know) to release the
> terminal
> > (/cev/ttyACM0) is to send a SIGKILL. After doing so, /dev/ttyACM0 is
> > released, and I can use a utility such as minicom to access the modem.
> I
> > can dial out and get a carrier. I can see the ppp authentication
> request
> > from the ISP. What I cannot do, however, is get pppd to come back up.
> If I
> > start pppd again, it opens the /dev/ttyACM0 device and creates the
> lockfile,
> > but it does not attempt to run chat or evidently do anything else other
> than
> > refresh the lockfile if it is stale. My only option at that point is to
>
> If you attach a debugger to it, can you find out where it's stuck? (Or
> at least run "pstack `pgrep pppd`"?)
>
> The symptoms sound like a kernel bug, but it's hard to tell.
I'm going to look at it with gdb on the next hang, but in the mean time,
here are some strace files I had generated automatically during a pair of
halts. The first (ppptrace.tar) was generated at the time of a hang caused
by the online time reaching the limit (36000) specified by maxconnect. The
second (ppptrace1.tar) was generated by a SIGHUP issued to the PID of pppd.
[-- Attachment #2: ppptrace.tar --]
[-- Type: application/octet-stream, Size: 10203 bytes --]
[-- Attachment #3: ppptrace1.tar --]
[-- Type: application/octet-stream, Size: 10223 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-01-23 17:40 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 5:20 pppd hangs on SIGHUP Leslie Rhorer
2010-01-20 5:34 ` Bill Unruh
2010-01-20 5:43 ` James Cameron
2010-01-20 5:47 ` James Cameron
2010-01-20 5:53 ` Leslie Rhorer
2010-01-20 6:10 ` Leslie Rhorer
2010-01-20 12:25 ` James Carlson
2010-01-21 2:20 ` Leslie Rhorer
2010-01-21 2:47 ` Leslie Rhorer
2010-01-21 12:39 ` James Carlson
2010-01-21 15:19 ` Leslie Rhorer
2010-01-22 1:50 ` Leslie Rhorer
2010-01-22 2:13 ` James Cameron
2010-01-22 4:36 ` Leslie Rhorer
2010-01-23 17:40 ` Leslie Rhorer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox