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

Add detach in scope cli #1110

Merged
merged 7 commits into from
Oct 4, 2022
Merged

Add detach in scope cli #1110

merged 7 commits into from
Oct 4, 2022

Conversation

michalbiesek
Copy link
Contributor

@michalbiesek michalbiesek commented Sep 16, 2022

Ref #1107

- [ ] Handle the scenario when we attach to an already scoped process should we overwrite the scope configuration always?
We overwrite the configuration during reattach

@michalbiesek michalbiesek linked an issue Sep 16, 2022 that may be closed by this pull request
@michalbiesek michalbiesek changed the base branch from release/1.2 to master October 3, 2022 16:08
@michalbiesek michalbiesek marked this pull request as ready for review October 3, 2022 16:21
@michalbiesek
Copy link
Contributor Author

michalbiesek commented Oct 3, 2022

The logic is ready to review. I am not sure which docs section should be updated/extended regarding the detach, e.g.:

- Instrument both static and dynamic executables.
- Attach to processes *while they are running* or start when the process does.
- Run on Alpine Linux, another Linux distribution based on musl libc, or on a glibc-based distro.

"Attach to processes while they are running or start when the process does."
cc @abetones

@seanvaleo
Copy link
Collaborator

seanvaleo commented Oct 3, 2022

I get this message when re-attaching multiple times quickly ; or detaching multiple times quickly:
open() of dynamic config file: Permission denied
I understand why, and that it's a library error not a cli error, but maybe we just handle it with a cleaner message in this case?

@seanvaleo
Copy link
Collaborator

If i run top in two terminals then:
scope attach top to bring up the selection menu.
Whatever I choose, I get:
PID does not exist

@michalbiesek
Copy link
Contributor Author

If i run top in two terminals then:
scope attach top to bring up the selection menu.
Whatever I choose, I get:
PID does not exist

Good catch - done in 853fa85

@michalbiesek
Copy link
Contributor Author

I get this message when re-attaching multiple times quickly ; or detaching multiple times quickly: open() of dynamic config file: Permission denied I understand why, and that it's a library error not a cli error, but maybe we just handle it with a cleaner message in this case?

I have created an issue for this: #1123 . I think this can be somehow handled by modifying creation of our file because I believe the issue is related to file sealing. I did not observe a similar problem if I change the location

#define DYN_CONFIG_CLI_DIR "/dev/shm"
to /tmp

@seanvaleo seanvaleo merged commit de6be67 into master Oct 4, 2022
@michalbiesek michalbiesek deleted the feature/detach-cli branch October 4, 2022 15:19
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

Successfully merging this pull request may close these issues.

Detach in CLI
2 participants