Commit 83e99fa
committed
fix(tests): avoid soft lockup in test_serial_active_tx_snapshot
The test was hanging because `cat /dev/zero > /dev/ttyS0` on a multi-vCPU
guest triggers a soft lockup in the 8250 IRQ handler. The root cause is
that FC's serial emulation re-asserts IIR (THRE pending) on every THR
write, causing the guest's serial8250_interrupt() loop to run up to
PASS_LIMIT=512 iterations per interrupt with IRQs disabled (4-12ms).
When writer and IRQ handler are on different CPUs, the writer continuously
re-asserts IIR between the handler's reads, so the loop never exits
naturally.
Fix by:
- Using SSH as the control channel instead of serial (which is unusable
during the flood)
- Using 4 vCPUs with explicit IRQ affinity pinning: all IRQs to CPU0
(keeping SSH/virtio-net responsive), serial IRQ to CPU1 (isolating the
lockup), writer pinned to CPU3 (cross-CPU to exercise the worst case)
- After snapshot/restore, killing the writer via SSH then verifying
serial console functionality
This preserves the original test intent (snapshot with active serial TX
on a multi-vCPU guest) while working around the known device emulation
bug.
Signed-off-by: Jack Thomson <jackabt@amazon.com>1 parent e7e0efe commit 83e99fa
1 file changed
Lines changed: 29 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
86 | 93 | | |
87 | | - | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
97 | 113 | | |
98 | 114 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 115 | + | |
103 | 116 | | |
104 | 117 | | |
105 | 118 | | |
| |||
0 commit comments