Bug 1589

Summary: holdoff option does not work
Product: Sisyphus Reporter: Sergey Vlasov <vsu>
Component: pppAssignee: Dmitry V. Levin <ldv>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: major    
Priority: P5 CC: mike, pilot, voins
Version: unstable   
Hardware: all   
OS: Linux   

Description Sergey Vlasov 2002-11-20 15:21:19 MSK
The pppd holdoff option does not seem to work in some cases:
- when pppd gets no answer to LCP ConfReq;
- when the pty command exits.

In both cases pppd (with the persist option) attempts to reconnect immediately, without waiting for the specified holdoff time.

Examples:

# pppd /dev/ttyS0 debug nodetach local persist holdoff 120
 (there is nothing connected to /dev/ttyS0)
using channel 14
Using interface ppp0
Connect: ppp0 &lt;--&gt; /dev/ttyS0
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xa325eb19&gt; &lt;pcomp&gt; &lt;accomp&gt;]
LCP: timeout sending Config-Requests
Connection terminated.
 (there should be a pause for 120 seconds here - but there is none)
using channel 15
Using interface ppp0
Connect: ppp0 &lt;--&gt; /dev/ttyS0
sent [LCP ConfReq id=0x2 &lt;asyncmap 0x0&gt; &lt;magic 0xccf8637a&gt; &lt;pcomp&gt; &lt;accomp&gt;]

# pppd pty \'sleep 1\' debug nodetach local persist holdoff 120
using channel 16
Using interface ppp0
Connect: ppp0 &lt;--&gt; /dev/pts/6
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0x1dad7046&gt; &lt;pcomp&gt; &lt;accomp&gt;]
Script sleep 1 finished (pid 4365), status = 0x0
Modem hangup
Connection terminated.
 (there should be a pause for 120 seconds here - but there is none)
using channel 17
Using interface ppp0
Connect: ppp0 &lt;--&gt; /dev/pts/6
sent [LCP ConfReq id=0x2 &lt;asyncmap 0x0&gt; &lt;magic 0x85ce85a3&gt; &lt;pcomp&gt; &lt;accomp&gt;]
Script sleep 1 finished (pid 4376), status = 0x0

# uname -a
Linux XXXXXX 2.4.18-alt8-up #1 Thu Aug 22 20:57:21 MSD 2002 i686 unknown unknown GNU/Linux
# cat /etc/ppp/options
lock

This happens with ppp-2.4.1-alt8 (from Sisyphus) and ppp-2.4.1-alt6 (from ALT Linux Master 2.0).
---

---

Comment 1 inger@altlinux.org 2004-05-14 17:50:11 MSD
to maintainer 
Comment 2 Sergey Vlasov 2004-05-14 17:57:23 MSD
Still fails in the same way with ppp-2.4.1.20031003-alt2 from Sisyphus.
Comment 3 Sergey Vlasov 2004-06-06 18:32:41 MSD
В ppp-2.4.2-alt1 стало ещё интереснее:

# pppd pty 'sleep 1' debug nodetach local persist holdoff 120
using channel 19
Using interface ppp0
Connect: ppp0 <--> /dev/pts/59
Script sleep 1 finished (pid 15721), status = 0x0
Modem hangup
Connection terminated.
using channel 20
Using interface ppp0
Connect: ppp0 <--> /dev/pts/60
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x6908bbb6> <pcomp> <accomp>]
Script sleep 1 finished (pid 15736), status = 0x0
Modem hangup
Connection terminated.
using channel 21
Using interface ppp0
Connect: ppp0 <--> /dev/pts/61
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xb91b8ca6> <pcomp> <accomp>]
...

Зедержки нет, как и раньше, но теперь при нажатии ^C выдаётся громадное
количество сообщений "Terminating on signal 2.", и в конечном итоге Segmentation
fault.
Comment 4 Alexey Voinov 2004-06-08 16:20:10 MSD
зацикливаниие сигналов я победил.

c holdoff всё хуже. значение holdoff принудительно сбрасывается в 0 уже после
разбора опций из-за ошибки в коде. Я могу поставить хак, который будет спасать
holdoff. Подозреваю, что там спрятано ещё много таких же граблей. Для
нормального исправления этой ошибки потребуется изменение значительного куска
кода pppd. Влезать в это очень не хочется.
Comment 5 Alexey Voinov 2004-06-08 16:39:09 MSD
fixed in ppp-2.4.2-alt2