Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect carrier count statistics after using instrument module #8636

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

sverker
Copy link
Contributor

@sverker sverker commented Jul 3, 2024

The number of carriers in a shared pool (allctr->cpool.stat.no_carriers) was decremented every time a call to instrument:allocations or instrument:carriers yielded while traversing the pool.

Also make sure to not free or re-insert a yield cursor (dummy carrier) into shared carrier pool until thread progress has passed.

sverker added 2 commits July 2, 2024 21:11
cpool.stat.no_carriers was decremented when dummy carrier was deleted
but not incremented at insert in blockscan_save_cpool_cursor().

Make pure cpool_link/unlink functions without any carrier stats update
to be called directly by blockscan to link/unlink its dummy carrier.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
After unlinking a pooled carrier, thread progress must pass before
we can safely free it or re-insert it into the pool. This also applies
for the dummy carriers used to mark progress during yield.

Solved by scheduling thread progress at each yield of blockscan
and switching between two dummy carriers (dumb and dumber).
@sverker sverker added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Jul 3, 2024
@sverker sverker self-assigned this Jul 3, 2024
Copy link
Contributor

github-actions bot commented Jul 3, 2024

CT Test Results

    3 files    143 suites   49m 3s ⏱️
1 591 tests 1 542 ✅ 49 💤 0 ❌
2 330 runs  2 256 ✅ 74 💤 0 ❌

Results for commit d63d656.

♻️ 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

@sverker sverker merged commit 288dd2e into erlang:maint Jul 10, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant