SINTRAN Timer Mechanism Analysis - Root Cause of HDLC Transmission Failures¶
Timer Configuration Discovery¶
HDLC Device Initialization (Lines 9678, 9725, 9772, etc.)¶
X21OP;POFTO;0;HDTM2;0;-2;IOX 1640;HDSTA;FALSE % HDLC OUTPUT-DATAFIELD 1
X21OP;POFTO;0;HDTM2;0;-2;IOX 1660;HDSTA;FALSE % HDLC OUTPUT-DATAFIELD 2
X21OP;POFTO;0;HDTM2;0;-2;IOX 1700;HDSTA;FALSE % HDLC OUTPUT-DATAFIELD 3
Key Finding: HDLC timeout timer initialized to -2 (not -4)
Timer Value Interpretation¶
In SINTRAN III timer systems, negative values typically represent countdown timers in seconds: - -2 = 2-second timeout for HDLC - Timer decrements from -2 to 0, then triggers POFTO timeout interrupt
Interrupt Handler Analysis¶
HOINT - Main HDLC Interrupt Handler¶
104033 HOINT: 0=:TMR % RESET TIMER
104034 T:=HDEV+RTTS; *EXR ST % READ STATUS
104037 A=:HASTAT % SAVE STATUS
104046 0=: ACTSW % Clear active switch
104102 IF A/\ "SILFO+TXUND" = 0 THEN
104104 XRETRY=:RTDYN; A:=0; CALL SADTS
Critical Line 104033: 0=:TMR - Timer is RESET on every interrupt
POFTO - Timeout Handler¶
104117 POFTO: X:=OMSG; 0=:DCBX
104121 A:=CMODI; T:=HDEV+WTTC; *EXR ST
104125 A:=0; CALL SADTS; A:=ETOU1; GO FAR BACKX
Line 104125: A:=ETOU1 - Sets error code ETOU1 (timeout error)
Timer Mechanism Flow¶
Normal Operation¶
- Frame Sent → Timer starts counting down from -2 (2 seconds)
- Response Received → HOINT triggered → Timer reset via
0=:TMR - Process Repeats for next frame
Timeout Scenario¶
- Frame Sent → Timer starts countdown (-2, -1, 0)
- No Response in 2 seconds → POFTO interrupt triggered
- Error Set →
A:=ETOU1(timeout error) - Connection Terminated →
GO FAR BACKX
Correlation with Observed Delays¶
Processing Delay Timeline¶
| Time Period | Frame Type | Processing Delay | Timer Status |
|---|---|---|---|
| Early Session | 16-byte frames | 600-1000ms | ❌ EXCEEDS 2s TIMEOUT |
| Mid Session | 40-byte frames | 2000-3000ms | ❌ EXCEEDS 2s TIMEOUT |
| Late Session | 52-byte frames | 7000-9000ms | ❌ SEVERELY EXCEEDS 2s TIMEOUT |
Critical Example - Frame Causing Timeout¶
SENT: [23:26:31.575] Machine 102 → 100 (52 bytes)
RECEIVED: [23:26:40.568] Machine 100 (DELAY: 8993ms = 8.99 seconds)
8.99 seconds >> 2.0 seconds = TIMEOUT TRIGGERED IMMEDIATELY
Root Cause Analysis¶
The Timeout Cascade¶
-
Machine 100 Processing Degradation
- Large frames (>40 bytes) cause progressive CPU bottleneck
- Processing time grows from 600ms → 9000ms over session
-
SINTRAN Timer Expiration
- Fixed 2-second timeout cannot adapt to processing delays
- Timer expires at 2000ms, but frame needs 8993ms to process
-
Connection Termination
- POFTO handler sets ETOU1 error code
- Connection marked as failed and terminated
- No recovery mechanism for timeout situations
Multi-Buffer Frame Impact¶
Large X.25 frames split across multiple buffers experience: - Assembly Overhead - Time to concatenate 2-3 buffer parts - Processing Complexity - Larger frames require more CPU cycles - Memory Allocation - Dynamic buffer management delays - Queue Congestion - Accumulated processing backlog
Solution Implications¶
Current Timer Configuration Issues¶
- Fixed Timeout - No adaptive timing based on frame size
- No Retry Logic - Single timeout terminates entire connection
- Processing Bottleneck - Machine 100 cannot handle large frame processing efficiently
Required Optimizations¶
- Increase Timer Value - Change from -2 to -10 or -15 seconds
- Fix Processing Bottleneck - Optimize Machine 100's frame processing
- Add Retry Logic - Multiple timeout attempts before connection termination
Conclusion¶
The 2-second SINTRAN timer is the definitive root cause of HDLC transmission failures.
Processing delays of 600ms-9000ms for ALL frames exceed the hardcoded 2-second timeout, triggering POFTO error handler and connection termination. Even the shortest processing delays (600ms) are well within the timeout range, explaining why the communication is so unreliable.
Critical Finding: With a 2-second timeout, virtually ALL observed frame processing times (600ms-9000ms) are at risk of timeout. The system was designed for much faster response times than what Machine 100 can deliver.
Fix Priority: Either optimize Machine 100's frame processing to under 2 seconds, or increase SINTRAN timer threshold to at least 10-15 seconds to accommodate realistic processing times.