[Armadillo:07721] Re:Armadillo-440+L-05AでFORM網へ常時接続して12時間以上経過するとPPPdが停止する

郡司 和博 email@hidden
2011年 11月 15日 (火) 10:58:35 JST


お世話になります。郡司です。

返信ありがとうございます。

> 固まる時のログ内容はありますか?
> debugオプションを有効にした状態で
> ログを取ってみるのもいいかもしれません。
> 
> まずはpppdが実際にどの処理で固まっているかを
> 特定した方がいいと思います。
PPPdにログを仕込んで停止している箇所を追うとfsm.cのfsm_open関数が呼び出された後の
PPPdのOpened状態のどこかで停止しているようです。
もう少し詳細なログを入れて調べてみたいと思います。

===ログ内容=======================================================

Nov 15 08:56:19 localhost pppd[18846]: rcvd [LCP TermReq id=0x2c]
Nov 15 08:56:19 localhost pppd[18846]: LCP terminated by peer
Nov 15 08:56:19 localhost pppd[18846]: ipcp: down
Nov 15 08:56:19 localhost pppd[18846]: Connect time 721.6 minutes.
Nov 15 08:56:19 localhost pppd[18846]: Sent 17077159 bytes, received 15220979 bytes.
Nov 15 08:56:19 localhost pppd[18846]: Script /etc/ppp/ip-down started (pid 30347)
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_lowerdown
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_close
Nov 15 08:56:19 localhost pppd[18846]: CCP: Down event in state 1!
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_lowerdown
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_close
Nov 15 08:56:19 localhost pppd[18846]: sent [LCP TermAck id=0x2c]
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_sdata
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_rtermreq
Nov 15 08:56:19 localhost pppd[18846]: host: TERMREQ
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_input
Nov 15 08:56:19 localhost pppd[18846]: Hangup (SIGHUP)
Nov 15 08:56:19 localhost pppd[18846]: Modem hangup
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_lowerdown
Nov 15 08:56:19 localhost pppd[18846]: Connection terminated.
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_close
Nov 15 08:56:19 localhost pppd[18846]: host: fsm_close
Nov 15 08:56:19 localhost pppd[18846]: host: call lcp_close()
Nov 15 08:56:19 localhost pppd[18846]: host: restore FSMs to original state
Nov 15 08:56:19 localhost pppd[18846]: Script /etc/ppp/ip-down finished (pid 30347), status = 0x0
Nov 15 08:56:49 localhost pppd[18846]: host: fsm_open

=== ppp-2.4.4 fsm.c =============================================

/*
 * fsm_open - Link is allowed to come up.
 */
void
fsm_open(f)
    fsm *f;
{
########〜略〜########
    case CLOSING:
	f->state = STOPPING;
	/* fall through */
    case STOPPED:
    case OPENED:
	if( f->flags & OPT_RESTART ){
	    fsm_lowerdown(f);
	    fsm_lowerup(f);
	}
	break;
    }

/*--LOG----------------------------------------------*/
syslog(LOG_NOTICE, "host: fsm_open");
/*----------------------------------------------------*/

}
=== ppp-2.4.4 main.c ===========================================

int
main(argc, argv)
    int argc;
    char *argv[];
{
########〜略〜########
	/* restore FSMs to original state */
	lcp_close(0, "");

/*-- LOG -----------------------------------------------------------------*/
	syslog(LOG_NOTICE, "host: call lcp_close()" );
	syslog(LOG_NOTICE, "host: restore FSMs to original state " );
/*------------------------------------------------------------------------*/

	if (!persist || asked_to_quit || (maxfail > 0 && unsuccess >= maxfail))
/*-- LOG -----------------------------------------------------------------*/
	{
	    syslog(LOG_NOTICE, "persist= %d, host: maxfail=%d", persist, maxfail );
	    break;
	}

	if (demand)
	    demand_discard();
        t = need_holdoff? holdoff: 0;
        if (holdoff_hook)
	    t = (*holdoff_hook)();
	if (t > 0) {
	    new_phase(PHASE_HOLDOFF);
	    TIMEOUT(holdoff_end, NULL, t);
	    do {
		handle_events();
		if (kill_link)
		    new_phase(PHASE_DORMANT); /* allow signal to end holdoff */
	    } while (phase == PHASE_HOLDOFF);
	    if (!persist)
		break;
	}

/*------------------------------------------------------------------------*/
====================================================================




armadillo メーリングリストの案内