From owner-freebsd-bugs@FreeBSD.ORG Fri Oct 1 18:00:45 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC92616A4CF for ; Fri, 1 Oct 2004 18:00:45 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A950243D41 for ; Fri, 1 Oct 2004 18:00:45 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i91I0jW9093246 for ; Fri, 1 Oct 2004 18:00:45 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i91I0jOA093243; Fri, 1 Oct 2004 18:00:45 GMT (envelope-from gnats) Resent-Date: Fri, 1 Oct 2004 18:00:45 GMT Resent-Message-Id: <200410011800.i91I0jOA093243@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Aleksey Pesternikov Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFC6B16A4CE for ; Fri, 1 Oct 2004 17:58:13 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6AB843D5A for ; Fri, 1 Oct 2004 17:58:13 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i91HwDCL023343 for ; Fri, 1 Oct 2004 17:58:13 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i91HwDiG023342; Fri, 1 Oct 2004 17:58:13 GMT (envelope-from nobody) Message-Id: <200410011758.i91HwDiG023342@www.freebsd.org> Date: Fri, 1 Oct 2004 17:58:13 GMT From: Aleksey Pesternikov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/72234: kqueue + EVFILT_TIMER = kernel panic X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2004 18:00:45 -0000 >Number: 72234 >Category: kern >Synopsis: kqueue + EVFILT_TIMER = kernel panic >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 01 18:00:45 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Aleksey Pesternikov >Release: 5.3-BETA6 >Organization: >Environment: FreeBSD x2.reveredata.com 5.3-BETA6 FreeBSD 5.3-BETA6 #8: Thu Sep 30 16:22:11 PDT 2004 root@x2.reveredata.com:/usr/src/sys/i386/compile/X2 i386 kernel configuration: include GENERIC ident X2 options VFS_AIO options HZ=1000 options SHMMAXPGS=65536 options SEMMNI=40 options SEMMNS=240 options SEMUME=40 options SEMMNU=120 FreeBSD loki.reveredata.com 5.3-BETA6 FreeBSD 5.3-BETA6 #3: Mon Sep 27 19:33:45 EDT 2004 root@loki.reveredata.com:/usr/obj/usr/src/sys/LOKI i386 kernel configuration: include GENERIC ident LOKI options HZ=1000 options NMBCLUSTERS=65535 >Description: After executing attached program (several times?) both systems crashes: kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid=0; apic id = 00 fault virtual address = 0x108 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0649b14 stack pointer = 0x10:0xe4de6c5c frame pointer = 0x10:0xe4de6c74 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 36 (swi5: clock sio) trap number = 12 panic: page fault cpuid = 0 Uptime: 16h12m13s Looks like a kernel does not clear (timer related?) kqueue structures related to process after the process exits or has been killed. The bug appeared sometimes after 5.2.1 >How-To-Repeat: The problem is 100% reproduceable: #include #include #include #include int main(int argc, char* argv[]) { int kq; struct kevent ke; assert((kq=kqueue())!=-1); EV_SET(&ke, 12345, EVFILT_TIMER, EV_ADD/*|EV_ONESHOT*/,0, 1000/*msec*/, 0); assert(kevent(kq, &ke, 1, NULL, 0, NULL)==0); return 0; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: