From nobody Sat Dec 21 11:15:35 2024 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 4YFhXl50cGz5Yygx for ; Sat, 21 Dec 2024 11:15:35 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YFhXl0hNpz4sDm for ; Sat, 21 Dec 2024 11:15:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734779735; 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: in-reply-to:in-reply-to:references:references; bh=n+tF4C34dWdeRIA7jwYALzbIckPu8trnPkuUgmgojHE=; b=VqjaRNpgMDZAp+tHxPFEQjFME81+ac7GS2xDLS680+BED0ByPSYtj/jQmhjHFR9PArYjA1 r6NonDoHG+TMGr2ggLo+n4vJmaQ+g89yeDhNIMkHRPvmlK0YOD7xurfnjU76IJDvJL9Fpu M750AnhbRkTr44STDjlXzEwWDcx+DDR4xUewUXzRSV/MJw/bonkbcaO5obZEYxaG1vK0M2 ayUGe3H6prGDxh2jKNj+EIip9gFHXUaUU49uyuIoAkNnEf/Zkw4BelaYzaD64z+6fJfldo Aq1nsBjsx31Pv+M/qvSevvsYGhhCwZDEFIIPGK7BpDZW/OUfGMy1+DpZYYCeog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734779735; a=rsa-sha256; cv=none; b=FrYM2ZTSLnQnUTuYHavgG+9Wl676OusugC1klIuE5RmUfSoW3VMyvEN1cK9zYZgPl3z4Mb AyN74IXJFK6hFRomutVgwruwod2RW448iByGZqKo7PqheomKkWyHj+4eOl28HUmQLAgaAZ aXsoUEdgxCVwknYxSyD7AjKD4WGPIAW/vNZyNEhS22BQKdynh7+q6/4iXS3YRXUAntK3qu X+wqmobffYu/XPGjFFGFT+pZYYDV8t5QWaapZlfJekmUH2dUrsL07x2gr8wgSsXsbonR8O ocjQ+jNWJuKqnjI41JZmeYnPzGloUUs5pS7nTHzZ8pezV7bXofhbPIcXnzhtiw== 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 4YFhXl0JkNzM5h for ; Sat, 21 Dec 2024 11:15:35 +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 4BLBFY37033726 for ; Sat, 21 Dec 2024 11:15:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4BLBFYTM033725 for threads@FreeBSD.org; Sat, 21 Dec 2024 11:15:34 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 283101] pthread_cancel() doesn't cancel a thread that's currently in pause() Date: Sat, 21 Dec 2024 11:15:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 13.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: vedad@kajtaz.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283101 --- Comment #18 from vedad@kajtaz.net --- (In reply to Konstantin Belousov from comment #17) Your latest patch didn't apply over the previous one, so I git-checkout'd first. > PID 33078, iteration 340...pthread_cancel() succeeded > OK > Abort trap (core dumped) I guess the abort() occurred at iteration 341, whose stdout wasn't flushed. dmesg: > pthread(pid 33078 uid 0) aborted: thr_in_critical %p(0x1fc231a12700) (gdb) thread apply all bt full Thread 2 (LWP 337498): #0 _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:= 38 No locals. #1 0x0000000821978d4b in _thr_umtx_wait (mtx=3D0x1fc231a12700, id=3D688152, timeout=3D0x0) at /usr/src/lib/libthr/thread/thr_umtx.c:198 No locals. #2 0x000000082196da7e in join_common (pthread=3D0x1fc231a12700, thread_return=3D0x82043ebc0, abstime=3D0x0, peek=3D) at /usr/src/lib/libthr/thread/thr_join.c:144 __cup =3D {prev =3D 0x0, routine =3D 0x82196dbf0 , ro= utine_arg =3D 0x1fc231a12700, onheap =3D 0} ts =3D {tv_sec =3D 34901060464, tv_nsec =3D 34923276780} ts2 =3D {tv_sec =3D 0, tv_nsec =3D 34918916759552} curthread =3D 0x1fc231a12000 ret =3D tid =3D 688152 tsp =3D 0xa8018 tmp =3D #3 0x0000000000201aee in thread_cancel_and_join (ptid=3D0x1fc231a12700) at pthread.c:28 status =3D 0x0 error =3D 0 #4 0x0000000000201a2c in main (argc=3D1, argv=3D0x82043ec98) at pthread.c:= 73 ptid =3D 0x1fc231a12700 err =3D 0 iteration =3D 341 pid =3D 33078 Thread 1 (LWP 688152): #0 abort2 () at abort2.S:4 No locals. #1 0x0000000821974b0e in sigcancel_handler (sig=3D, info=3D, ucp=3D) at /usr/src/lib/libthr/thread/thr_sig.c:198 p =3D {0x1fc231a12700} curthread =3D 0x1fc231a12700 err =3D #2 No symbol table info available. #3 _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:= 38 No locals. #4 0x0000000821978a30 in __thr_umutex_lock (mtx=3D0x1fc231a12708, id=3D688= 152) at /usr/src/lib/libthr/thread/thr_umtx.c:79 owner =3D #5 0x000000082196c30a in _thr_umutex_lock (mtx=3D0x1fc231a12708, id=3D17) = at /usr/src/lib/libthr/thread/thr_umtx.h:123 No locals. #6 exit_thread () at /usr/src/lib/libthr/thread/thr_exit.c:301 curthread =3D 0x1fc231a12700 #7 0x000000082196c1fe in _pthread_exit_mask (status=3Dstatus@entry=3D0x1, mask=3Dmask@entry=3D0x0) at /usr/src/lib/libthr/thread/thr_exit.c:263 curthread =3D 0x1fc231a12700 cleanup =3D #8 0x000000082196c06b in _Tthr_exit (status=3D0x1fc231a12708, status@entry= =3D0x1) at /usr/src/lib/libthr/thread/thr_exit.c:206 No locals. #9 0x000000082196a400 in testcancel (curthread=3D) at /usr/src/lib/libthr/thread/thr_cancel.c:51 No locals. #10 _thr_cancel_enter (curthread=3Dcurthread@entry=3D0x1fc231a12700) at /usr/src/lib/libthr/thread/thr_cancel.c:149 No locals. #11 0x0000000821975002 in __thr_sigsuspend (set=3D0x822ca5f80) at /usr/src/lib/libthr/thread/thr_sig.c:692 newset =3D {__bits =3D {583688064, 8, 0, 0}} curthread =3D 0x1fc231a12700 old =3D 0 ret =3D #12 0x0000000821fcea65 in __pause () at /usr/src/lib/libc/gen/pause.c:51 oset =3D {__bits =3D {0, 0, 0, 0}} #13 0x0000000000201a81 in thread (arg=3D0x0) at pthread.c:12 No locals. #14 0x000000082196bb55 in thread_start (curthread=3D0x1fc231a12700) at /usr/src/lib/libthr/thread/thr_create.c:289 set =3D {__bits =3D {0, 0, 596938712, 8}} #15 0x0000000000000000 in ?? () (gdb) frame 1 #1 0x0000000821974b0e in sigcancel_handler (sig=3D, info=3D, ucp=3D) at /usr/src/lib/libthr/thread/thr_sig.c:198 198 abort2("thr_in_critical %p", 1, p); (gdb) print *curthread $1 =3D {tid =3D 688152, lock =3D {m_owner =3D 0, m_flags =3D 0, m_ceilings = =3D {0, 0}, m_rb_lnk =3D 0, m_spare =3D {0, 0}}, cycle =3D 0, locklevel =3D 1, critical= _count =3D 0, sigblock =3D 0, fsigblock =3D 0, tle =3D {tqe_next =3D 0x1fc231a12000, tqe_= prev =3D 0x82197c600 <_thread_list>}, gcle =3D { tqe_next =3D 0x0, tqe_prev =3D 0x0}, hle =3D {le_next =3D 0x0, le_prev = =3D 0x82197ce68}, wle =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0}, refcount =3D 1, start_routine =3D 0x201a70 , arg =3D 0x0, attr =3D {sched_policy = =3D 2, sched_inherit =3D 4, prio =3D 0, suspend =3D 0, flags =3D 2, stackaddr_attr =3D 0x822aa6000, stacksize_attr =3D 2097152, guardsize_a= ttr =3D 4096, cpuset =3D 0x0, cpusetsize =3D 0}, cancel_enable =3D 1, cancel_pendin= g =3D 1, cancel_point =3D 0, no_cancel =3D 1, cancel_async =3D 0, cancelling =3D 1, = sigmask =3D {__bits =3D {0, 0, 0, 0}}, unblock_sigcancel =3D 0, in_sigsuspend =3D 1, deferred_siginfo =3D {si_si= gno =3D 0, si_errno =3D 0, si_code =3D 0, si_pid =3D 0, si_uid =3D 0, si_status =3D 0,= si_addr =3D 0x0, si_value =3D {sival_int =3D 0, sival_ptr =3D 0x0, sigval_int =3D 0, si= gval_ptr =3D 0x0}, _reason =3D {_fault =3D { _trapno =3D 0}, _timer =3D {_timerid =3D 0, _overrun =3D 0}, _mesgq= =3D {_mqd =3D 0}, _poll =3D {_band =3D 0}, _capsicum =3D {_syscall =3D 0}, __spare__ =3D = {__spare1__ =3D 0, __spare2__ =3D {0, 0, 0, 0, 0, 0, 0}}}}, deferred_sigmask =3D {__bits = =3D {0, 0, 0, 0}}, deferred_sigact =3D { __sigaction_u =3D {__sa_handler =3D 0x0, __sa_sigaction =3D 0x0}, sa_fl= ags =3D 0, sa_mask =3D {__bits =3D {0, 0, 0, 0}}}, deferred_run =3D 0, force_exit =3D = 0, state =3D PS_RUNNING, error =3D 0, joiner =3D 0x1fc231a12000, flags =3D 0, tlflags = =3D 2, mq =3D {{tqh_first =3D 0x0, tqh_last =3D 0x1fc231a128a8}, {tqh_first =3D 0x0, tqh_last =3D 0x1fc2= 31a128b8}, {tqh_first =3D 0x0, tqh_last =3D 0x1fc231a128c8}, {tqh_first =3D 0x0, tqh_l= ast =3D 0x1fc231a128d8}, {tqh_first =3D 0x0, tqh_last =3D 0x1fc231a128e8}, {tqh_fir= st =3D 0x0, tqh_last =3D 0x1fc231a128f8}}, ret =3D 0x1, specific =3D 0x0, specific_data_count =3D 0, rdlock_count = =3D 0, rtld_bits =3D 0, tcb =3D 0x1fc232003120, cleanup =3D 0x0, ex =3D {exception= _class =3D 0, exception_cleanup =3D 0x0, private_1 =3D 0, private_2 =3D 0}, unwind_stacke= nd =3D 0x822ca6000, unwind_disabled =3D 0, magic =3D 3499860245, report_events =3D 0, event_mask =3D 0, event_buf = =3D {event =3D TD_EVENT_NONE, th_p =3D 0, data =3D 0}, wchan =3D 0x0, mutex_obj =3D 0x0, w= ill_sleep =3D 0, nwaiter_defer =3D 0, robust_inited =3D 0, robust_list =3D 0, priv_robust= _list =3D 0, inact_mtx =3D 0, defer_waiters =3D { 0x0 }, wake_addr =3D 0x1fc232000000, sleepqueue =3D 0x1fc231a19040, name =3D 0x0, dlerror_msg =3D "Undefined symbol \"_Unwind_ForcedUnwind\"", '\000' , dlerror_seen =3D 0} --=20 You are receiving this mail because: You are the assignee for the bug.=