Many people experience hung connections with no apparent explaination. The first thing to establish is which side of the link is hung.
If you are using an external modem, you can simply try using
ping
to see if the TD
light is flashing when you
transmit data. If it flashes (and the RD
light doesn't), the
problem is with the remote end. If TD
doesn't flash, the problem
is local. With an internal modem, you'll need to use the set
server
command in your ppp.conf
file. When the hang occurs,
connect to ppp using pppctl. If your network connection suddenly
revives (ppp was revived due to the activity on the diagnostic socket)
or if you can't connect (assuming the set socket
command
succeeded at startup time), the problem is local. If you can connect
and things are still hung, enable local async logging with set log
local async
and use ping
from another window or terminal to make
use of the link. The async logging will show you the data being
transmitted and received on the link. If data is going out and not
coming back, the problem is remote.
Having established whether the problem is local or remote, you now have to possibilities:
There's very little you can do about this. Most ISPs will
refuse to help if you're not running a Microsoft OS. You can
enable lqr
in your ppp.conf
file, allowing ppp to
detect the remote failure and hang up, but this detection is
relatively slow and therefore not that useful. You may want
to avoid telling your ISP that you're running user-ppp....
First, try disabling all local compression by adding the following to your configuration:
disable pred1 deflate deflate24 protocomp acfcomp shortseq vj deny pred1 deflate deflate24 protocomp acfcomp shortseq vj
Then reconnect to ensure that this makes no difference. If things improve or if the problem is solved completely, determine which setting makes the difference through trial and error. This will provide good amunition when you contact your ISP (although it may make it apparent that you're not running a Microsoft product).
Before contacting your ISP, enable async logging locally and wait until the connection hangs again. This may use up quite a bit of disk space. The last data read from the port may be of interest. It is usually ascii data, and may even describe the problem (``Memory fault, core dumped'' ?).
If your ISP is helpful, they should be able to enable logging on their end, then when the next link drop occurs, they may be able to tell you why their side is having a problem. Feel free to send the details to brian@Awfulhak.org, or even to ask your ISP to contact me directly.
Your best bet here is to rebuild ppp by adding CFLAGS+=-g
and STRIP=
to the end of the Makefile, then doing a
make clean && make && make install
. When
ppp hangs, find the ppp process id with ps ajxww | fgrep ppp
and run gdb ppp PID
. From the gdb prompt, you can then use
bt
to get a stack trace.
Send the results to brian@Awfulhak.org.