Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2016 16:49:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-threads@FreeBSD.org
Subject:   [Bug 211947] bconsole won't die sitting on do_rw_wrlock
Message-ID:  <bug-211947-16@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 211947
           Summary: bconsole won't die sitting on do_rw_wrlock
           Product: Base System
           Version: 10.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: threads
          Assignee: freebsd-threads@FreeBSD.org
          Reporter: longwitz@incore.de

I am running 10.3-STABLE FreeBSD 10.3-STABLE #3 r301633 und try to run bcon=
sole
from the port bacula5-client (P4Q4). Often after some bconsole commands the
bconsole process can not die when entering "quit".=20

With kgdb running on /dev/mem I can see the process:

(kgdb) info threads
   ...
  191 Thread 100880 (PID=3D66009: bconsole)  sched_switch (td=3D0xfffff8008=
d64d4b0,
newtd=3D<value optimized out>, flags=3D<value optimized out>)
    at /usr/src/sys/kern/sched_ule.c:1945
  ...
(kgdb) thread 191
[Switching to thread 191 (Thread 100880)]#0  sched_switch
(td=3D0xfffff8008d64d4b0, newtd=3D<value optimized out>, flags=3D<value opt=
imized
out>)
    at /usr/src/sys/kern/sched_ule.c:1945
1945                    cpuid =3D PCPU_GET(cpuid);
(kgdb) bt
#0  sched_switch (td=3D0xfffff8008d64d4b0, newtd=3D<value optimized out>,
flags=3D<value optimized out>) at /usr/src/sys/kern/sched_ule.c:1945
#1  0xffffffff80664d41 in mi_switch (flags=3D260, newtd=3D0x0) at
/usr/src/sys/kern/kern_synch.c:491
#2  0xffffffff806a87ab in sleepq_catch_signals (wchan=3D0xfffff8012a366f00,
pri=3D0) at /usr/src/sys/kern/subr_sleepqueue.c:426
#3  0xffffffff806a865f in sleepq_wait_sig (wchan=3D0x0, pri=3D0) at
/usr/src/sys/kern/subr_sleepqueue.c:632
#4  0xffffffff8066474d in _sleep (ident=3D<value optimized out>, lock=3D<va=
lue
optimized out>, priority=3D<value optimized out>, wmesg=3D<value optimized =
out>,
    sbt=3D<value optimized out>, pr=3D<value optimized out>, flags=3D<value=
 optimized
out>) at /usr/src/sys/kern/kern_synch.c:253
#5  0xffffffff80678d55 in umtxq_sleep (uq=3D0xfffff8012a366f00,
wmesg=3D0xffffffff80a2583c "uwrlck", abstime=3D0x0) at
/usr/src/sys/kern/kern_umtx.c:780
#6  0xffffffff8067c2ef in do_rw_wrlock (td=3D0xfffff8008d64d4b0,
rwlock=3D0x802270880, timeout=3D<value optimized out>) at
/usr/src/sys/kern/kern_umtx.c:3109
#7  0xffffffff8067ff77 in __umtx_op_rw_wrlock (td=3D<value optimized out>,
uap=3D<value optimized out>) at /usr/src/sys/kern/kern_umtx.c:3657
#8  0xffffffff808edddf in amd64_syscall (td=3D0xfffff8008d64d4b0, traced=3D=
0) at
subr_syscall.c:141
#9  0xffffffff808d29ab in Xfast_syscall () at
/usr/src/sys/amd64/amd64/exception.S:398

