From owner-freebsd-current@freebsd.org Sun Oct 25 20:50:57 2015 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 E98F7848F for ; Sun, 25 Oct 2015 20:50:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C9CA1503; Sun, 25 Oct 2015 20:50:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9PKooVT083178 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 25 Oct 2015 22:50:51 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9PKooVT083178 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9PKooEH083177; Sun, 25 Oct 2015 22:50:50 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 25 Oct 2015 22:50:50 +0200 From: Konstantin Belousov To: Lev Serebryakov Cc: freebsd-current , jhb@FreeBSD.org Subject: Re: r286256 (changes in both schedulers) leads to almost-instant reboot on my system. Message-ID: <20151025205050.GL2257@kib.kiev.ua> References: <1496792606.20151025224406@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1496792606.20151025224406@serebryakov.spb.ru> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 25 Oct 2015 20:50:57 -0000 On Sun, Oct 25, 2015 at 10:44:06PM +0300, Lev Serebryakov wrote: > Hello freebsd-current, > > I've tracked down my reboot on r289874 to r286256. My system crashes > after several seconds of running with several post-286256 revisions > (r289874 is tested most by me). But if I revert r286256 (and only this > one), r289874 works solid-stable with both ULE and 4BSD. It is amd64 > system. td_oncpu and td_lastcpu are not used for anything in scheduler, td_lastcpu usage is only advisory. At least, show the source line for the sched_add+0x116. But you probably already know that a full backtrace from kgdb, with locals, and print-out of the current thread structure would be useful to see what is going on. > > Typical panic logs look like this: > > ====================================================================== > gif0: link state changed to UP > kernel trap 9 with interrupts disabled > > > Fatal trap 9: general protection fault while in kernel mode > cpuid = 0; apic id = 00 > instruction pointer = 0x20:0xffffffff8046e3c6 > stack pointer = 0x28:0xfffffe011bd59890 > frame pointer = 0x28:0xfffffe011bd59980 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = resume, IOPL = 0 > current process = 11 (swi4: clock (0)) > trap number = 9 > panic: general protection fault > cpuid = 0 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe011bd59530 > vpanic() at vpanic+0x182/frame 0xfffffe011bd595b0 > panic() at panic+0x43/frame 0xfffffe011bd59610 > trap_fatal() at trap_fatal+0x351/frame 0xfffffe011bd59670 > trap() at trap+0x6d8/frame 0xfffffe011bd597d0 > calltrap() at calltrap+0x8/frame 0xfffffe011bd597d0 > --- trap 0x9, rip = 0xffffffff8046e3c6, rsp = 0xfffffe011bd598a0, rbp = 0xfffffe011bd59980 --- > sched_add() at sched_add+0x116/frame 0xfffffe011bd59980 > intr_event_schedule_thread() at intr_event_schedule_thread+0xae/frame 0xfffffe011bd599b0 > intr_event_handle() at intr_event_handle+0xe2/frame 0xfffffe011bd59a00 > intr_execute_handlers() at intr_execute_handlers+0x48/frame 0xfffffe011bd59a30 > lapic_handle_intr() at lapic_handle_intr+0x3f/frame 0xfffffe011bd59a50 > Xapic_isr1() at Xapic_isr1+0xb7/frame 0xfffffe011bd59a50 > --- interrupt, rip = 0xffffffff8063e1f2, rsp = 0xfffffe011bd59b20, rbp = 0xfffffe011bd59b20 --- > spinlock_exit() at spinlock_exit+0x32/frame 0xfffffe011bd59b20 > intr_event_execute_handlers() at intr_event_execute_handlers+0xae/frame 0xfffffe011bd59b60 > ithread_loop() at ithread_loop+0xa6/frame 0xfffffe011bd59bb0 > fork_exit() at fork_exit+0x75/frame 0xfffffe011bd59bf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe011bd59bf0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > Uptime: 16s > ====================================================================== > wlan0: AP-ENABLED > kernel trap 9 with interrupts disabled > > > Fatal trap 9: general protection fault while in kernel mode > cpuid = 0; apic id = 00 > instruction pointer = 0x20:0xffffffff805190b6 > stack pointer = 0x28:0xfffffe012260e7d0 > frame pointer = 0x28:0xfffffe012260e8c0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = resume, IOPL = 0 > current process = 16 (syncer) > trap number = 9 > panic: general protection fault > cpuid = 0 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe012260e470 > vpanic() at vpanic+0x182/frame 0xfffffe012260e4f0 > panic() at panic+0x43/frame 0xfffffe012260e550 > trap_fatal() at trap_fatal+0x351/frame 0xfffffe012260e5b0 > trap() at trap+0x6d8/frame 0xfffffe012260e710 > calltrap() at calltrap+0x8/frame 0xfffffe012260e710 > --- trap 0x9, rip = 0xffffffff805190b6, rsp = 0xfffffe012260e7e0, rbp = 0xfffffe012260e8c0 --- > sched_add() at sched_add+0x116/frame 0xfffffe012260e8c0 > intr_event_schedule_thread() at intr_event_schedule_thread+0xae/frame 0xfffffe012260e8f0 > intr_event_handle() at intr_event_handle+0xe2/frame 0xfffffe012260e940 > intr_execute_handlers() at intr_execute_handlers+0x48/frame 0xfffffe012260e970 > lapic_handle_intr() at lapic_handle_intr+0x3f/frame 0xfffffe012260e990 > Xapic_isr1() at Xapic_isr1+0xb7/frame 0xfffffe012260e990 > --- interrupt, rip = 0xffffffff8071eaad, rsp = 0xfffffe012260ea60, rbp = 0xfffffe012260ea70 --- > spinlock_exit() at spinlock_exit+0x2d/frame 0xfffffe012260ea70 > sleepq_timedwait() at sleepq_timedwait+0xd3/frame 0xfffffe012260eaa0 > _cv_timedwait_sbt() at _cv_timedwait_sbt+0x1a0/frame 0xfffffe012260eb10 > sched_sync() at sched_sync+0x6b6/frame 0xfffffe012260ebb0 > fork_exit() at fork_exit+0x75/frame 0xfffffe012260ebf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe012260ebf0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > Uptime: 14s > ====================================================================== > > > -- > Best regards, > Lev mailto:lev@FreeBSD.org