From owner-freebsd-current@freebsd.org Sat Jul 1 05:45:43 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C63CD912F9 for ; Sat, 1 Jul 2017 05:45:43 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-15.reflexion.net [208.70.210.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF2CD7A131 for ; Sat, 1 Jul 2017 05:45:42 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 21670 invoked from network); 1 Jul 2017 05:45:41 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 1 Jul 2017 05:45:41 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.40.1) with SMTP; Sat, 01 Jul 2017 01:45:41 -0400 (EDT) Received: (qmail 21030 invoked from network); 1 Jul 2017 05:45:40 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 1 Jul 2017 05:45:40 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 0C279EC81E6; Fri, 30 Jun 2017 22:45:40 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: HEAD/i386 r320212: three reproducible panics [see also bugzilla 220404 about a type of problem introduced in head -r329722 ] Message-Id: <285F63EB-9DC3-46DC-9849-3B47FDC719AE@dsl-only.net> Date: Fri, 30 Jun 2017 22:45:39 -0700 Cc: imb@protected-networks.net, Hans Petter Selasky , iz-rpi03@hs-karlsruhe.de To: oleg@theweb.org.ua, FreeBSD Current , glebius@FreeBSD.org X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 05:45:43 -0000 [Just for the 3rd backtrace example. . .] Oleg V. Nauman oleg at theweb.org.ua wrote on Fri Jun 23 16:58:07 UTC 2017 : . . . > __curthread () at ./machine/pcpu.h:225 > 225 __asm("movl %%fs:%1,%0" : "=r" (td) > (kgdb) #0 __curthread () at ./machine/pcpu.h:225 > #1 doadump (textdump=-968633856) at ../../../kern/kern_shutdown.c:318 > #2 0xc06e88c4 in kern_reboot (howto=) > at ../../../kern/kern_shutdown.c:386 > #3 0xc06e8c5b in vpanic (fmt=, > ap=0xefd5c73c "\340\334\235\300\310\370\266\306\001") > at ../../../kern/kern_shutdown.c:779 > #4 0xc06e8b1b in panic (fmt=0xc092e18e "%s") > at ../../../kern/kern_shutdown.c:710 > #5 0xc08eed21 in trap_fatal (frame=0xefd5c878, eva=) > at ../../../i386/i386/trap.c:978 > #6 0xc08eea38 in trap (frame=) > at ../../../i386/i386/trap.c:704 > #7 > #8 0xc6bcda1b in ?? () > #9 0xc0770281 in unp_connect2 (so=, so2=, > req=) at ../../../kern/uipc_usrreq.c:1497 > #10 0xc076ff17 in unp_connectat (fd=, so=, > nam=, td=) > at ../../../kern/uipc_usrreq.c:1446 > #11 0xc076d510 in unp_connect (so=0xc71c9400, nam=0xc662d500, > td=) at ../../../kern/uipc_usrreq.c:1310 > #12 uipc_connect (so=0xc71c9400, nam=0xc662d500, td=) > at ../../../kern/uipc_usrreq.c:587 > #13 0xc076a042 in kern_connectat (td=, dirfd=-100, > fd=, sa=0xc662d500) at ../../../kern/uipc_syscalls.c:505 > #14 0xc0769f49 in sys_connect (td=0xc6bcda18, uap=0xc6b6f988) > at ../../../kern/uipc_syscalls.c:470 > #15 0xc08ef679 in syscallenter (td=) > at ../../../i386/i386/../../kern/subr_syscall.c:132 > #16 syscall (frame=) at ../../../i386/i386/trap.c:1103 > #17 > #18 0x283a4747 in ?? () > Backtrace stopped: Cannot access memory at address 0xbfbfe794 There are problems with a union having fields that interfere with each other. The details of the layout and interference likely vary from TARGET_ARCH to TARGET_ARCH. This is from new material added in head -r319722 and involves /head/sys/sys/socketvar.h and the new union in struct socket. See bugzilla 220404 and its analysis of a repeatable crash on 32-bit powerpc for head -r320482 (I'd made a large jump from well before -r319722): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220404 It also involves unp_connect2, unp_connect, kern_connectat, sys_connect and is likely involved. But different aliasing in the union across architectures likely lead to varying details for the behavior that results from the bad handling of union use. === Mark Millard markmi at dsl-only.net