2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-11-30 14:22:17 +00:00
Daniel Hilst 5018b90829 test(xcat-dep): nothing shows that reclaiming a borrow keeps one taker
_reap_borrow validates a borrow and then removes it by path. rmdir names a
path, not the inode that was validated, so a contender stopped between
those two steps removes whatever is at the path when it resumes. That can
be a live taker's borrow, and two processes then take over one lock. No
check covered it, because the existing ones drive one process at a time.

The new checks fork Perl children and stop them at named points in the
protocol, through an _at hook this commit adds to the module. The
interleaving is a pipe barrier and not a delay, so a fast machine cannot
hide the defect, and every child is reaped with its stdio detached. A
contender that validated the borrow is released only after another one
holds it, which is the order that reaches the defect: released together,
the two race one mkdir, which is exclusive either way.

A second check covers a live taker that has not written its metadata yet.
An earlier revision reclaimed a borrow that two attempts found unchanged,
and that rule cannot cover this case, because a live participant can pause
for any length of time between two writes.

Two more cover the destructor. An acquire whose commit write fails must
return that write error and leave nothing for DESTROY to clean up, and
release must stop after R retries rather than wait for metadata that
cannot be validated. The sleep stub is capped, so a retry loop that lost
its bound fails a named check instead of hanging the suite.

Against the unfixed protocol 17 of the 56 checks fail, the ordered pair
reporting that both contenders took the lock.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 13:35:25 -03:00
2013-05-29 14:58:44 +00:00
2008-10-13 15:50:23 +00:00
2011-11-08 18:33:23 +00:00
2009-07-08 18:55:52 +00:00
2020-01-06 16:34:55 -05:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2008-04-10 19:42:20 +00:00
2011-09-21 19:13:13 +00:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2022-09-26 16:20:45 +02:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2009-04-24 20:17:23 +00:00
2016-12-12 13:44:39 -05:00
S
Description
No description provided
245 MiB
Languages
Perl 79.3%
JavaScript 6.3%
C 3.9%
Shell 3.1%
SQLPL 2%
Other 5.2%