From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 2 21:12:16 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29192741 for ; Tue, 2 Sep 2014 21:12:16 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA191470 for ; Tue, 2 Sep 2014 21:12:16 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s82LCF8Q033084 for ; Tue, 2 Sep 2014 21:12:15 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 193265] New: Kernel page fault with error with VIMAGE kernel r270837 Date: Tue, 02 Sep 2014 21:12:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: hiroo.ono+freebsd@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 21:12:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193265 Bug ID: 193265 Summary: Kernel page fault with error with VIMAGE kernel r270837 Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: hiroo.ono+freebsd@gmail.com Created attachment 146696 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=146696&action=edit add CURVNET_SET() and CURVNET_RESTORE() where necessary. With VIMAGE enabled kernel, the system panics at running unbound. Kernel page fault with the following non-sleepable locks held: exclusive sleep mutex so_rcv (so_rcv) r = 0 (0xc713e5a0) locked @ /usr/local/poudriere/jails/head/usr/src/sys/kern/kern_event.c:2005 KDB: stack backtrace: db_trace_self_wrapper(c11a69af,72656b2f,656b2f6e,655f6e72,746e6576,...) at 0xc05296bd = db_trace_self_wrapper+0x2d/frame 0xe8f16710 kdb_backtrace(c11aaf80,0,c713e5a0,c119a9e8,7d5,...) at 0xc0b4b160 = kdb_backtrace+0x30/frame 0xe8f16778 witness_warn(5,0,c136b0a0,76e2000,c1833d58,...) at 0xc0b68a52 = witness_warn+0x402/frame 0xe8f167c8 trap_pfault(18,3fd,c0dcc2d0,c1f64a80,c75e1000,...) at 0xc102f46b = trap_pfault+0x5b/frame 0xe8f16840 trap(e8f16988) at 0xc102edcf = trap+0x6cf/frame 0xe8f1697c calltrap() at 0xc1017c4c = calltrap+0x6/frame 0xe8f1697c --- trap 0xc, eip = 0xc0b9837d, esp = 0xe8f169c8, ebp = 0xe8f169f0 --- filt_soread(c75d93f0,0,c119a9e8,48d,0,...) at 0xc0b9837d = filt_soread+0x9d/frame 0xe8f169f0 kqueue_register(c6e2d310,1,1,4f5,0,...) at 0xc0ad1457 = kqueue_register+0x807/frame 0xe8f16a68 kern_kevent(c6e2d310,7,1,40,e8f16c10,...) at 0xc0ad1ec2 = kern_kevent+0x1f2/frame 0xe8f16bc0 sys_kevent(c6e2d310,e8f16cc8,c152a610,14,c11a4905,...) at 0xc0ad1bc1 = sys_kevent+0x131/frame 0xe8f16c40 syscall(e8f16d08) at 0xc102fc4c = syscall+0x30c/frame 0xe8f16cfc Xint0x80_syscall() at 0xc1017ce1 = Xint0x80_syscall+0x21/frame 0xe8f16cfc --- syscall (363, FreeBSD ELF32, sys_kevent), eip = 0x2849ad3f, esp = 0xbfbfa224, ebp = 0xbfbfa288 --- Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x18 fault code = supervisor read, page not present instruction pointer = 0x20:0xc0b9837d stack pointer = 0x28:0xe8f169c8 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 428 (unbound-anchor) The page fault occurs at line 3268 of sys/kern/uipc_socket.c ---- 3263 } else { 3264 if (so->so_rcv.sb_cc >= so->so_rcv.sb_lowat) 3265 return 1; 3266 } 3267 3268 if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) /* <-- HERE */ 3269 /* This hook returning non-zero indicates an event, not error */ 3270 return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); ---- Attached patch to sys/kern/uipc_socket.c solved the problem. The solution was suggested by Garrett Cooper in http://lists.freebsd.org/pipermail/freebsd-current/2014-September/051911.html -- You are receiving this mail because: You are the assignee for the bug.