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

Wip/dumb tracer #85

Merged
merged 38 commits into from
May 11, 2021
Merged

Wip/dumb tracer #85

merged 38 commits into from
May 11, 2021

Conversation

Kyle-Kyle
Copy link
Contributor

@Kyle-Kyle Kyle-Kyle commented Apr 30, 2021

@Kyle-Kyle
Copy link
Contributor Author

changes:

  1. rework flight and scripter to allows fine-grained interaction with the target
  2. some changes needed to use the new features in shellphish-qemu

Kyle-Kyle and others added 27 commits May 4, 2021 11:45
…g one, and return the crashing one as the default to be consistent
@Kyle-Kyle
Copy link
Contributor Author

It looks like the merge branch passed and wip branch didn't pass. This is expected, because colorguard does not have a wip/dumb_tracer branch.

@@ -9,6 +9,11 @@
import io
import re

try:
import snapshot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this dependency? Can we get it marked as an extra_requires in setup.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is @Lukas-Dresel 's snapshot debugging code. I'll let him answer this question.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for my snapshot debugging extension (which is really just glorified fork() with parents blocking to handle stdio). It's pushed here Lukas-Dresel/snapshot. It's super useful for debugging anything long running where it's easy to mess up the stepping through.

One issue is that to revert a snapshot, it exits the child process and the parent process resumes as-is. However, exiting the child process causes the archr context managers to kill the docker containers it spun up, even though those are still used in all parent processes. This code only deletes the containers if we're not in a snapshot, so that only the final process exit will kill it.

That being said, this is obviously far from perfect, and more one of a myriad of issues (sockets having had data sent, processes having been started/stopped, etc. Ideally for the ones we can (killing processes, containers) I'd like to have this here so that the only bugs that could be introduced are state-based ones, not random docker container doesn't exist which prevents me from debugging further.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing as it is debugging code, I am going to remove it before it goes to master.

@rhelmot rhelmot merged commit 756e966 into master May 11, 2021
@rhelmot rhelmot deleted the wip/dumb_tracer branch May 11, 2021 07:58
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.

5 participants