ci: add Valgrind memcheck job#356
Draft
abhinavagarwal07 wants to merge 1 commit into
Draft
Conversation
- Add valgrind-memcheck job running full pytest suite under memcheck with continue-on-error: true - Uses --error-exitcode=99 with definite/indirect leak checking - Currently finding real sshfs-owned leaks (buf_init/sftp_read, buf_init/sftp_send_iov, cache_add_link) — will go green once those are fixed - Raw Valgrind logs written via --log-file and uploaded as artifacts alongside JUnit XML - Add VALGRIND_OPTIONS support to test/util.py via shlex.split - Suppression file covers only third-party libfuse worker-thread teardown leaks - Fix fusermount/fusermount3 mismatch, scale timeouts 4x under Valgrind - Set G_DEBUG/G_SLICE for cleaner Valgrind output - Hard-fail FUSE preflight, workflow-level permissions and concurrency - All actions pinned to Node 24-capable SHAs, runner pinned to ubuntu-24.04
23fc309 to
eafa47e
Compare
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.
Add a Valgrind memcheck job running the full pytest suite under memcheck with
--error-exitcode=99and definite/indirect leak checking. Runs on every push/PR withcontinue-on-error: true— currently finding real sshfs-owned definite leaks that need fixing before this can be promoted to a required check.Note: this PR only adds the
valgrind-memcheckjob. The existingbuild-and-testjob in the same workflow is unchanged and will be updated by PRs #6/#7.Test harness changes:
VALGRIND_OPTIONSenv var support intest/util.pyviashlex.splitcleanup()andfuse_test_marker()now usefusermount3consistentlywait_for_mount/umounttimeouts 4x (30s → 120s) when running under Valgrind==pid==output lines as false positives inconftest.pyG_DEBUG=fatal-warnings,gc-friendlyandG_SLICE=always-mallocfor cleaner Valgrind output--log-fileand uploaded as artifacts alongside JUnit XMLSuppressed failures:
test/valgrind.suppsuppresses only third-partylibfuse-worker-thread-allocteardown leaks (calloc inside libfuse3.so during pthread_create). No sshfs-owned code is suppressed — project leaks will fail the job.continue-on-error: truebecause it is currently surfacing real definite leaks throughbuf_init/sftp_read,buf_init/sftp_send_iov, andcache_add_link. Promote to required once those leaks are fixed.Valgrind memcheck is the most thorough dynamic memory analysis available for C — it catches use-after-free, uninitialized reads, and leaks that sanitizers can miss due to compiler optimizations.
A weekly schedule trigger also runs the Valgrind job on master even without pushes, catching regressions from runner image updates or dependency changes.