Files
hakmem/capture_one_crash.sh
Moe Charm (CI) 4ef0171bc0 feat: Add ACE allocation failure tracing and debug hooks
This commit introduces a comprehensive tracing mechanism for allocation failures within the Adaptive Cache Engine (ACE) component. This feature allows for precise identification of the root cause for Out-Of-Memory (OOM) issues related to ACE allocations.

Key changes include:
- **ACE Tracing Implementation**:
  - Added  environment variable to enable/disable detailed logging of allocation failures.
  - Instrumented , , and  to distinguish between "Threshold" (size class mismatch), "Exhaustion" (pool depletion), and "MapFail" (OS memory allocation failure).
- **Build System Fixes**:
  - Corrected  to ensure  is properly linked into , resolving an  error.
- **LD_PRELOAD Wrapper Adjustments**:
  - Investigated and understood the  wrapper's behavior under , particularly its interaction with  and  checks.
  - Enabled debugging flags for  environment to prevent unintended fallbacks to 's  for non-tiny allocations, allowing comprehensive testing of the  allocator.
- **Debugging & Verification**:
  - Introduced temporary verbose logging to pinpoint execution flow issues within  interception and  routing. These temporary logs have been removed.
  - Created  to facilitate testing of the tracing features.

This feature will significantly aid in diagnosing and resolving allocation-related OOM issues in  by providing clear insights into the failure pathways.
2025-12-01 16:37:59 +09:00

18 lines
557 B
Bash
Executable File

#!/bin/bash
for seed in $(seq 10000 10200); do
./bench_random_mixed_hakmem 100000 512 $seed >/tmp/bench_out.log 2>&1
exit_code=$?
if [ $exit_code -eq 139 ]; then
echo "=== CRASH DETECTED on seed $seed ==="
echo "Last 30 lines of output:"
tail -30 /tmp/bench_out.log
echo "=== Saved to crash_output.log ==="
cp /tmp/bench_out.log crash_output.log
exit 0
fi
if [ $((seed % 20)) -eq 0 ]; then
echo "Tested $((seed - 10000)) seeds..."
fi
done
echo "No crash found in 200 attempts"