Skip to content

Conversation

@jcpetruzza
Copy link
Contributor

When erlang:suspend_process() is called, we now pause BIF timers in addition to the process timer. This allows step-debuggers like edb to prevent more spurious timeouts while stopping the world.

NB. This handles only timers set by PID, those set by registered name are currently not paused

RobinMorisset and others added 7 commits February 3, 2026 09:55
Summary:
Bug 1: missing locking of ERTS_PROC_LOCK_BTM (held on some paths but not
all)
Bug 2: used the scheduler id of the receiver process rather than that of
the timer, the two could differ if for example the receiver moved after
the creation of the process
Bug 3: wrong assertion that timeout is always >0 (sometimes =0 and in
that case it will just trigger right after resume)

Test Plan:
Manual testing on world_e2e_SUITE, putting breakpoints and verifying
that both suspend and resume work.

Reviewers:

Subscribers:

Tasks:

Tags:
Based on a suggestion by Daniel Gorin, I added a test that creates
hundreds of processes and timers, and tries to trigger any race
condition that might occur around suspend and resume.
When suspending a process we pause all bif timers targeting it.
But until this diff we did not pause any bif timer created after the
suspension. Which is an issue for the debugger, as suspending all the
processes is not atomic, so new timers can keep appearing even as we're
in the middle of suspending processes.

This makes the test adding in the last commit pass (it was consistently
failing before).
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

CT Test Results

    3 files    135 suites   49m 3s ⏱️
1 658 tests 1 601 ✅ 57 💤 0 ❌
2 296 runs  2 220 ✅ 76 💤 0 ❌

Results for commit 33601e7.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Feb 9, 2026
@rickard-green rickard-green self-assigned this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants