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
735 B
Bash
Executable File
25 lines
735 B
Bash
Executable File
#!/bin/bash
|
|
for i in $(seq 1 100); do
|
|
seed=$RANDOM
|
|
echo "Attempt $i with seed $seed..." >&2
|
|
gdb -batch -ex 'set pagination off' \
|
|
-ex 'set print pretty on' \
|
|
-ex "run 100000 512 $seed" \
|
|
-ex 'bt full' \
|
|
-ex 'info registers' \
|
|
-ex 'info threads' \
|
|
-ex 'thread apply all bt' \
|
|
-ex 'x/32xg $rsp' \
|
|
-ex 'disassemble $pc-32,$pc+32' \
|
|
-ex 'quit' \
|
|
./bench_random_mixed_hakmem > /tmp/gdb_out_$i.log 2>&1
|
|
|
|
if grep -q "signal SIG" /tmp/gdb_out_$i.log; then
|
|
echo "CRASH CAPTURED on attempt $i with seed $seed!" >&2
|
|
cp /tmp/gdb_out_$i.log gdb_crash_full.log
|
|
exit 0
|
|
fi
|
|
done
|
|
echo "No crash found in 100 attempts" >&2
|
|
exit 1
|