Date: Sun, 03 Jul 2016 23:05:49 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 210800] hung process using ktrace with cloudabi Message-ID: <bug-210800-6@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210800 Bug ID: 210800 Summary: hung process using ktrace with cloudabi Product: Base System Version: 11.0-CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: mfp49_freebsd@plass-family.net CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org Using ktrace on a cloudabi executable sometimes hangs in such a way that it cannot be killed. FreeBSD xx 11.0-ALPHA5 FreeBSD 11.0-ALPHA5 #0 r302164: Fri Jun 24 02:51:52 = UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 # kldload cloudabi # kldload cloudabi64 $ pkg info | grep cloud cloudabi-0.6 Constants, types and data structures used by CloudABI cloudabi-toolchain-1.4 C and C++ toolchain for CloudABI cloudabi-utils-0.11 Utilities for running CloudABI programs x86_64-unknown-cloudabi-cloudabi-0.6_1 cloudabi for x86_64-unknown-cloudabi x86_64-unknown-cloudabi-cloudlibc-0.40_1 cloudlibc for x86_64-unknown-cloud= abi x86_64-unknown-cloudabi-compiler-rt-3.8.0_4 compiler-rt for x86_64-unknown-cloudabi x86_64-unknown-cloudabi-curl-7.49.1_2 curl for x86_64-unknown-cloudabi x86_64-unknown-cloudabi-cxx-runtime-1.0_2 cxx-runtime for x86_64-unknown-cloudabi x86_64-unknown-cloudabi-libcxx-3.8.0_9 libcxx for x86_64-unknown-cloudabi x86_64-unknown-cloudabi-libcxxabi-3.8.0_6 libcxxabi for x86_64-unknown-clou= dabi x86_64-unknown-cloudabi-libressl-2.4.1_1 libressl for x86_64-unknown-clouda= bi x86_64-unknown-cloudabi-libunwind-3.8.0_5 libunwind for x86_64-unknown-clou= dabi x86_64-unknown-cloudabi-lua-5.3.3_2 lua for x86_64-unknown-cloudabi x86_64-unknown-cloudabi-zlib-1.2.8_11 zlib for x86_64-unknown-cloudabi $ : | ktrace /usr/local/x86_64-unknown-cloudabi/bin/lua Here is a kernel stack trace of the hung process: (kgdb) where #0 sched_switch (td=3D0xfffff8006a217000, newtd=3D0xfffff80007380a00,=20 flags=3D<value optimized out>) at /usr/src/sys/kern/sched_ule.c:1973 #1 0xffffffff80a52a87 in mi_switch (flags=3D260, newtd=3D0x0) at /usr/src/sys/kern/kern_synch.c:455 #2 0xffffffff80a95d27 in sleepq_switch (wchan=3D<value optimized out>, pri= =3D0) at /usr/src/sys/kern/subr_sleepqueue.c:557 #3 0xffffffff80a95bf3 in sleepq_wait (wchan=3D0xffffffff81c34400, pri=3D0) at /usr/src/sys/kern/subr_sleepqueue.c:637 #4 0xffffffff809e8cc4 in _cv_wait (cvp=3D<value optimized out>,=20 lock=3D<value optimized out>) at /usr/src/sys/kern/kern_condvar.c:144 #5 0xffffffff80aa3132 in vmem_xalloc (vm=3D<value optimized out>,=20 size0=3D<value optimized out>, align=3D<value optimized out>, phase=3D0= ,=20 nocross=3D<value optimized out>, minaddr=3D0, maxaddr=3D<value optimize= d out>,=20 flags=3D8194, addrp=3D<value optimized out>) at /usr/src/sys/kern/subr_vmem.c:1209 #6 0xffffffff80aa2e72 in vmem_alloc (vm=3D0xffffffff81c34380, size=3D14244= 610048,=20 flags=3D8194, addrp=3D0xfffffe01212959f0) at /usr/src/sys/kern/subr_vme= m.c:1095 #7 0xffffffff80d2c193 in kmem_malloc (vmem=3D0xffffffff81c34380,=20 size=3D14244610048, flags=3D2) at /usr/src/sys/vm/vm_kern.c:313 #8 0xffffffff80d24d46 in uma_large_malloc (size=3D14244610048, wait=3D2) at /usr/src/sys/vm/uma_core.c:1106 #9 0xffffffff80a25833 in malloc (size=3D<value optimized out>,=20 mtp=3D0xffffffff818f0780, flags=3D2) at /usr/src/sys/kern/kern_malloc.c= :510 #10 0xffffffff80a189ad in ktrsyscall (code=3D35, narg=3D1780576256,=20 args=3D0xfffffe0121295b80) at /usr/src/sys/kern/kern_ktrace.c:451 #11 0xffffffff80eb893e in amd64_syscall (td=3D0xfffff8006a217000, traced=3D= 0) at subr_syscall.c:77 #12 0xffffffff80e9897b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:396 #13 0x000000000103f42b in ?? () Clearly narg is ktrsyscall is garbage. It looks like cloudabi64_fetch_syscall_args() is not filling in sa->nargs. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210800-6>