kgdb) p *(struct thread *)0xfffff8008d64d4b0
$1 =3D {td_lock =3D 0xffffffff80e3d220, td_proc =3D 0xfffff800059a29e0, td_=
plist =3D
{tqe_next =3D 0x0, tqe_prev =3D 0xfffff800059a29f0}, td_runq =3D {tqe_next =
=3D 0x0,
    tqe_prev =3D 0xffffffff80e07008}, td_slpq =3D {tqe_next =3D 0x0, tqe_pr=
ev =3D
0xfffff800100d5980}, td_lockq =3D {tqe_next =3D 0x0, tqe_prev =3D
0xfffffe0231e18438},
  td_hash =3D {le_next =3D 0x0, le_prev =3D 0xfffffe0000835080}, td_cpuset =
=3D
0xfffff800042013a8, td_sel =3D 0xfffff801a28b2500, td_sleepqueue =3D 0x0,
  td_turnstile =3D 0xfffff80002fbd240, td_rlqe =3D 0xfffff800101aacf8, td_u=
mtxq =3D
0xfffff8012a366f00, td_tid =3D 100880, td_sigqueue =3D {sq_signals =3D {__b=
its =3D {0,
0,
        0, 0}}, sq_kill =3D {__bits =3D {0, 0, 0, 0}}, sq_list =3D {tqh_fir=
st =3D 0x0,
tqh_last =3D 0xfffff8008d64d568}, sq_proc =3D 0xfffff800059a29e0, sq_flags =
=3D 1},
  td_lend_user_pri =3D 255 '=C3=BF', td_flags =3D 12, td_inhibitors =3D 2, =
td_pflags =3D 0,
td_dupfd =3D 0, td_sqqueue =3D 0, td_wchan =3D 0xfffff8012a366f00,
  td_wmesg =3D 0xffffffff80a2583c "uwrlck", td_lastcpu =3D 0 '\0', td_oncpu=
 =3D 255
'=C3=BF', td_owepreempt =3D 0 '\0', td_tsqueue =3D 0 '\0', td_locks =3D 399,
  td_rw_rlocks =3D 0, td_lk_slocks =3D 0, td_stopsched =3D 0, td_blocked =
=3D 0x0,
td_lockname =3D 0x0, td_contested =3D {lh_first =3D 0x0}, td_sleeplocks =3D=
 0x0,
  td_intr_nesting_level =3D 0, td_pinned =3D 0, td_ucred =3D 0xfffff8004514=
c700,
td_estcpu =3D 0, td_slptick =3D 457002771, td_blktick =3D 0, td_swvoltick =
=3D
457002771,
  td_cow =3D 104, td_ru =3D {ru_utime =3D {tv_sec =3D 0, tv_usec =3D 0}, ru=
_stime =3D
{tv_sec =3D 0, tv_usec =3D 0}, ru_maxrss =3D 6588, ru_ixrss =3D 252, ru_idr=
ss =3D 28,
    ru_isrss =3D 896, ru_minflt =3D 325, ru_majflt =3D 0, ru_nswap =3D 0, r=
u_inblock =3D
0, ru_oublock =3D 0, ru_msgsnd =3D 14, ru_msgrcv =3D 2353, ru_nsignals =3D =
0,
    ru_nvcsw =3D 121, ru_nivcsw =3D 9}, td_rux =3D {rux_runtime =3D 1515070=
80,
rux_uticks =3D 5, rux_sticks =3D 2, rux_iticks =3D 0, rux_uu =3D 30135, rux=
_su =3D 13070,
    rux_tu =3D 42189}, td_incruntime =3D 0, td_runtime =3D 151507080, td_pt=
icks =3D 0,
td_sticks =3D 0, td_iticks =3D 0, td_uticks =3D 0, td_intrval =3D 0, td_old=
sigmask =3D {
    __bits =3D {0, 0, 0, 0}}, td_generation =3D 130, td_sigstk =3D {ss_sp =
=3D 0x0,
ss_size =3D 0, ss_flags =3D 4}, td_xsig =3D 0, td_profil_addr =3D 0, td_pro=
fil_ticks =3D
0,
  td_name =3D "bconsole", '\0' <repeats 11 times>, td_fpop =3D 0x0, td_dbgf=
lags =3D
0, td_dbgksi =3D {ksi_link =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0}, ksi_in=
fo =3D {
      si_signo =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,
        sigval_ptr =3D 0x0}, _reason =3D {_fault =3D {_trapno =3D 0}, _time=
r =3D
{_timerid =3D 0, _overrun =3D 0}, _mesgq =3D {_mqd =3D 0}, _poll =3D {_band=
 =3D 0},
__spare__ =3D {
          __spare1__ =3D 0, __spare2__ =3D {0, 0, 0, 0, 0, 0, 0}}}}, ksi_fl=
