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

Unable to reattach to puma worker #87

Open
mdkent opened this issue Jul 30, 2021 · 0 comments
Open

Unable to reattach to puma worker #87

mdkent opened this issue Jul 30, 2021 · 0 comments

Comments

@mdkent
Copy link

mdkent commented Jul 30, 2021

Maybe this is something unique to puma workers but we can't attach to them more than once:

a@b:/u/apps/c/current$ bundle exec rbtrace -p 7879 -e "1+1"
*** attached to process 7879
>> 1+1
=> 2
*** detached from process 7879
a@b:/u/apps/c/current$ ipcs

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
0xffffe139 1769473    app        666        0            0

If attach gdb here I can see it running the rbtracer_detach() cleanup just fine in the extension.

Now the subsequent call fails:

a@b:/u/apps/c/current$ bundle exec rbtrace -p 7879 -e "1+1"
Error: argument --pid (process already being traced?).
Try --help for help.
a@b:/u/apps/c/current$ ipcs

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
0xffffe139 1769473    app        666        256          1

from some light gdb and stracing it appears that attempt #2 is sending SIGURG and writing to the message queue, but the rbtracer.so extension is no longer firing the signal handler. I can't figure out why.

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

1 participant