Repository navigation
fix(test): kill the exact mount process in crash tests and check it is gone - #73
Merged
Merged
Conversation
…s gone
The VM restart test ran `pkill -9 goclusterfs-mount`, which never
matched: the kernel cuts process names to 15 characters
("goclusterfs-mou"). The test's lazy unmount then stopped node A
cleanly, so it tested a clean shutdown instead of a crash, and failed at
random when the remount ran before the old process had exited.
The VM tests now find goclusterfs-mount by its executable path and kill
those PIDs, and every crash path fails unless the process is gone within
10 s: the VM restart test, the VM harness's QEMU kill, Docker's
kill_node (now used by all Docker crash tests), and the Go Kill helper,
which now waits for the mount process to exit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matching /proc/PID/exe found nothing on the Alpine VMs, so the restart test had no process to kill, and the clean-unmount wait returned while the mount was still running, which made fsck -repair refuse. Match the path setup_goclusterfs starts the mount with, the start of /proc/PID/cmdline, instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…loader runs it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The VM "Restart Keeps Peer Journal" test has never crashed node A. On the Alpine VMs the gcompat loader runs the glibc binary, so the process name and argv[0] belong to the loader (
ld-musl-x86_64.).pkill,pidofand/proc/*/exenever match it. The test'sumount -lthen stopped A cleanly. The clean-unmount wait usedpidoftoo, so it never waited.Every crash path in the suites:
mount_pidsmatches the exact path setup starts the binary with. The restart test is the only VM test that kills the mount process; it was the only one silently not crashing.kill_vmnow waits until QEMU is gone.kill_nodewaits until the container stops; three tests that calleddocker killdirectly use it.MountedFS.Killwaits for the process to exit;KillNode's fixed 500 ms sleep is gone.Each fails the test if the process is still running 10 s after SIGKILL.
Results
-short130/0, crash tests 14/0, Docker 51/0 (at bfeb2ba; later commits touch only the VM script).ensure_cluster_healthy 3before theirNODE_COUNTskip, so VM 3 stays mounted and fsck correctly refuses. Tracked as a follow-up.🤖 Generated with Claude Code