ags =3D 0,
ksi_sigq =3D 0x0}, td_ng_outbound =3D 0, td_osd =3D {osd_nslots =3D 0, osd_=
slots =3D 0x0,
    osd_next =3D {le_next =3D 0x0, le_prev =3D 0x0}}, td_map_def_user =3D 0=
x0,
td_dbg_forked =3D 0, td_vp_reserv =3D 0, td_no_sleeping =3D 0, td_dom_rr_id=
x =3D 0,
td_sigmask =3D {
    __bits =3D {0, 0, 0, 0}}, td_rqindex =3D 30 '\036', td_base_pri =3D 120=
 'x',
td_priority =3D 120 'x', td_pri_class =3D 3 '\003', td_user_pri =3D 120 'x',
  td_base_user_pri =3D 120 'x', td_pcb =3D 0xfffffe0231f2bcc0, td_state =3D
TDS_INHIBITED, td_retval =3D {0, 0}, td_slpcallout =3D {c_links =3D {le =3D=
 {
        le_next =3D 0xfffffe00007eb2c0, le_prev =3D 0xfffffe0000801de8}, sl=
e =3D
{sle_next =3D 0xfffffe00007eb2c0}, tqe =3D {tqe_next =3D 0xfffffe00007eb2c0,
        tqe_prev =3D 0xfffffe0000801de8}}, c_time =3D 1962816112194023, c_p=
recision
=3D 26843, c_arg =3D 0xfffff8008d64d4b0,
    c_func =3D 0xffffffff806a8220 <sleepq_timeout>, c_lock =3D 0x0, c_flags=
 =3D 2,
c_iflags =3D 272, c_cpu =3D 0}, td_frame =3D 0xfffffe0231f2bc00,
  td_kstack_obj =3D 0xfffff8013d46ea00, td_kstack =3D 18446741884114206720,
td_kstack_pages =3D 4, td_critnest =3D 1, td_md =3D {md_spinlock_count =3D =
1,
    md_saved_flags =3D 582, md_spurflt_addr =3D 34414718976}, td_sched =3D
0xfffff8008d64d930, td_ar =3D 0x0, td_lprof =3D {{lh_first =3D 0x0}, {lh_fi=
rst =3D
0x0}},
  td_dtrace =3D 0xfffff8003e02d000, td_errno =3D 0, td_vnet =3D 0x0, td_vne=
t_lpush =3D
0x0, td_intr_frame =3D 0x0, td_rfppwait_p =3D 0xfffff801a2d224f0, td_ma =3D=
 0x0,
  td_ma_cnt =3D 0, td_su =3D 0x0, td_dbg_sc_code =3D 0, td_dbg_sc_narg =3D =
0,
td_emuldata =3D 0x0}


