Skip to content

Unable to reattach to puma worker #87

@mdkent

Description

@mdkent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions