From owner-freebsd-amd64@freebsd.org Sun Jul 3 23:05:49 2016 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1912FB90B72 for ; Sun, 3 Jul 2016 23:05:49 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0862F2760 for ; Sun, 3 Jul 2016 23:05:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u63N5ma0005430 for ; Sun, 3 Jul 2016 23:05:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 210800] hung process using ktrace with cloudabi Date: Sun, 03 Jul 2016 23:05:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mfp49_freebsd@plass-family.net 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: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc 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-Mailman-Approved-At: Mon, 04 Jul 2016 03:06:26 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2016 23:05:49 -0000 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) 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, 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,=20 lock=3D) at /usr/src/sys/kern/kern_condvar.c:144 #5 0xffffffff80aa3132 in vmem_xalloc (vm=3D,=20 size0=3D, align=3D, phase=3D0= ,=20 nocross=3D, minaddr=3D0, maxaddr=3D,=20 flags=3D8194, addrp=3D) 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,=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.=