On an SMP machine with mpsafevfs=1: # cat /tmp/l2.sh mkdir foo rmdir foo # while true; do (lockf lock sh /tmp/l2.sh) & done mkdir: foo: File exists rmdir: foo: No such file or directory mkdir: foo: File exists rmdir: foo: No such file or directory mkdir: foo: File exists [...] It looks like lockf(1) is not serializing requests properly, i.e. it's handing out locks to two processes at once. I first saw this early this year, but then it went away for a while. Kris P.S. lockf(1) is also very lame in how it acquires locks..this patch from Christian fixes that so that multiple lockf processes don't all spin in a thundering herd trying to grab the same lock, but the above bug appears with or without it (just more efficiently with): http://people.freebsd.org/~csjp/lockf.diff
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:44 UTC