NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: automount(?) hang with NetBSD 11.0_RC6



> From: Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost>
> Date: Fri, 24 Jul 2026 14:56:11 +1200
> 
> It looks like all my makes are stuck waiting for fstrans_state_cv
> with the auto unmounter waiting in fstrans_count_cv.

What this means is:

1. The autounmounter is waiting (on fstcnt) for all concurrent file
   system operations to become quiescent so it can safely unmount the
   file system.  (If you look at a stack trace, you'll probably find
   genfs_suspendctl <- vfs_suspend <- dounmount or something in
   there.)

2. The make(1) processes are waiting (on fstchg) to _start_ new file
   system operations, which can't happen until the automounter is done
   and has resumed the file system.

3. _Someone_ is still in the middle of a file system operation, and
   it's not clear who.

We can probably rule out various wchans: kqueue, parked, nanoslp,
poll, netio, select, ttyraw, pause.

It wouldn't hurt to get stack traces for all of the processes waiting
in fstchg, and the one (automountd) in fstcnt, but I don't have a good
idea how the deadlock could be in any of those:

- fstrans_setstate (where automountd is waiting for fstcnt) lets the
  _current thread_ remain in a transaction; and

- the only way for the make(1) processes to be the cause of the
  trouble is if they are already in transactions on one file system
  and waiting for another file system and there's a deadlock between
  them somehow.

(Maybe that can happen with autofs?  Not sure how it works.)

Unfortunately, I don't see any other threads that are obviously even
potentially related.  Maybe hannken@ will spot something I can't?


Home | Main Index | Thread Index | Old Index