Skip to content

aarch64: signal not working for go runtime #1289

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

Closed
shrik3 opened this issue May 24, 2024 · 3 comments
Closed

aarch64: signal not working for go runtime #1289

shrik3 opened this issue May 24, 2024 · 3 comments
Assignees

Comments

@shrik3
Copy link
Collaborator

shrik3 commented May 24, 2024

reported #1217 (comment)

I think the issue is that the current sig delivery is not dealing with user custom stack correctly (that was set by sys_sigaltstack)

@shrik3 shrik3 self-assigned this May 24, 2024
@mhomidi
Copy link
Collaborator

mhomidi commented Jul 12, 2024

Hi @shrik3,

The issue is that we do not need to reset registers in the this line qlib/kernel/threadmgr/task_signals.rs:1313. Just uncomment this and everything works.

After seeing the go-runtime source code, I figured out that they read the address of g from some of these register we made them zero. So, the issue comes from it because the register point to g is pointing to null.

@shrik3
Copy link
Collaborator Author

shrik3 commented Jul 12, 2024

Hi @shrik3,

The issue is that we do not need to reset registers in the this line qlib/kernel/threadmgr/task_signals.rs:1313. Just uncomment this and everything works.

After seeing the go-runtime source code, I figured out that they read the address of g from some of these register we made them zero. So, the issue comes from it because the register point to g is pointing to null.

thanks for figuring out the problem! This makes sense. However I'm not sure whether we should leave the saved trap frame (spelt pt_regs) totally as is. I'll look into linux signal handling later.

(and why should that differ from x86? how does go runtime find the g there?)

@shrik3
Copy link
Collaborator Author

shrik3 commented Aug 19, 2024

should be fixed by #1326 , reopen should other related issues emerge.

@shrik3 shrik3 closed this as completed Aug 19, 2024
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