Skip to content

Fix receive window in misc_connection_alarms - #361

Closed
grok-99s wants to merge 1 commit into
ninenines:masterfrom
grok-99s:fix-connection-alarms-window
Closed

grok-99s wants to merge 1 commit into
ninenines:masterfrom
grok-99s:fix-connection-alarms-window

Conversation

@grok-99s

@grok-99s grok-99s commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

acceptor_SUITE:misc_connection_alarms failed with {badmatch,#{test1 => undefined,test2 => undefined}} at line 650 on OTP-28.5.0.7 macos-14 in scheduled run 37262937056.

After cooldown => 100 is set, the alarms fire again every 100ms or a little more, since that counts timer latency plus the callback being spawned. do_recv_connection_alarms/2 stopped after 100ms passed with no message. When the previous alarm had just been flushed, the next one could arrive slightly after that 100ms window closed, so nothing was received. The idle-reset timeout also meant a window longer than the cooldown would never end while alarms keep repeating.

This change makes do_recv_connection_alarms/2 collect messages until a fixed deadline. The four checks that run with the 100ms cooldown now use a 200ms window. That window always contains at least one repeat, and the checks expecting undefined still hold because those alarms are below their threshold.

I couldn't reproduce the failure locally in 20 runs under CPU load. After the change, the test passed 10 out of 10 runs and the misc group passes (OTP 27.3.4.1).

With a 100ms cooldown the alarms repeat every 100ms or a bit
more, while do_recv_connection_alarms stopped after 100ms
without messages. An alarm firing just after the window
closed made the test fail. Collect alarms until a fixed
deadline instead and use a window larger than the cooldown.
@essen

essen commented Oct 9, 2026

Copy link
Copy Markdown
Member

@grok-99s When you say you couldn't reproduce the failure locally, do you mean before your fix?

@grok-99s

grok-99s commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Yes, before the fix. Those 20 runs under CPU load were on unpatched master and none of them failed. The 10/10 passes were with the fix applied. So the change follows from reading the timing in the code, not from a local reproduction.

@essen

essen commented Oct 9, 2026

Copy link
Copy Markdown
Member

Deferred until a way to reproduce is figured out.

@essen essen closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants