NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/52301: lfs deadlock between lfs_fsync and lfs_create
>Number: 52301
>Category: kern
>Synopsis: lfs deadlock between lfs_fsync and lfs_create
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 15 06:15:00 +0000 2017
>Originator: David A. Holland
>Release: NetBSD 7.99.75 (20170603)
>Organization:
>Environment:
System: NetBSD loggy 7.99.75 NetBSD 7.99.75 (GENERIC) #66: Sat Jun 10 05:26:28
+IDT 2017 fly@loggy:/home/fly/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
lfs can deadlock as follows:
1. process A calls lfs_fsync
- which calls lfs_vflush
- which takes the seglock and calls lfs_segwrite
2. meanwhile process B calls lfs_create
- which starts a dirop
- and then down inside lfs_valloc blocks waiting for the seglock.
3. now process A in lfs_segwrite calls lfs_writer_enter
- which blocks waiting for dirops to clear
- but they can't.
We found this by analyzing a crashdump, and confirmed it in the source
of a 7.99.75 tree from 20170603.
>How-To-Repeat:
See above.
>Fix:
Not obvious.
I wonder if this was introduced by the vnode cache changes... but even
if so reverting those isn't the answer.
Home |
Main Index |
Thread Index |
Old Index