Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Sep 2006 11:18:54 -0500
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        dandee@volny.cz
Cc:        current@freebsd.org
Subject:   Re: watchdogd_flags followed by panic watchdog timeout, after reboot my rc.conf disappear
Message-ID:  <20060903161854.GA45627@lor.one-eyed-alien.net>
In-Reply-To: <000001c6ce23$525f1ca0$6508280a@tocnet28.jspoj.czf>
References:  <000001c6ce23$525f1ca0$6508280a@tocnet28.jspoj.czf>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Sep 02, 2006 at 02:04:10AM +0200, Daniel Dvo??k wrote:
> Hi all,
> =20
> first of all, I?m sorry maybe for my bad English.
> =20
> We have 2 routers which I maintain in our mesh wireless community network.
> =20
> The Router 1 has 2 atheros adapters, ath0=3Dwistron cm9, ath1=3Dwistron c=
m10, of
> course some sisX, fxpX and so on.
> The Router 2 has 1 atheros adapter, ath0=3Dwistron CM10.
> =20
> My R1 panics and even more it freezes very often. Maybe the reason for
> panicing and freezing is the same and maybe not.
> =20
> This is not important now, this story is about R2.
> =20
> I started to use "option SW_WATCHDOG" in both my custom kernels on the R1
> and R2 recently in hope, it is some walkaround for freezing at least if n=
ot
> for panicing.
> =20
> In the /etc/defaults/rc.conf there are not "watchdogd_flags=3D""" option,=
 but
> I tried to wrote it to my /etc/rc.conf in this way:
> =20
> watchdogd_enable=3D"YES"
> watchdogd_flags=3D"-e ping 10.40.0.72 -s 2 -t 1"

This flags almost guarantee a reboot.  First, the syntax is wrong
because the command needs to be quoted.  Second, the timeouts are very
short (way too short in fact there's not much point in timeout much less
than the time to reboot).

> I saved my rc.conf without any doubt.
> =20
> I did so, because I wanted to instruct watchdogd to execute my command,
> common pinging some IP address. I was not satisfied with a trivial file
> system check instead.
> =20
> After saving the rc.conf file, I restarted watchdogd deamon at once.
> =20
> ... and ... 2 seconds ... my ssh client was disconnected ... unexpected e=
nd
> of ssh session. :)
> =20
> Okay, maybe something wrong, maybe I did a mistake and it panicked.
>
> I was waitting for 3 minutes, but R2 did not react at all.
> =20
> So I went to R2 and I powered off and powered on ... but still it was the
> same.
> =20
> After I attached monitor and keyboard, I saw that ifconfig did not config=
ure
> any interfaces. Why ?
> =20
> Answear: Because rc.conf had 0 Bytes !!!
> =20
> -rw-r--r--  1 root  wheel      6174 Sep  1 XX:XX rc.conf , I do not remem=
ber
> time of last modification of file.
> =20
> So the content of rc.conf was completly gone !!!
> =20
> Is it possible at all ?

Most likely, the watchdog was not reset for some reason (perhaps the ping
failed) and thus the system preformed as advertised and performed the
most aggressive reset available to it.  Not attempt what so ever was
made to perform any sort of shutdown or cleanup.  Because of that your
modified rc.conf was not written to disk and the metadata was probably
in an inconsistent state resulting in a missing file.  This is expected
behavior in this case.

-- Brooks

> =20
> Now I am scared that any modification rc.conf will be mean loss of conten=
t.
> =20
> I have kernel dump and backtrace of panic.
> =20
> It is in the attachment.
> =20
> =20
> If I could help with this, I will do it.
> =20
> And please explain me somebody, how I lost the content of rc.conf file. :=
-O
> Thank you.
> =20
> Daniel
> =20
> P.S.: I am not currently subscribed in the freebsd-stable mailling list, =
so
> use my e-mail address. I am ok with freebsd-current mailling list.

> # cd /usr/obj/usr/src/sys/mykernel/
> # kgdb kernel.debug /var/crash/vmcore.0
> [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.s=
o: Unde                                                                    =
         fined symbol "ps_pglobal_lookup"]
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you =
are
> welcome to change it and/or distribute copies of it under certain conditi=
ons.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for detail=
s.
> This GDB was configured as "i386-marcel-freebsd".
>=20
> Unread portion of the kernel message buffer:
> interrupt                   total
> irq14: ata0                       325735
> irq16: fxp1                            5
> irq17: ath0                     50298459
> irq18: wi0                       3904083
> irq19: sis0 fxp0                20167051
> cpu0: timer                    604044908
> Total                   678740241
> panic: watchdog timeout
> Uptime: 3d11h53m45s
> Dumping 223 MB (2 chunks)
>   chunk 0: 1MB (159 pages) ... ok
>   chunk 1: 223MB (57072 pages) 207 191 175 159 143 127 111 95 79 63 47 31=
 15
>=20
> #0  doadump () at pcpu.h:165
> 165             __asm __volatile("movl %%fs:0,%0" : "=3Dr" (td));
> (kgdb) backtrace
> #0  doadump () at pcpu.h:165
> #1  0xc059c4ee in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c=
:402
> #2  0xc059c7a6 in panic (fmt=3D0xc081050d "watchdog timeout")
>     at /usr/src/sys/kern/kern_shutdown.c:558
> #3  0xc0571642 in watchdog_fire () at /usr/src/sys/kern/kern_clock.c:583
> #4  0xc0571130 in hardclock (frame=3D0xc1f44780)
>     at /usr/src/sys/kern/kern_clock.c:279
> #5  0xc07a4631 in lapic_handle_timer (frame=3D
>       {cf_vec =3D 0, cf_fs =3D 8, cf_es =3D 40, cf_ds =3D 40, cf_edi =3D =
-1040320488, cf_esi =3D -1040320512, cf_ebp =3D -890192676, cf_ebx =3D 0, c=
f_edx =3D 0, cf_ecx =3D -1041016416, cf_eax =3D 1000, cf_eip =3D -106328319=
5, cf_cs =3D 32, cf_eflags =3D 524818, cf_esp =3D -890192644, cf_ss =3D -10=
63305969}) at /usr/src/sys/i386/i386/local_apic.c:623
> #6  0xc079eb30 in Xtimerint () at apic_vector.s:137
> #7  0xc09f9605 in ?? ()
> #8  0xcaf0bd04 in ?? ()
> #9  0xc07a609f in cpu_idle () at /usr/src/sys/i386/i386/machdep.c:1134
> Previous frame inner to this frame (corrupt stack?)
> (kgdb) quit

> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


--bg08WKrSYDhXBjb5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFE+wBtXY6L6fI4GtQRAhEqAJ4/OlsH+LvZskrbD62r6WoK24zXhQCfciTU
6jX+zgz3lOQIjnRg97tlKKg=
=Zhgc
-----END PGP SIGNATURE-----

--bg08WKrSYDhXBjb5--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20060903161854.GA45627>