From bf46295ff31724b4245ef68030f639a6e6ffbb8b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 1 Jul 2025 09:27:28 +0300 Subject: fix: resolve turbo mode race condition and improve TestDCat2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- integrationtests/debug_sequence.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 integrationtests/debug_sequence.sh (limited to 'integrationtests/debug_sequence.sh') 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 -- cgit v1.2.3