(kgdb) p *(struct proc *)0xfffff800059a29e0
$2 =3D {p_list =3D {le_next =3D 0xfffff80010d209e0, le_prev =3D 0xfffff8000=
556c000},
p_threads =3D {tqh_first =3D 0xfffff8008d64d4b0, tqh_last =3D 0xfffff8008d6=
4d4c0},
  p_slock =3D {lock_object =3D {lo_name =3D 0xffffffff80a22eb0 "process slo=
ck",
lo_flags =3D 720896, lo_data =3D 0, lo_witness =3D 0x0}, mtx_lock =3D 4},
  p_ucred =3D 0xfffff8004514c700, p_fd =3D 0xfffff801d97ba800, p_fdtol =3D =
0x0,
p_stats =3D 0xfffff80005889800, p_limit =3D 0xfffff800055cc800, p_limco =3D=
 {c_links
=3D {
      le =3D {le_next =3D 0x0, le_prev =3D 0x0}, sle =3D {sle_next =3D 0x0}=
, tqe =3D
{tqe_next =3D 0x0, tqe_prev =3D 0x0}}, c_time =3D 0, c_precision =3D 0, c_a=
rg =3D 0x0,
    c_func =3D 0, c_lock =3D 0xfffff800059a2ae0, c_flags =3D 0, c_iflags =
=3D 0, c_cpu =3D
0}, p_sigacts =3D 0xfffff801a1ce4000, p_flag =3D 268451970, p_flag2 =3D 0,
  p_state =3D PRS_NORMAL, p_pid =3D 66009, p_hash =3D {le_next =3D 0x0, le_=
prev =3D
0xfffffe00006beec8}, p_pglist =3D {le_next =3D 0x0, le_prev =3D 0xfffff8011=
2b3df10},
  p_pptr =3D 0xfffff801a2e549e0, p_sibling =3D {le_next =3D 0x0, le_prev =3D
0xfffff801a2e54ad8}, p_children =3D {lh_first =3D 0x0}, p_mtx =3D {lock_obj=
ect =3D {
      lo_name =3D 0xffffffff80a22ea3 "process lock", lo_flags =3D 21168128,=
 lo_data
=3D 0, lo_witness =3D 0x0}, mtx_lock =3D 4}, p_ksi =3D 0xfffff80004e76620, =
p_sigqueue =3D
{
    sq_signals =3D {__bits =3D {0, 0, 0, 0}}, sq_kill =3D {__bits =3D {0, 0=
, 0, 0}},
sq_list =3D {tqh_first =3D 0x0, tqh_last =3D 0xfffff800059a2b28},
    sq_proc =3D 0xfffff800059a29e0, sq_flags =3D 1}, p_oppid =3D 0, p_vmspa=
ce =3D
0xfffff8001032cc40, p_swtick =3D 456987934, p_realtimer =3D {it_interval =
=3D {tv_sec
=3D 0,
      tv_usec =3D 0}, it_value =3D {tv_sec =3D 0, tv_usec =3D 0}}, p_ru =3D=
 {ru_utime =3D
{tv_sec =3D 0, tv_usec =3D 0}, ru_stime =3D {tv_sec =3D 0, tv_usec =3D 0}, =
ru_maxrss =3D 0,
    ru_ixrss =3D 0, ru_idrss =3D 0, ru_isrss =3D 0, ru_minflt =3D 40, ru_ma=
jflt =3D 0,
ru_nswap =3D 0, ru_inblock =3D 0, ru_oublock =3D 0, ru_msgsnd =3D 0, ru_msg=
rcv =3D 0,
    ru_nsignals =3D 1, ru_nvcsw =3D 7, ru_nivcsw =3D 0}, p_rux =3D {rux_run=
time =3D
155793645, rux_uticks =3D 5, rux_sticks =3D 2, rux_iticks =3D 0, rux_uu =3D=
 30987,
    rux_su =3D 13289, rux_tu =3D 43383}, p_crux =3D {rux_runtime =3D 0, rux=
_uticks =3D 0,
rux_sticks =3D 0, rux_iticks =3D 0, rux_uu =3D 0, rux_su =3D 0, rux_tu =3D =
0},
  p_profthreads =3D 0, p_exitthreads =3D 0, p_traceflag =3D 0, p_tracevp =
=3D 0x0,
p_tracecred =3D 0x0, p_textvp =3D 0xfffff8019c7bb588, p_lock =3D 0, p_sigio=
lst =3D {
    slh_first =3D 0x0}, p_sigparent =3D 20, p_sig =3D 0, p_code =3D 0, p_st=
ops =3D 0,
p_stype =3D 0, p_step =3D 0 '\0', p_pfsflags =3D 0 '\0', p_nlminfo =3D 0x0,=
 p_aioinfo =3D
0x0,
  p_singlethread =3D 0x0, p_suspcount =3D 0, p_xthread =3D 0x0, p_boundary_=
count =3D 0,
p_pendingcnt =3D 0, p_itimers =3D 0x0, p_procdesc =3D 0x0, p_magic =3D 3203=
398350,
  p_osrel =3D 1003500, p_comm =3D "bconsole", '\0' <repeats 11 times>, p_pa=
d0 =3D
0x0, p_sysent =3D 0xffffffff80d18db8, p_args =3D 0xfffff801a294b720,
  p_cpulimit =3D 9223372036854775807, p_nice =3D 0 '\0', p_fibnum =3D 0, p_=
xstat =3D 0,
p_klist =3D {kl_list =3D {slh_first =3D 0x0},
    kl_lock =3D 0xffffffff80620190 <knlist_mtx_lock>, kl_unlock =3D
0xffffffff806201d0 <knlist_mtx_unlock>,
    kl_assert_locked =3D 0xffffffff80620210 <knlist_mtx_assert_locked>,
kl_assert_unlocked =3D 0xffffffff80620220 <knlist_mtx_assert_unlocked>,
    kl_lockarg =3D 0xfffff800059a2ae0}, p_numthreads =3D 1, p_md =3D {md_ld=
t =3D 0x0,
md_ldt_sd =3D {sd_lolimit =3D 0, sd_lobase =3D 0, sd_type =3D 0, sd_dpl =3D=
 0, sd_p =3D 0,
      sd_hilimit =3D 0, sd_xx0 =3D 0, sd_gran =3D 0, sd_hibase =3D 0, sd_xx=
1 =3D 0,
sd_mbz =3D 0, sd_xx2 =3D 0}}, p_itcallout =3D {c_links =3D {le =3D {le_next=
 =3D 0x0,
        le_prev =3D 0x0}, sle =3D {sle_next =3D 0x0}, tqe =3D {tqe_next =3D=
 0x0, tqe_prev
=3D 0x0}}, c_time =3D 0, c_precision =3D 0, c_arg =3D 0x0, c_func =3D 0,
    c_lock =3D 0xfffff800059a2ae0, c_flags =3D 0, c_iflags =3D 0, c_cpu =3D=
 0},
p_acflag =3D 0, p_peers =3D 0x0, p_leader =3D 0xfffff800059a29e0, p_emuldat=
a =3D 0x0,
  p_label =3D 0x0, p_sched =3D 0xfffff800059a2ed0, p_ktr =3D {stqh_first =
=3D 0x0,
stqh_last =3D 0xfffff800059a2e28}, p_mqnotifier =3D {lh_first =3D 0x0},
  p_dtrace =3D 0xfffff801d965f280, p_pwait =3D {cv_description =3D 0xffffff=
ff80a239ab
"ppwait", cv_waiters =3D 0}, p_dbgwait =3D {
    cv_description =3D 0xffffffff80a239b2 "dbgwait", cv_waiters =3D 0},
p_prev_runtime =3D 0, p_racct =3D 0x0, p_throttled =3D 0 '\0', p_orphan =3D=
 {le_next =3D
0x0,
    le_prev =3D 0x0}, p_orphans =3D {lh_first =3D 0x0}, p_treeflag =3D 0, p=
_reaper =3D
0xfffff800042104f0, p_reaplist =3D {lh_first =3D 0x0}, p_reapsibling =3D {
    le_next =3D 0xfffff80010d209e0, le_prev =3D 0xfffff8000556c4d0}, p_reap=
subtree
=3D 29, p_pgrp =3D 0xfffff80112b3df00}

The software has run without this problem for years on FreeBSD 8.4-STABLE.

--=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-211947-16>