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

bug: Wrong main_thread offset #78

Open
kakkoyun opened this issue Feb 10, 2024 · 1 comment
Open

bug: Wrong main_thread offset #78

kakkoyun opened this issue Feb 10, 2024 · 1 comment

Comments

@kakkoyun
Copy link

I have discovered that >= 3.0.0 the main_thread_offset is wrong

main_thread_offset: 32

It was supposed to be 40, but it's been calculated as 32.

CleanShot 2024-02-10 at 21 23 43

I have no idea how things are not broken 🤔

I've opened the issue here to track it down. I'll report it back if I find something else.

@javierhonduco
Copy link
Owner

Thanks for opening the issue, Kemal! I need to refresh my understanding of how actors and threads work under the hood, but I think the naming I picked might be wrong. I think that using main_ractor is more correct, as we want to fetch the stack of the currently executing code (no matter if it's the ractor or thread that was created first or not).

The best way to check this, besides inspecting CRuby's implementation might be to write a reproducer with multiple threads and ractors and checking which stack we are reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants