From owner-freebsd-stable@FreeBSD.ORG Sat Dec 30 15:24:24 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FC9716A403 for ; Sat, 30 Dec 2006 15:24:24 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by mx1.freebsd.org (Postfix) with ESMTP id 02A3213C448 for ; Sat, 30 Dec 2006 15:24:23 +0000 (UTC) (envelope-from max@love2party.net) Received: from [88.64.187.186] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis), id 0MKxQS-1H0g4C0TwM-00037A; Sat, 30 Dec 2006 16:24:14 +0100 From: Max Laier Organization: FreeBSD To: freebsd-stable@freebsd.org, freebsd@orchid.homeunix.org Date: Sat, 30 Dec 2006 16:23:59 +0100 User-Agent: KMail/1.9.4 References: <20061230035722.L39715@thebighonker.lerctr.org> <459673A4.8030009@orchid.homeunix.org> In-Reply-To: <459673A4.8030009@orchid.homeunix.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1189847.iZf8q8EyP2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612301624.05352.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Ivan Voras Subject: Re: 6.2-PRE: Fatal Trap? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 15:24:24 -0000 --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--