Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2018 18:40:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 229958] ctld / zfs deadlock with 'zfs rename ...'
Message-ID:  <bug-229958-3630-vvj64Ze3cI@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-229958-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-229958-3630@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=3D229958

--- Comment #9 from Dave Baukus <daveb@spectralogic.com> ---
(In reply to Andriy Gapon from comment #7)

I believe this one involves a rename, but I
no longer have the crash dump to verify:

spa_namespace_lock holder waiting for txg 185:
----------------------------------------------

Thread 1740 (Thread 100162):
(struct thread *)0xfffff80003d12000, tid 100162
   geom :: (struct proc *)0xfffff80003d98a50, pid 13

STACK:
#0  sched_switch (td=3D0xfffff80003d12000, newtd=3D0xfffff80003ae4580,
flags=3D<optimized out>) at sys/kern/sched_ule.c:2112
#1  0xffffffff80513d6f in mi_switch (flags=3D260, newtd=3D0x0) at
sys/kern/kern_synch.c:439
#2  0xffffffff8055e04d in sleepq_switch (wchan=3D0xfffff80c13b6c298, pri=3D=
0) at
sys/kern/subr_sleepqueue.c:613
#3  0xffffffff8055def3 in sleepq_wait (wchan=3D0xfffff80c13b6c298, pri=3D0)=
 at
sys/kern/subr_sleepqueue.c:692
#4  0xffffffff804a4b73 in _cv_wait (cvp=3D0xfffff80c13b6c298, lock=3D<optim=
ized
out>) at sys/kern/kern_condvar.c:146
#5  0xffffffff8165f7ec in txg_wait_synced (dp=3D0xfffff80c13b6c000, txg=3D1=
85) at
fs/zfs/txg.c:659
#6  0xffffffff8169cd44 in zil_close (zilog=3D0xfffff80b2f00e400) at
fs/zfs/zil.c:2975
#7  0xffffffff816e06c5 in zvol_last_close (zv=3D0xfffff8000b3fc000) at
fs/zfs/zvol.c:893
#8  0xffffffff816dfcc4 in zvol_close (flag=3D0, pp=3D<optimized out>,
count=3D<optimized out>) at fs/zfs/zvol.c:1313
#9  zvol_geom_access (pp=3D0xfffff80df6772b00, acr=3D<optimized out>,
acw=3D<optimized out>, ace=3D<optimized out>) at fs/zfs/zvol.c:2739
#10 0xffffffff804809f9 in g_access (cp=3D0xfffff80657520b00, dcr=3D<optimiz=
ed out>,
dcw=3D0, dce=3D0) at sys/geom/geom_subr.c:977
#11 0xffffffff80486ac6 in g_part_taste (mp=3D<optimized out>,
pp=3D0xfffff80df6772b00, flags=3D<optimized out>) at sys/geom/part/g_part.c=
:2046
#12 0xffffffff8048158a in g_new_provider_event (arg=3D0xfffff80df6772b00,
flag=3D<optimized out>) at sys/geom/geom_subr.c:557
#13 0xffffffff8047c3b4 in one_event () at sys/geom/geom_event.c:268
#14 g_run_events () at sys/geom/geom_event.c:291
#15 0xffffffff804ca144 in fork_exit (callout=3D0xffffffff8047e720
<g_event_procbody>, arg=3D0x0, frame=3D0xfffffe010e5a0ac0) at
sys/kern/kern_fork.c:1057
#16 <signal handler called>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

The spa sync thread wants the spa_namespace_lock and is blocked by the "geom
one_event" thread:
-----------------------------------------------------------------------
Thread 1769 (Thread 104558):
(struct thread *)0xfffff80779d9b000, tid 104558
   zfskern :: (struct proc *)0xfffff80005973528, pid 15

STACK:
#0  sched_switch (td=3D0xfffff80779d9b000, newtd=3D0xfffff80003ae5580,
flags=3D<optimized out>) at sys/kern/sched_ule.c:2112
#1  0xffffffff80513d6f in mi_switch (flags=3D260, newtd=3D0x0) at
sys/kern/kern_synch.c:439
#2  0xffffffff8055e04d in sleepq_switch (wchan=3D0xffffffff817aee98
<spa_namespace_lock>, pri=3D0) at sys/kern/subr_sleepqueue.c:613
#3  0xffffffff8055def3 in sleepq_wait (wchan=3D0xffffffff817aee98
<spa_namespace_lock>, pri=3D0) at sys/kern/subr_sleepqueue.c:692
#4  0xffffffff80511af6 in _sx_xlock_hard (sx=3D0xffffffff817aee98
<spa_namespace_lock>, x=3D<optimized out>, opts=3D<optimized out>, file=3D<=
optimized
out>, line=3D<optimized out>) at sys/kern/kern_sx.c:857
#5  0xffffffff805115e1 in _sx_xlock (sx=3D0xffffffff817aee98
<spa_namespace_lock>, opts=3D0, file=3D0xffffffff81703a89 "fs/zfs/dsl_datas=
et.c",
line=3D3086) at sys/kern/kern_sx.c:328
#6  0xffffffff81619cc4 in dsl_dataset_promote_sync (arg=3D0xfffffe01e0c3e3d=
0,
tx=3D0xfffff80ccfc86500) at fs/zfs/dsl_dataset.c:3086
#7  0xffffffff816232d9 in dsl_sync_task_sync (dst=3D0xfffffe01e0c3e308,
tx=3D0xfffff80ccfc86500) at fs/zfs/dsl_synctask.c:234
#8  0xffffffff816218db in dsl_pool_sync (dp=3D0xfffff80c13b6c000, txg=3D<op=
timized
out>) at fs/zfs/dsl_pool.c:819
#9  0xffffffff8164ffe3 in spa_sync (spa=3D<optimized out>, txg=3D<optimized=
 out>)
at fs/zfs/spa.c:8124
#10 0xffffffff8165f206 in txg_sync_thread (arg=3D0xfffff80c13b6c000) at
fs/zfs/txg.c:543
#11 0xffffffff804ca144 in fork_exit (callout=3D0xffffffff8165ef20
<txg_sync_thread>, arg=3D0xfffff80c13b6c000, frame=3D0xfffffe025a97aac0) at
sys/kern/kern_fork.c:1057

Pending on lock:
SX_LOCK: spa_namespace_lock, (struct sx *)0xffffffff817aee98
$5 =3D {
  lock_object =3D {
    lo_name =3D 0xffffffff81721d6a,
    lo_flags =3D 0x22710000,
    lo_data =3D 0x0,
    lo_witness =3D 0x0
  },
  sx_lock =3D 0xfffff80003d12004
}
LOCK HOLDER:
(struct thread *)0xfffff80003d12000, tid 100162
   geom :: (struct proc *)0xfffff80003d98a50, pid 13

--=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-229958-3630-vvj64Ze3cI>