Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Jun 2020 21:11:24 +0000
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
Message-ID:  <bug-247020-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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<optimized out>, ap=3D<optimized ou=
t>) at
/usr/src/sys/kern/kern_shutdown.c:877
#4  0xffffffff80bb7263 in panic (fmt=3D<unavailable>) 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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-247020-227>