Skip to contentSkip to conversation

CVS 20040201, "Terminating on signal 2" loop

DISCUSSION James Cameron 1 participant 1 message Jan 1, 2004 PPP protocol drivers and compressors

lore
Share & tools
lore
#0 lore raw

I was just giving PPP in CVS a test run, started a connection through a pty, which established normally, and then pressed Control/C. pppd then reported "Terminating on signal 2." 10376 times and segfaulted.

Quite reproducible. So I did an strace and looked at the source. On receipt of a SIGINT from Control/C, term() calls kill_my_pg() to signal the process group.

It appears that despite kill_my_pg() calling sigaction() to ignore the signal being resent to the process group, the kernel sends pppd a SIGINT again.

667   --- SIGINT (Interrupt) @ 0 (0) ---
667   time([1072996209])                = 1072996209
667   getpid()                          = 667
667   rt_sigaction(SIGPIPE, {0x4013ebe0, [], SA_RESTORER, 0x40094498},
{SIG_IGN}
, 8) = 0
667   send(3, "<30>Jan  2 09:30:09 pppd[667]: T"..., 55, 0) = 55
667   rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
667   write(2, "Terminating on signal 2.", 24) = 24
667   write(2, "\n", 1)                 = 1
667   rt_sigaction(SIGINT, {SIG_IGN}, {0x8050290, [HUP INT USR2 TERM

CHLD], SA_R
ESTORER, 0x40094498}, 8) = 0
667 kill(0, SIGINT) = 0
667 rt_sigaction(SIGINT, {0x8050290, [HUP INT USR2 TERM CHLD],
SA_RESTORER, 0x
40094498}, NULL, 8) = 0
667 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
667 --- SIGINT (Interrupt) @ 0 (0) ---
[...]

667   --- SIGINT (Interrupt) @ 0 (0) ---
667   --- SIGSEGV (Segmentation fault) @ 0 (0) ---
667   --- SIGSEGV (Segmentation fault) @ 0 (0) ---
667   +++ killed by SIGSEGV +++

Kernel is 2.4.23 from Debian sources, with MPPE patch applied from PPP CVS. The connection was using MPPE, but I doubt that relates. Pentium 266MHz test machine.

If I try running under gdb, Control/C stops the program so gdb can take over, and "continue" results in normal disconnection and exit.

Anyone know the cause? It seems pppd is doing the right thing, but I don't recall whether sigaction() has immediate effect or not.

Signature · 3 lines
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/