-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/mle detection #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request refactors memory limit exceeded (MLE) detection from a hardcoded exit code approach to a more robust signal-based detection system. The new logic considers process signals (SIGKILL, SIGSEGV, SIGABRT, SIGBUS) combined with peak memory usage thresholds, along with language-specific error patterns, making MLE detection more accurate and portable across platforms.
- Replaced hardcoded exit code 134 with signal-based detection that checks if memory usage was near the limit (≥90%)
- Simplified shell script by delegating all MLE classification to the Go verifier
- Added comprehensive test coverage for various MLE scenarios including signal variants and language-specific patterns
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| pkg/constants/constants.go | Removed the ExitCodeMemoryLimitExceeded constant (134) as MLE is no longer detected via a single hardcoded exit code |
| internal/stages/verifier/verifier.go | Added isLikelyMemoryLimit function with signal-aware detection logic and removed the hardcoded exit code case |
| internal/stages/verifier/verifier_test.go | Removed old hardcoded exit code test and added comprehensive tests for signal-based detection, language patterns, and edge cases |
| internal/stages/executor/run_tests.sh | Simplified peak memory capture and removed shell-side MLE detection logic, delegating classification to the verifier |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request refines the detection and handling of memory limit exceeded (MLE) errors in the test execution and verification pipeline. The main improvements include a more robust and signal-aware approach to classifying MLEs, removal of hardcoded exit code checks, and expanded test coverage to ensure correct behavior for various edge cases and languages.
MLE Detection & Classification Improvements:
isLikelyMemoryLimitthat considers process signals (SIGKILL, SIGSEGV, SIGABRT, SIGBUS) and whether peak memory usage was near the limit, as well as language-specific error patterns. This makes MLE detection more accurate and less dependent on platform-specific exit codes. [1] [2] [3] [4]run_tests.sh) to simplify the logic for capturing peak memory and exit codes, removing the shell-side MLE detection and delegating it fully to the verifier logic.Testing Enhancements:
These changes collectively make the memory limit exceeded handling more reliable and portable across different environments and programming languages.