Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2019 18:48:05 +0530
From:      Arpan Palit <babupalit@gmail.com>
To:        freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org
Subject:   "panic: softdep_deallocate_dependencies: dangling deps", while runing IO on mounted HDD and doing HDD hot-unplug.
Message-ID:  <CAF3txfhjfGDwbmfzkh_RSpZZrYcqqhaWpSXGtf=nF9LzRHaHWg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I am working on HDD hot-unplug "dangling deps" panic issue.

Provided the following steps to recreate and observations when the issue
hit.

STEP 1. Installed stable/11 freeBSD branch with below commit head.
----------------------------------------------------------------------------------------------------------
commit 7b249ab3e16a3d41d0a58a43d7d89137a1c9ec00 (HEAD -> stable/11,
origin/stable/11)
Author: delphij <delphij@FreeBSD.org>
Date:   Tue Jan 22 04:20:52 2019 +0000

    MFC r342856: Added support for the SIOCGI2C ioctl.
----------------------------------------------------------------------------------------------------------
Step 2. Attached HDD and mounted to local file system.
Step 3. While IO is running to the mounted device; hot-unplug the device
and issue umount command for the mounted device.

Observations:
===========
-> observed panic as b_ioflags is not to BIO_ERROR and also observed
b_error is set to zero.
backtrace:
--------------
fsync: giving up on dirty (error = 6) 0xfffff8029cbda938: tag devfs, type
VCHR
    usecount 1, writecount 0, refcount 15 rdev 0xfffff80247038400
    flags (VI_DOOMED|VI_ACTIVE)
    v_object 0xfffff80247d320f0 ref 0 pages 95 cleanbuf 10 dirtybuf 2
    lock type devfs: EXCL by thread 0xfffff8029c84d620 (pid 774, df, tid
100720)
        dev ada1p1
panic: softdep_deallocate_dependencies: dangling deps
cpuid = 57
KDB: stack backtrace:
#0 0xffffffff80b20d27 at kdb_backtrace+0x67
#1 0xffffffff80add3c7 at vpanic+0x177
#2 0xffffffff80add453 at panic+0x43
#3 0xffffffff80d84376 at softdep_deallocate_dependencies+0x76
#4 0xffffffff80b7cd2c at brelse+0x16c
#5 0xffffffff80b9bc5d at flushbuflist+0x15d
#6 0xffffffff80b9b891 at bufobj_invalbuf+0x81
#7 0xffffffff80b9f06e at vgonel+0x18e
#8 0xffffffff80b9f68f at vgone+0x2f
#9 0xffffffff809aba42 at devfs_delete+0x1a2
#10 0xffffffff809ac1e2 at devfs_populate_loop+0x2b2
#11 0xffffffff809abf1a at devfs_populate+0x4a
#12 0xffffffff809b0dcc at devfs_populate_vp+0x8c
#13 0xffffffff809afa0f at devfs_getattr+0x1f
#14 0xffffffff810dc8a7 at VOP_GETATTR_APV+0xf7
#15 0xffffffff80bad553 at vn_stat+0xa3
#16 0xffffffff80bab44f at vn_statfile+0x4f
#17 0xffffffff80a8a8a9 at kern_fstat+0xa9

-> Also you can find similar issue in the following PR.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225423

As I am working on the above issue, Can anyone please provide  some
solution/suggestion to go forward.

Thanks,
Arpan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF3txfhjfGDwbmfzkh_RSpZZrYcqqhaWpSXGtf=nF9LzRHaHWg>