Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Dec 2024 00:04:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        threads@FreeBSD.org
Subject:   [Bug 283101] pthread_cancel() doesn't cancel a thread that's currently in pause()
Message-ID:  <bug-283101-13406-8LMysdjN2N@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-283101-13406@https.bugs.freebsd.org/bugzilla/>
References:  <bug-283101-13406@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283101

--- Comment #20 from vedad@kajtaz.net ---
(In reply to Konstantin Belousov from comment #19)

(gdb) thread apply all bt full

Thread 2 (LWP 100391):
#0  _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:=
38
No locals.
#1  0x00000008215fdd4b in _thr_umtx_wait (mtx=3D0xd7be813c00, id=3D707144,
timeout=3D0x0) at /usr/src/lib/libthr/thread/thr_umtx.c:198
No locals.
#2  0x00000008215f2a7e in join_common (pthread=3D0xd7be813c00,
thread_return=3D0x820da5ca0, abstime=3D0x0, peek=3D<optimized out>) at
/usr/src/lib/libthr/thread/thr_join.c:144
        __cup =3D {prev =3D 0x0, routine =3D 0x8215f2bf0 <backout_join>, ro=
utine_arg
=3D 0xd7be813c00, onheap =3D 0}
        ts =3D {tv_sec =3D 34910919760, tv_nsec =3D 34919627244}
        ts2 =3D {tv_sec =3D 0, tv_nsec =3D 926614102016}
        curthread =3D 0xd7be812000
        ret =3D <optimized out>
        tid =3D 707144
        tsp =3D 0xaca48
        tmp =3D <optimized out>
#3  0x0000000000201aee in thread_cancel_and_join (ptid=3D0xd7be813c00) at
pthread.c:28
        status =3D 0x0
        error =3D 0
#4  0x0000000000201a2c in main (argc=3D1, argv=3D0x820da5d78) at pthread.c:=
73
        ptid =3D 0xd7be813c00
        err =3D 0
        iteration =3D 499
        pid =3D 31870

Thread 1 (LWP 707144):
#0  abort2 () at abort2.S:4
No locals.
#1  0x00000008215f9b0d in sigcancel_handler (sig=3D<optimized out>,
info=3D<optimized out>, ucp=3D<optimized out>) at
/usr/src/lib/libthr/thread/thr_sig.c:199
        p =3D {0xd7be813c00}
        curthread =3D 0xd7be813c00
        err =3D <optimized out>
#2  <signal handler called>
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  0x00000008215fda30 in __thr_umutex_lock (mtx=3D0xd7be813c08, id=3D70714=
4) at
/usr/src/lib/libthr/thread/thr_umtx.c:79
        owner =3D <optimized out>
#5  0x00000008215f0aa4 in _thr_umutex_lock (mtx=3D0xd7be813c08, id=3D17) at
/usr/src/lib/libthr/thread/thr_umtx.h:123
No locals.
#6  thread_start (curthread=3D0xd7be813c00) at
/usr/src/lib/libthr/thread/thr_create.c:264
        set =3D {__bits =3D {0, 0, 617922520, 8}}
#7  0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: Cannot access memory at address 0x82452e000
(gdb) frame 1
#1  0x00000008215f9b0d in sigcancel_handler (sig=3D<optimized out>,
info=3D<optimized out>, ucp=3D<optimized out>) at
/usr/src/lib/libthr/thread/thr_sig.c:199
199                             abort2("thr_in_critical %p", 1, p);
(gdb) print *curthread
$1 =3D {tid =3D 707144, 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 0xd7be812000, tqe_pr=
ev =3D
0x821601600 <_thread_list>}, gcle =3D {
    tqe_next =3D 0x0, tqe_prev =3D 0x0}, hle =3D {le_next =3D 0x0, le_prev =
=3D
0x821601f10}, wle =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0}, refcount =3D 1,
start_routine =3D 0x201a70 <thread>, 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 0x82432e000, 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 0, cancel_async =3D 0, cancelling =3D 0, =
sigmask =3D
{__bits =3D {0, 0, 0, 0}},
  unblock_sigcancel =3D 0, in_sigsuspend =3D 0, 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 0xd7be812000, flags =3D 0, tlflags =3D =
2, mq =3D
{{tqh_first =3D 0x0,
      tqh_last =3D 0xd7be813da8}, {tqh_first =3D 0x0, tqh_last =3D 0xd7be81=
3db8},
{tqh_first =3D 0x0, tqh_last =3D 0xd7be813dc8}, {tqh_first =3D 0x0, tqh_las=
t =3D
0xd7be813dd8}, {tqh_first =3D 0x0, tqh_last =3D 0xd7be813de8}, {tqh_first =
=3D 0x0,
tqh_last =3D 0xd7be813df8}}, ret =3D 0x0,
  specific =3D 0x0, specific_data_count =3D 0, rdlock_count =3D 0, rtld_bit=
s =3D 0, tcb
=3D 0xd7bee07120, cleanup =3D 0x0, ex =3D {exception_class =3D 0, exception=
_cleanup =3D
0x0, private_1 =3D 0, private_2 =3D 0}, unwind_stackend =3D 0x0, unwind_dis=
abled =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, will_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 <repeats 50 times>}, wake_addr =3D 0xd7bee00048, sleepqueue =3D
0xd7be819100, name =3D 0x0, dlerror_msg =3D '\000' <repeats 511 times>,
dlerror_seen =3D 0}

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-283101-13406-8LMysdjN2N>