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.
25 lines
774 B
Bash
Executable File
25 lines
774 B
Bash
Executable File
#!/bin/bash
|
|
# Find crash pattern by running many times and collecting exit codes
|
|
crashes=0
|
|
success=0
|
|
for i in $(seq 1 200); do
|
|
timeout 5 ./bench_random_mixed_hakmem 100000 512 $((i * 12345)) >/dev/null 2>&1
|
|
exitcode=$?
|
|
if [ $exitcode -eq 139 ]; then
|
|
crashes=$((crashes + 1))
|
|
echo "CRASH #$crashes on iteration $i"
|
|
elif [ $exitcode -eq 0 ]; then
|
|
success=$((success + 1))
|
|
fi
|
|
if [ $((i % 25)) -eq 0 ]; then
|
|
echo "Progress: $i runs, $crashes crashes, $success successes"
|
|
fi
|
|
# Stop after finding 5 crashes
|
|
if [ $crashes -ge 5 ]; then
|
|
break
|
|
fi
|
|
done
|
|
echo ""
|
|
echo "FINAL: $success successes, $crashes crashes out of $i runs"
|
|
echo "Crash rate: $(awk "BEGIN {printf \"%.1f%%\", 100.0 * $crashes / $i}")"
|