hanging tcsetattr call
It seems when my chat script times out, i'll get an "alarm" notification from chat, then chat exits, and
pppd hangs for a while on a tcsetattr() call -- it's trying to restore the terminal characteristics of
our serial port.
Eventually it syslogs:
Mar 5 17:09:25 box pppd[21132]: tcsetattr: Interrupted system call (line
1001)
Evidentally the pppd can no longer use the device, perhaps it's been reset from having an session attempted
but not succeeding? Anyone else ever see this problem?
Should there be any signal flow that causes this to go correctly, e.g. a SIGCHLD going to the pppd?
Or does pppd just see a non-zero exit value from chat, and should gracefully shut itself down?
Thanks!
Signature · 2 lines
View this message in context: http://www.nabble.com/hanging-tcsetattr-call-tp15861511p15861511.html Sent from the linux-ppp mailing list archive at Nabble.com.
Quoted 6 lines · bfc
It seems when my chat script times out, i'll get an "alarm" notification from chat, then chat exits, and
pppd hangs for a while on atcsetattr()call -- it's trying to restore the terminal characteristics of
our serial port.
Tell us how you set up yoru chat script. It should not be terminating while pppd is running. It should start pppd when it successfully opens the port. So giving your details would be helpful.
Quoted 5 lines
Eventually it syslogs:
Mar 5 17:09:25 box pppd[21132]: tcsetattr: Interrupted system call (line1001)
Quoted 8 lines
Evidentally the pppd can no longer use the device, perhaps it's been reset from having an session attempted
but not succeeding? Anyone else ever see this problem?Should there be any signal flow that causes this to go correctly, e.g. a SIGCHLD going to the pppd?
Or does pppd just see a non-zero exit value from chat, and should gracefully shut itself down?
???? chat runs. If it successfully connects it starts up pppd an exits.
Quoted 3 lines
Thanks!
Signature · 4 lines
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273 Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324 UBC, Vancouver,BC | Program in Cosmology | [email protected] Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
Most of the time things work OK -- maybe the chat script needs work, may there's a resource issue on the
far end, but I think it'd be interesting to know what the error case should look like. If you reach the end of
the time specified by a TIMEOUT chat line (or the default TIMEOUT), then I should think chat would exit
with a non-zero, and pppd should promptly exit with an error, not hang on tcsetattr(). BTW, I'm not using
persist or any other option to keep things going.
My pppd option file looks something like:
noauth
debug
name foobar.com/dev/ttyS0 115200 crtscts
connect '/usr/sbin/chat -f /var/opt/foobar/chat-file
..and the chat-file:
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "BUSY"
'' ATH
OK AT&F0
OK ATDT5555
TIMEOUT 120
CONNECT \d\c
Signature · 2 lines
View this message in context: http://www.nabble.com/hanging-tcsetattr-call-tp15861511p15864699.html Sent from the linux-ppp mailing list archive at Nabble.com.
Quoted 9 lines · bfc
Most of the time things work OK -- maybe the chat script needs work, may there's a resource issue on the
far end, but I think it'd be interesting to know what the error case should look like. If you reach the end of
the time specified by a TIMEOUT chat line (or the default TIMEOUT), then I should think chat would exit
with a non-zero, and pppd should promptly exit with an error, not hang ontcsetattr(). BTW, I'm not using
PPP always tries to clean up after itself. It does not simply die. Thus you seem to be having some serial port problems.
Why don't you put in a TIMEOut of 2 and put garbage in that next line to see if it is the timout that is causing the trouble
TIMEOUT 2
y79876y '\d\c'
Quoted 3 lines
persist or any other option to keep things going.
My pppd option file looks something like:
Something like??? With computers
Assuming your "somthing like" was a misstatement:
Quoted 6 lines
noauth
debug
name foobar.com/dev/ttyS0115200 crtscts
connect '/usr/sbin/chat-f/var/opt/foobar/chat-file
You are missing a terminating end single quote.
Quoted 12 lines
..and the chat-file:
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "BUSY"
'' ATH
OK AT&F0
OK ATDT5555
TIMEOUT 120
CONNECT \d\c
The \d\c should be protected by single quotes
CONNECT '\d\c'
Also run chat with -v option, and put
local2.* /var/log/daemonlog
and show us the output in /var/log/daemonlog
so we can see what chat is trying to do.