From owner-freebsd-bugs@freebsd.org Sun Feb 11 02:49:50 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96EAAF123B0 for ; Sun, 11 Feb 2018 02:49:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0A37F6D7 for ; Sun, 11 Feb 2018 02:49:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 422BC2FB9F for ; Sun, 11 Feb 2018 02:49:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w1B2nnBx038490 for ; Sun, 11 Feb 2018 02:49:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w1B2nnpe038489 for freebsd-bugs@FreeBSD.org; Sun, 11 Feb 2018 02:49:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 225450] 11.1-* panics on AMD Opteron 2k due to EARLY_AP_STARTUP Date: Sun, 11 Feb 2018 02:49:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: pablo.ruiz@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Feb 2018 02:49:50 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225450 --- Comment #13 from Pablo Ruiz --- Hi again, Adding the following patch: diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 7cc02d663bf..3cca61ca72e 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -925,6 +925,7 @@ init_secondary_tail(void) CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", cpuid); printf("SMP: AP CPU #%d Launched!\n", cpuid); +while(1); /* Determine if we are a logical CPU. */ if (cpu_info[PCPU_GET(apic_id)].cpu_hyperthread) I get into db while crashing: [...] cpu0 BSP: ID: 0x00000000 VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400 AMD ext features: 0x00010003 AMD elvt0: 0x00010000 SMP: AP CPU #1 Launched! kkkerneel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid =3D 2; apic id =3D 02 fault virtual address =3D 0x0 fault code =3D supervisor write data, page not present instruction pointer =3D 0x20:0xffffffff80bb739d stack pointer =3D 0x28:0xfffffe001b9835b0 frame pointer =3D 0x28:0xfffffe001b983620 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D resume, IOPL =3D 0 current process =3D 11 (idle: cpu2) [ thread pid 11 tid 100005 ] Stopped at putchar+0x15d: movb $0,(%rax) db> bt Tracing pid 11 tid 100005 td 0xfffff8000332c000 putchar() at putchar+0x15d/frame 0xfffffe001b983620 db> show all procs pid ppid pgrp uid state wmesg wchan cmd 11 0 0 0 RL (threaded) [idle] 100003 CanRun [idle: cpu0] 100004 CanRun [idle: cpu1] 100005 CanRun [idle: cpu2] 100006 CanRun [idle: cpu3] 1 0 0 0 ?L [kernel] 10 0 0 0 RL [audit] 0 0 0 0 RLs CPU 0 [swapper] db> show all pcpu Current CPU: 2 cpuid =3D 0 dynamic pcpu =3D 0x682000 curthread =3D 0xffffffff82883640: pid 0 "swapper" curpcb =3D 0xffffffff82c0ecc0 fpcurthread =3D none idlethread =3D 0xfffff8000332d000: tid 100003 "idle: cpu0" curpmap =3D 0xffffffff828af188 tssp =3D 0xffffffff828ad510 commontssp =3D 0xffffffff828ad510 rsp0 =3D 0xffffffff82c0ecc0 gs32p =3D 0xffffffff828ad708 ldt =3D 0xffffffff828ad748 tss =3D 0xffffffff828ad738 cpuid =3D 1 dynamic pcpu =3D 0xfffffe00993f1000 curthread =3D 0xfffff8000332c580: pid 11 "idle: cpu1" curpcb =3D 0 fpcurthread =3D none idlethread =3D 0xfffff8000332c580: tid 100004 "idle: cpu1" curpmap =3D 0xffffffff828af188 tssp =3D 0xffffffff828ad578 commontssp =3D 0xffffffff828ad578 rsp0 =3D 0x0 gs32p =3D 0xffffffff828ad770 ldt =3D 0xffffffff828ad7b0 tss =3D 0xffffffff828ad7a0 cpuid =3D 2 dynamic pcpu =3D 0xfffffe00993f9000 curthread =3D 0xfffff8000332c000: pid 11 "idle: cpu2" curpcb =3D 0 fpcurthread =3D none idlethread =3D 0xfffff8000332c000: tid 100005 "idle: cpu2" curpmap =3D 0xffffffff828af188 tssp =3D 0xffffffff828ad5e0 commontssp =3D 0xffffffff828ad5e0 rsp0 =3D 0x0 gs32p =3D 0xffffffff828ad7d8 ldt =3D 0xffffffff828ad818 tss =3D 0xffffffff828ad808 cpuid =3D 3 dynamic pcpu =3D 0xfffffe0099401000 curthread =3D 0xfffff8000332b580: pid 11 "idle: cpu3" curpcb =3D 0 fpcurthread =3D none idlethread =3D 0xfffff8000332b580: tid 100006 "idle: cpu3" curpmap =3D 0xffffffff828af188 tssp =3D 0xffffffff828ad648 commontssp =3D 0xffffffff828ad648 rsp0 =3D 0x0 gs32p =3D 0xffffffff828ad840 ldt =3D 0xffffffff828ad880 tss =3D 0xffffffff828ad870 db> show all trace Tracing command idle pid 11 tid 100003 td 0xfffff8000332d000 fork_trampoline() at fork_trampoline Tracing command idle pid 11 tid 100004 td 0xfffff8000332c580 fork_trampoline() at fork_trampoline Tracing command idle pid 11 tid 100005 td 0xfffff8000332c000 putchar() at putchar+0x15d/frame 0xfffffe001b983620 Tracing command idle pid 11 tid 100006 td 0xfffff8000332b580 fork_trampoline() at fork_trampoline Tracing command kernel pid 1 tid 100002 td 0xfffff8000332d580 fork_trampoline() at fork_trampoline Tracing command audit pid 10 tid 100001 td 0xfffff8000332e000 fork_trampoline() at fork_trampoline Tracing command kernel pid 0 tid 100000 td 0xffffffff82883640 KDB: reentering KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001b982= cc0 kdb_reenter() at kdb_reenter+0x2f/frame 0xfffffe001b982cd0 trap() at trap+0x4d/frame 0xfffffe001b982e90 calltrap() at calltrap+0x8/frame 0xfffffe001b982e90 --- trap 0xc, rip =3D 0xffffffff80c351d0, rsp =3D 0xfffffe001b982f60, rbp = =3D 0xfffffe001b982f60 --- strcmp() at strcmp+0x10/frame 0xfffffe001b982f60 db_backtrace() at db_backtrace+0x17d/frame 0xfffffe001b982ff0 db_trace_thread() at db_trace_thread+0x3f/frame 0xfffffe001b983010 db_stack_trace_all() at db_stack_trace_all+0x6f/frame 0xfffffe001b9830b0 db_command() at db_command+0x2bf/frame 0xfffffe001b983180 db_command_loop() at db_command_loop+0x64/frame 0xfffffe001b983190 db_trap() at db_trap+0xef/frame 0xfffffe001b983220 kdb_trap() at kdb_trap+0x13e/frame 0xfffffe001b983270 trap_fatal() at trap_fatal+0x2e2/frame 0xfffffe001b9832c0 trap_pfault() at trap_pfault+0x49/frame 0xfffffe001b983320 trap() at trap+0x286/frame 0xfffffe001b9834e0 calltrap() at calltrap+0x8/frame 0xfffffe001b9834e0 --- trap 0xc, rip =3D 0xffffffff80bb739d, rsp =3D 0xfffffe001b9835b0, rbp = =3D 0xfffffe001b983620 --- putchar() at putchar+0x15d/frame 0xfffffe001b983620 db> show threads 100003 (0xfffff8000332d000) (stack 0xfffffe001b99c000) fork_trampoline()= at fork_trampoline 100004 (0xfffff8000332c580) (stack 0xfffffe001b9a1000) fork_trampoline()= at fork_trampoline 100005 (0xfffff8000332c000) (stack 0xfffffe001b9a6000) putchar() at putchar+0x15d/frame 0xfffffe001b983620 100006 (0xfffff8000332b580) (stack 0xfffffe001b9ab000) fork_trampoline()= at fork_trampoline 100002 (0xfffff8000332d580) (stack 0xfffffe001b997000) fork_trampoline()= at fork_trampoline 100001 (0xfffff8000332e000) (stack 0xfffffe001b992000) fork_trampoline()= at fork_trampoline 100000 (0xffffffff82883640) (stack 0xffffffff82c0b000)KDB: reentering KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001b982cd0 kdb_reenter() at kdb_reenter+0x2f/frame 0xfffffe001b982ce0 trap() at trap+0x4d/frame 0xfffffe001b982ea0 calltrap() at calltrap+0x8/frame 0xfffffe001b982ea0 --- trap 0xc, rip =3D 0xffffffff80c351d0, rsp =3D 0xfffffe001b982f70, rbp = =3D 0xfffffe001b982f70 --- strcmp() at strcmp+0x10/frame 0xfffffe001b982f70 db_backtrace() at db_backtrace+0x17d/frame 0xfffffe001b983000 db_trace_thread() at db_trace_thread+0x3f/frame 0xfffffe001b983020 db_show_threads() at db_show_threads+0x83/frame 0xfffffe001b9830b0 db_command() at db_command+0x2bf/frame 0xfffffe001b983180 db_command_loop() at db_command_loop+0x64/frame 0xfffffe001b983190 db_trap() at db_trap+0xef/frame 0xfffffe001b983220 kdb_trap() at kdb_trap+0x13e/frame 0xfffffe001b983270 trap_fatal() at trap_fatal+0x2e2/frame 0xfffffe001b9832c0 trap_pfault() at trap_pfault+0x49/frame 0xfffffe001b983320 trap() at trap+0x286/frame 0xfffffe001b9834e0 calltrap() at calltrap+0x8/frame 0xfffffe001b9834e0 --- trap 0xc, rip =3D 0xffffffff80bb739d, rsp =3D 0xfffffe001b9835b0, rbp = =3D 0xfffffe001b983620 --- putchar() at putchar+0x15d/frame 0xfffffe001b983620 db> show ktr --- End of trace buffer --- db> show dpcpu_off dpcpu_off[ 0] =3D 0x682000 (+ DPCPU_START =3D 0xffffffff82c0f000) dpcpu_off[ 1] =3D 0xfffffe00993f1000 (+ DPCPU_START =3D 0xfffffe001b97e000) dpcpu_off[ 2] =3D 0xfffffe00993f9000 (+ DPCPU_START =3D 0xfffffe001b986000) dpcpu_off[ 3] =3D 0xfffffe0099401000 (+ DPCPU_START =3D 0xfffffe001b98e000) Let me know if there is anything specific you want me to get from this point on.. :) --=20 You are receiving this mail because: You are the assignee for the bug.=