Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Dec 2006 16:23:59 +0100
From:      Max Laier <max@love2party.net>
To:        freebsd-stable@freebsd.org, freebsd@orchid.homeunix.org
Cc:        Ivan Voras <ivoras@fer.hr>
Subject:   Re: 6.2-PRE: Fatal Trap?
Message-ID:  <200612301624.05352.max@love2party.net>
In-Reply-To: <459673A4.8030009@orchid.homeunix.org>
References:  <20061230035722.L39715@thebighonker.lerctr.org> <en5ldl$1tp$1@sea.gmane.org> <459673A4.8030009@orchid.homeunix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1189847.iZf8q8EyP2
Content-Type: multipart/mixed;
  boundary="Boundary-01=_RSolFyr9uRK/2IE"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--Boundary-01=_RSolFyr9uRK/2IE
Content-Type: text/plain;
  charset="iso-8859-6"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Saturday 30 December 2006 15:11, Karol Kwiatkowski wrote:
> Ivan Voras wrote:
> > Karol Kwiatkowski wrote:
> >> This works: FreeBSD 6.2-PRERELEASE #0: Thu Dec 14 11:34:36 CET 2006
> >> This doesn't: FreeBSD 6.2-PRERELEASE #0: Sat Dec 30 11:27:11 CET
> >> 2006
> >>
> >> I'm not sure it that's all that matters, I can supply more
> >> information if needed.
> >
> > Yes, you'll need to send at least a kernel stack backtrace. See here:
> > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/
> >kerneldebug-online-ddb.html
> >
> > Get it to start the debugger on panic and post the backtrace (bt).
>
> Thanks for the link, I hope I've done it right. Here it is:
>
>
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   =3D 0x74
> fault code              =3D supervisor read, page not present
> instruction pointer     =3D 0x20:0xc055d18d
> stack pointer           =3D 0x28:0xe989dbbc
> frame pointer           =3D 0x28:0xe989dbc0
> code segment            =3D base 0x0, limit 0xfffff, type 0x1b
>                         =3D DPL 0, pres 1, def32 1, gran 1
> processor eflags        =3D resume, IOPL =3D 0
> current process         =3D 637 (ntpd)
> [thread pid 637 tid 100059 ]
> Stopped at      turnstile_setowner+0xd: movl    0x74(%ecx),%eax
> db> bt
> Tracing pid 637 tid 100059 td 0xc4de2780
> turnstile_setowner(c4de9240,0,c4dc9240,c07201e0,c5102090,...) at
> turnstile_setowner+0xd
> turnstile_wait(c5101090,0,c5101000,c07234e0,e989dc24,...) at
> turnstile_wait+0xca
> _mtx_lock_sleep(c5102090,c4de2780,0,0,0,...) at _mtx_lock_sleep+0xb4
> in_pcballoc(c4e892c8,c07234e0,10000,c06c8de5,38,...) at
> in_pcballoc+0xbe tcp_attach(c4e892c8,c4e8933c,c06c8de5,0,c4e892c8,...)
> at tcp_attach+0x58 tcp_usr_attach(c4e892c8,0,c4de2780,0,0,...) at
> tcp_usr_attach+0x63 socreate(2,e989dcb8,1,0,c4ab1c90,...) at
> socreate+0x167
> socket(c4de2780,e989dd04,c,c4de2780,80d3000,...) at socket+0xb3
> syscall(3b,3b,3b,0,7,...) at syscall+0x380
> Xint0x80_syscall() at Xint0x80_syscall+0x1f
> --- syscall (97, FreeBSD ELF32, socket), eip =3D 0x282939d3, esp =3D
> 0xbfbfeb1c, ebp =3D 0xbfbfebf8 ---
> db >

Something like the attached should fix it.  Seems tcp was forgotten in a=20
recent change to INP locking.

=2D-=20
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

--Boundary-01=_RSolFyr9uRK/2IE
Content-Type: text/x-diff;
  charset="iso-8859-6";
  name="tcp_inp_init.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="tcp_inp_init.diff"

Index: tcp_subr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /usr/store/mlaier/fcvs/src/sys/netinet/tcp_subr.c,v
retrieving revision 1.228.2.12
diff -u -r1.228.2.12 tcp_subr.c
=2D-- tcp_subr.c	1 Oct 2006 05:33:50 -0000	1.228.2.12
+++ tcp_subr.c	30 Dec 2006 15:06:45 -0000
@@ -300,6 +300,15 @@
 		uma_zone_set_max(tcptw_zone, tcptw_auto_size());
 }
=20
+static int
+tcp_inpcb_init(void *mem, int size, int flags)
+{
+	struct inpcb *inp =3D mem;
+
+	INP_LOCK_INIT(inp, "inp", "tcpinp");
+	return (0);
+}
+
 void
 tcp_init()
 {
@@ -328,7 +337,7 @@
 	tcbinfo.porthashbase =3D hashinit(hashsize, M_PCB,
 					&tcbinfo.porthashmask);
 	tcbinfo.ipi_zone =3D uma_zcreate("inpcb", sizeof(struct inpcb),
=2D	    NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
+	    NULL, NULL, tcp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
 	uma_zone_set_max(tcbinfo.ipi_zone, maxsockets);
 #ifdef INET6
 #define TCP_MINPROTOHDR (sizeof(struct ip6_hdr) + sizeof(struct tcphdr))

--Boundary-01=_RSolFyr9uRK/2IE--

--nextPart1189847.iZf8q8EyP2
Content-Type: application/pgp-signature

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

iD8DBQBFloSVXyyEoT62BG0RAh8zAJ9L7mRNEVaGJNRpF8GkmsMafYW0SQCdFnH6
0yuhVYVUVdKcXWZijhSM2No=
=Sy9i
-----END PGP SIGNATURE-----

--nextPart1189847.iZf8q8EyP2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612301624.05352.max>