summaryrefslogtreecommitdiff
path: root/integrationtests/debug_sequence.sh
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests/debug_sequence.sh')
-rwxr-xr-xintegrationtests/debug_sequence.sh31
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