diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-01 09:27:28 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-01 09:27:28 +0300 |
| commit | bf46295ff31724b4245ef68030f639a6e6ffbb8b (patch) | |
| tree | 5184bc01bf802da8ab7c39e6ef0806da5aaee16b /integrationtests/debug_sequence.sh | |
| parent | 3c0fa29aad92ee81e6662989714fee5046f5a6b9 (diff) | |
fix: resolve turbo mode race condition and improve TestDCat2
- Fixed race condition in periodicTruncateCheck by using context cancellation
- Added turbo mode support to TestDCat2 server configuration
- Removed problematic wait for pending files in readCommand.Start
- Fixed potential panic when truncate channel is closed while goroutine is running
The test now properly enables turbo mode on both client and server, preventing
the timeout issues that occurred when only the client had turbo mode enabled.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'integrationtests/debug_sequence.sh')
| -rwxr-xr-x | integrationtests/debug_sequence.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/integrationtests/debug_sequence.sh b/integrationtests/debug_sequence.sh new file mode 100755 index 0000000..d5ffb82 --- /dev/null +++ b/integrationtests/debug_sequence.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Debug script to understand the sequence of events with limited concurrency + +echo "Starting server with trace logging..." +../dserver --cfg none --logLevel trace --bindAddress localhost --port 4344 2>&1 | tee debug_server_trace.log & +SERVER_PID=$! + +sleep 1 + +echo "Running client with 100 files (50x the concurrency limit)..." +FILES=$(python3 -c "print(','.join(['dcat2.txt']*100))") +DTAIL_TURBOBOOST_ENABLE=yes ../dcat --plain --logLevel debug --cfg none --servers localhost:4344 --trustAllHosts --noColor --files "$FILES" > debug_client_output.txt 2>&1 & +CLIENT_PID=$! + +# Wait for client to finish or timeout +sleep 15 +if ps -p $CLIENT_PID > /dev/null; then + echo "Client still running after 15 seconds, killing..." + kill $CLIENT_PID +fi + +# Kill server +kill $SERVER_PID 2>/dev/null + +echo "Client output lines: $(wc -l < debug_client_output.txt)" +echo "" +echo "Key server events:" +grep -E "Server limit hit|Got limiter slot|pending|Processing files|shutdown|close connection|Command finished|Waiting for pending" debug_server_trace.log | tail -30 +echo "" +echo "Client errors:" +grep -E "error|Error|EOF|close" debug_client_output.txt | tail -10
\ No newline at end of file |
