From nobody Fri Jan 07 19:17:10 2022 X-Original-To: threads@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 34307193690F for ; Fri, 7 Jan 2022 19:17:11 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JVtJQ6Lk1z4nTJ for ; Fri, 7 Jan 2022 19:17:10 +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 B664110EA5 for ; Fri, 7 Jan 2022 19:17:10 +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 207JHAsE050559 for ; Fri, 7 Jan 2022 19:17:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 207JHARM050558 for threads@FreeBSD.org; Fri, 7 Jan 2022 19:17:10 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: threads@FreeBSD.org Subject: [Bug 261010] Trace/BPT trap after interrupting truss Date: Fri, 07 Jan 2022 19:17:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: martin@lispworks.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@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 attachments.mimetype attachments.created 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 List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-threads@freebsd.org X-BeenThere: freebsd-threads@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641583030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mph66BdMgpac61zJ6qqLfnfn/Ocqzlr/uHim5rQ9+fo=; b=llid1k6rx79Ycm5dH0Vy9w/815KAVO2Tp3bjGXwZPmc4Qc23JyfARx7lxfoEUcPab/37bU NXGh4X6ihFcRe6XeiQrth+bP+e3jo0GBnHxxdaV549R49JGsUSDuKJ6ghmJ/mPXdQY46VM +F5qp6Fvkr1PKoW9jQulNpFKQ3s/w1GpIRVm4flI2Y0xlIqa2LNnQisYsC9am6fj83MN9I 2kwdsrzc3693ck110e9PHELwAlbs7hj1Ro3xoqDvKZw3BhOyaczQWnqnbFg5A0yvcY3dE2 wYRDqhpwT7Vza17Fiytr8c4BDPrZJRHObj4raZcCtuM4h3QWKrgX7VFoc3l/Mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641583030; a=rsa-sha256; cv=none; b=kPngUzyste45X43RIR5reQkYT/EK2VNAzUfegB11tKJQ3rtnG8ENIS5Z2omHDk6j3lGXX4 gvTbyeeoy+ZiH28MnCIcIetWIqFcro5jLsPNfRe/ZB/X4gCt5qpbUF3kQRIw7WEQXhO45Y 0c/pgWbFN7VZerxViUBDzsXO2W9HZfEcHwRNNur5hAgJsehHzL6Pyz+rH40z5egLjv+t3Y XDho+h2lm+C1jDB/1bEGp4fWS3y+vYnfH1/sXX4keEU6mo0Oh8nTQ5TVTfMiqWy05bkb3k ZKMWTHbdDLsUt+0IJfH5EAptEQwNosP9cRH43mhOA7Jb+b2UUpGSCmns7MHD2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261010 Bug ID: 261010 Summary: Trace/BPT trap after interrupting truss Product: Base System Version: 12.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: threads Assignee: threads@FreeBSD.org Reporter: martin@lispworks.com Attachment #230792 text/plain mime type: Created attachment 230792 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D230792&action= =3Dedit Example source code Compile the attached truss-crash.c with cc -pthread -o truss-crash truss-crash.c and then run ./truss-crash in one shell. In another shell, find the pid of the running truss-crash and attach truss to it: truss -H -o /dev/null -p $pid After a while, interrupt the truss with Ctrl+C. Sometimes, truss-crash will crash with Trace/BPT trap (core dumped). This happens 100% of the time in a VM with 2 cores. GDB shows the following for the core file: GNU gdb (GDB) 11.1 [GDB v11.1 for FreeBSD] Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd12.2". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from truss-crash... [New LWP 102187] [New LWP 100569] [New LWP 100816] [New LWP 100817] [New LWP 100820] [New LWP 100827] [New LWP 100829] [New LWP 100830] [New LWP 100940] [New LWP 101209] [New LWP 101287] [New LWP 101288] [New LWP 101289] [New LWP 101290] [New LWP 101291] [New LWP 101292] [New LWP 101293] [New LWP 101294] [New LWP 101297] [New LWP 101299] [New LWP 101300] [New LWP 101301] [New LWP 101302] [New LWP 101303] [New LWP 101304] [New LWP 101307] [New LWP 101308] [New LWP 101312] [New LWP 101314] [New LWP 101315] [New LWP 101316] [New LWP 101320] [New LWP 101321] [New LWP 101322] [New LWP 101323] [New LWP 101324] [New LWP 101325] [New LWP 101326] [New LWP 101327] [New LWP 101328] [New LWP 101332] [New LWP 101333] [New LWP 101334] [New LWP 101335] [New LWP 101336] [New LWP 101337] [New LWP 101338] [New LWP 101339] [New LWP 101340] [New LWP 101341] [New LWP 101342] [New LWP 101343] [New LWP 101344] [New LWP 101345] [New LWP 101346] [New LWP 101347] [New LWP 101350] [New LWP 101351] [New LWP 101352] [New LWP 101353] [New LWP 101355] [New LWP 101357] [New LWP 101358] [New LWP 101359] [New LWP 101360] [New LWP 101366] [New LWP 101373] [New LWP 101374] [New LWP 101375] [New LWP 101376] [New LWP 101379] [New LWP 101385] [New LWP 101386] [New LWP 101387] [New LWP 101388] [New LWP 101389] [New LWP 101390] [New LWP 101391] [New LWP 101392] [New LWP 101393] [New LWP 101394] [New LWP 101395] [New LWP 101396] [New LWP 101397] [New LWP 101398] [New LWP 101399] [New LWP 101400] [New LWP 101401] [New LWP 101402] [New LWP 101403] [New LWP 101404] [New LWP 101405] [New LWP 101406] [New LWP 101407] [New LWP 101533] [New LWP 101591] [New LWP 101712] [New LWP 101713] [New LWP 101887] [New LWP 101892] [New LWP 101901] Core was generated by `truss-crash'. Program terminated with signal SIGTRAP, Trace/breakpoint trap. #0 _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:= 37 37 RSYSCALL_ERR(_umtx_op) [Current thread is 1 (LWP 102187)] gdb> disass $pc Dump of assembler code for function _umtx_op_err: 0x0000000800269680 <+0>: mov $0x1c6,%rax 0x0000000800269687 <+7>: mov %rcx,%r10 0x000000080026968a <+10>: syscall=20 =3D> 0x000000080026968c <+12>: ret=20=20=20=20 0x000000080026968d <+13>: int3=20=20=20 0x000000080026968e <+14>: int3=20=20=20 0x000000080026968f <+15>: int3=20=20=20 End of assembler dump. gdb> bt #0 _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:= 37 #1 0x0000000800265591 in join_common (pthread=3D0x800680500, thread_return= =3D0x0, abstime=3D0x0, peek=3D) at /usr/src/lib/libthr/thread/thr_jo= in.c:147 #2 0x0000000000201afa in main () gdb> i threads Id Target Id Frame=20 * 1 LWP 102187 _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 2 LWP 100569 0x0000000000201a28 in func () 3 LWP 100816 0x0000000000201a36 in func () 4 LWP 100817 0x0000000000201a28 in func () 5 LWP 100820 0x0000000000201a36 in func () 6 LWP 100827 0x0000000000201a36 in func () 7 LWP 100829 0x0000000000201a36 in func () 8 LWP 100830 0x0000000000201a28 in func () 9 LWP 100940 0x0000000000201a13 in func () 10 LWP 101209 0x0000000000201a36 in func () 11 LWP 101287 0x0000000000201a28 in func () 12 LWP 101288 0x0000000000201a36 in func () 13 LWP 101289 0x0000000000201a13 in func () 14 LWP 101290 0x0000000000201a36 in func () 15 LWP 101291 0x0000000000201a36 in func () 16 LWP 101292 0x0000000000201a36 in func () 17 LWP 101293 0x0000000000201a36 in func () 18 LWP 101294 0x0000000000201a1a in func () 19 LWP 101297 0x0000000000201a36 in func () 20 LWP 101299 0x0000000000201a28 in func () 21 LWP 101300 0x0000000000201a36 in func () 22 LWP 101301 0x0000000000201a36 in func () 23 LWP 101302 0x0000000000201a28 in func () 24 LWP 101303 0x0000000000201a36 in func () 25 LWP 101304 0x0000000000201a20 in func () 26 LWP 101307 0x0000000000201a36 in func () 27 LWP 101308 0x0000000000201a36 in func () 28 LWP 101312 0x0000000000201a28 in func () 29 LWP 101314 0x0000000000201a39 in func () 30 LWP 101315 0x0000000000201a2e in func () 31 LWP 101316 0x0000000000201a39 in func () 32 LWP 101320 0x0000000000201a36 in func () 33 LWP 101321 0x0000000000201a28 in func () 34 LWP 101322 0x0000000000201a28 in func () 35 LWP 101323 0x0000000000201a36 in func () 36 LWP 101324 0x0000000000201a36 in func () 37 LWP 101325 0x0000000000201a13 in func () 38 LWP 101326 0x0000000000201a1a in func () 39 LWP 101327 0x0000000000201a36 in func () 40 LWP 101328 0x0000000000201a36 in func () 41 LWP 101332 0x0000000000201a36 in func () 42 LWP 101333 0x0000000000201a28 in func () 43 LWP 101334 0x0000000000201a20 in func () 44 LWP 101335 0x0000000000201a28 in func () 45 LWP 101336 0x0000000000201a28 in func () 46 LWP 101337 0x0000000000201a36 in func () 47 LWP 101338 0x0000000000201a36 in func () 48 LWP 101339 0x0000000000201a36 in func () 49 LWP 101340 0x0000000000201a20 in func () 50 LWP 101341 0x0000000000201a36 in func () 51 LWP 101342 0x0000000000201a1a in func () 52 LWP 101343 0x0000000000201a1a in func () 53 LWP 101344 0x0000000000201a28 in func () 54 LWP 101345 0x0000000000201a28 in func () 55 LWP 101346 0x0000000000201a39 in func () 56 LWP 101347 0x0000000000201a28 in func () 57 LWP 101350 0x0000000000201a1a in func () 58 LWP 101351 0x0000000000201a36 in func () 59 LWP 101352 0x0000000000201a36 in func () 60 LWP 101353 0x0000000000201a28 in func () 61 LWP 101355 0x0000000000201a36 in func () 62 LWP 101357 0x0000000000201a36 in func () 63 LWP 101358 0x0000000000201a28 in func () 64 LWP 101359 0x0000000000201a28 in func () 65 LWP 101360 0x0000000000201a28 in func () 66 LWP 101366 0x0000000000201a13 in func () 67 LWP 101373 0x0000000000201a36 in func () 68 LWP 101374 0x0000000000201a36 in func () 69 LWP 101375 0x0000000000201a20 in func () 70 LWP 101376 0x0000000000201a28 in func () 71 LWP 101379 0x0000000000201a28 in func () 72 LWP 101385 0x0000000000201a28 in func () 73 LWP 101386 0x0000000000201a39 in func () 74 LWP 101387 0x0000000000201a28 in func () 75 LWP 101388 0x0000000000201a28 in func () 76 LWP 101389 0x0000000000201a28 in func () 77 LWP 101390 0x0000000000201a3f in func () 78 LWP 101391 0x0000000000201a1a in func () 79 LWP 101392 0x0000000000201a36 in func () 80 LWP 101393 0x0000000000201a36 in func () 81 LWP 101394 0x0000000000201a36 in func () 82 LWP 101395 0x0000000000201a20 in func () 83 LWP 101396 0x0000000000201a20 in func () 84 LWP 101397 0x0000000000201a28 in func () 85 LWP 101398 0x0000000000201a36 in func () 86 LWP 101399 0x0000000000201a36 in func () 87 LWP 101400 0x0000000000201a39 in func () 88 LWP 101401 0x0000000000201a36 in func () 89 LWP 101402 0x0000000000201a28 in func () 90 LWP 101403 0x0000000000201a36 in func () 91 LWP 101404 0x0000000000201a28 in func () 92 LWP 101405 0x0000000000201a28 in func () 93 LWP 101406 0x0000000000201a28 in func () 94 LWP 101407 0x0000000000201a36 in func () 95 LWP 101533 0x0000000000201a36 in func () 96 LWP 101591 0x0000000000201a1a in func () 97 LWP 101712 0x0000000000201a28 in func () 98 LWP 101713 0x0000000000201a36 in func () 99 LWP 101887 0x0000000000201a36 in func () 100 LWP 101892 0x0000000000201a28 in func () 101 LWP 101901 0x0000000000201a13 in func () gdb> --=20 You are receiving this mail because: You are the assignee for the bug.=