[Bug 247020] [panic][lixux]: kernel panic in linux_thread_detach at /usr/src/sys/compat/linux/linux_fork.c:462
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jun 5 21:11:24 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247020
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 at FreeBSD.org
Reporter: freebsd at 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 = 6
time = 1591381865
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0075872930
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 0xfffffe0075872a70
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" : "=r" (td) : "n"
(OFFSETOF_CURTHREAD));
(kgdb) bt
#0 __curthread () at /usr/src/sys/amd64/include/pcpu.h:234
#1 doadump (textdump=1) at /usr/src/sys/kern/kern_shutdown.c:371
#2 0xffffffff80bb70b0 in kern_reboot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:451
#3 0xffffffff80bb74f9 in vpanic (fmt=<optimized out>, ap=<optimized out>) at
/usr/src/sys/kern/kern_shutdown.c:877
#4 0xffffffff80bb7263 in panic (fmt=<unavailable>) at
/usr/src/sys/kern/kern_shutdown.c:804
#5 0xffffffff82f4e1be in linux_thread_detach (td=0xfffff8017a48c5e0) at
/usr/src/sys/compat/linux/linux_fork.c:462
#6 0xffffffff80bcbfa8 in thread_suspend_check (return_instead=0) at
/usr/src/sys/kern/kern_thread.c:1010
#7 0xffffffff80c167c4 in ast (framep=0xfffffe0075872ac0) 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
461 em = em_find(td);
462 KASSERT(em != NULL, ("thread_detach: emuldata not found.\n"));
463
464 LINUX_CTR1(thread_detach, "thread(%d)", em->em_tid);
465
466 release_futexes(td, em);
(kgdb)
467
468 child_clear_tid = em->child_clear_tid;
469
470 if (child_clear_tid != NULL) {
471
472 LINUX_CTR2(thread_detach, "thread(%d) %p",
473 em->em_tid, child_clear_tid);
474
475 error = suword32(child_clear_tid, 0);
476 if (error != 0)
(kgdb) list
477 return;
478
479 cup.uaddr = child_clear_tid;
480 cup.op = LINUX_FUTEX_WAKE;
481 cup.val = 1; /* wake one */
482 cup.timeout = NULL;
483 cup.uaddr2 = NULL;
484 cup.val3 = 0;
485 error = linux_sys_futex(td, &cup);
486 /*
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list