From owner-freebsd-bugs@freebsd.org Fri Jun 5 21:11:24 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CF4D337F87 for ; Fri, 5 Jun 2020 21:11:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 49dwLN2qwJz3cBT for ; Fri, 5 Jun 2020 21:11:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 61218337D92; Fri, 5 Jun 2020 21:11:24 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FE30337D91 for ; Fri, 5 Jun 2020 21:11:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dwLN1rCWz3c1F for ; Fri, 5 Jun 2020 21:11:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A9941741F for ; Fri, 5 Jun 2020 21:11:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 055LBOT6091748 for ; Fri, 5 Jun 2020 21:11:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 055LBONV091744 for bugs@FreeBSD.org; Fri, 5 Jun 2020 21:11:24 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: bugs@FreeBSD.org Subject: [Bug 247020] [panic][lixux]: kernel panic in linux_thread_detach at /usr/src/sys/compat/linux/linux_fork.c:462 Date: Fri, 05 Jun 2020 21:11:24 +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: 12.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@sysctl.cz X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org 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 Message-ID: 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.33 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 21:11:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247020 Bug ID: 247020 Summary: [panic][lixux]: kernel panic in linux_thread_detach at /usr/src/sys/compat/linux/linux_fork.c:462 Product: Base System Version: 12.1-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: freebsd@sysctl.cz Hello, when trying to execute linux binary with gdb debug then have kernel panic immediately. kldload linux64 gdb ./linux_binary (gdb) run Unread portion of the kernel message buffer: panic: thread_detach: emuldata not found. cpuid =3D 6 time =3D 1591381865 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0075872= 930 vpanic() at vpanic+0x19d/frame 0xfffffe0075872980 panic() at panic+0x43/frame 0xfffffe00758729e0 linux_thread_detach() at linux_thread_detach+0x9e/frame 0xfffffe0075872a30 thread_suspend_check() at thread_suspend_check+0x318/frame 0xfffffe0075872a= 70 ast() at ast+0x544/frame 0xfffffe0075872ab0 doreti_ast() at doreti_ast+0x1f/frame 0x7fffdfffdd90 Uptime: 4m46s Dumping 814 out of 8042 MB:..2%..12%..22%..32%..42%..52%..61%..71%..81%..91% __curthread () at /usr/src/sys/amd64/include/pcpu.h:234 234 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" (OFFSETOF_CURTHREAD)); (kgdb) bt #0 __curthread () at /usr/src/sys/amd64/include/pcpu.h:234 #1 doadump (textdump=3D1) at /usr/src/sys/kern/kern_shutdown.c:371 #2 0xffffffff80bb70b0 in kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:451 #3 0xffffffff80bb74f9 in vpanic (fmt=3D, ap=3D) at /usr/src/sys/kern/kern_shutdown.c:877 #4 0xffffffff80bb7263 in panic (fmt=3D) at /usr/src/sys/kern/kern_shutdown.c:804 #5 0xffffffff82f4e1be in linux_thread_detach (td=3D0xfffff8017a48c5e0) at /usr/src/sys/compat/linux/linux_fork.c:462 #6 0xffffffff80bcbfa8 in thread_suspend_check (return_instead=3D0) at /usr/src/sys/kern/kern_thread.c:1010 #7 0xffffffff80c167c4 in ast (framep=3D0xfffffe0075872ac0) at /usr/src/sys/kern/subr_trap.c:342 #8 0xffffffff810670f9 in doreti_ast () at /usr/src/sys/amd64/amd64/exception.S:1149 #9 0x0000000800bb7008 in ?? () #10 0x000000000000000f in ?? () #11 0x0000000000000000 in ?? () (kgdb) list *0xffffffff82f4e1be 0xffffffff82f4e1be is at /usr/src/sys/compat/linux/linux_fork.c:462. 457 struct linux_emuldata *em; 458 int *child_clear_tid; 459 int error; 460=20=20=20=20=20 461 em =3D em_find(td); 462 KASSERT(em !=3D NULL, ("thread_detach: emuldata not found.\= n")); 463=20=20=20=20=20 464 LINUX_CTR1(thread_detach, "thread(%d)", em->em_tid); 465=20=20=20=20=20 466 release_futexes(td, em); (kgdb)=20 467=20=20=20=20=20 468 child_clear_tid =3D em->child_clear_tid; 469=20=20=20=20=20 470 if (child_clear_tid !=3D NULL) { 471=20=20=20=20=20 472 LINUX_CTR2(thread_detach, "thread(%d) %p", 473 em->em_tid, child_clear_tid); 474=20=20=20=20=20 475 error =3D suword32(child_clear_tid, 0); 476 if (error !=3D 0) (kgdb) list=20 477 return; 478=20=20=20=20=20 479 cup.uaddr =3D child_clear_tid; 480 cup.op =3D LINUX_FUTEX_WAKE; 481 cup.val =3D 1; /* wake one */ 482 cup.timeout =3D NULL; 483 cup.uaddr2 =3D NULL; 484 cup.val3 =3D 0; 485 error =3D linux_sys_futex(td, &cup); 486 /* --=20 You are receiving this mail because: You are the assignee for the bug.=