-
Notifications
You must be signed in to change notification settings - Fork 60
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
Explicitely use the fork context for multiprocessing to fix running boefjes on macOS #3576
Explicitely use the fork context for multiprocessing to fix running boefjes on macOS #3576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on my machine now! (MacOS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I haven't encountered this issue (yet?) and there's no context, I don't have much to add. But can you elaborate a bit more about what this exactly fixes? What specific differences in behavior do we see when running this in a containerized environment on MacOS?
@ammar92 Since MacOS uses a spawn by default instead of a fork, apparently the system tries to pickle the arguments of the process's target (start_working) and fails to do that. Hence @noamblitz was experiencing issues starting the boefje worker and API outside of Docker. |
dns-records and nmap-tcp work succesfully from inside the docker-boefjes. Tested on Ubuntu 22.04.4 LTS |
Changes
Adds no functionality but fixes a bug experienced by @noamblitz.
Note that, as I just noticed, from Python 3.14 onward we would have to do this anyways or have a new bug:
![image](https://private-user-images.githubusercontent.com/46660228/371037052-9ee0d626-a232-4836-916b-bfc2d5f175cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDgyMjcsIm5iZiI6MTczOTU0NzkyNywicGF0aCI6Ii80NjY2MDIyOC8zNzEwMzcwNTItOWVlMGQ2MjYtYTIzMi00ODM2LTkxNmItYmZjMmQ1ZjE3NWNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE1NDUyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxMDM3OTY5M2VmYTMwZTRlMGYwY2UzZjliYWE5Y2VjMjE2ZjY4ODJlNGVhNzIwN2M0YTc3NzJmMjI2MWFlM2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RcWszeiwtJty1YnBip3SAfHY5F861RlX48HBPRPbsts)
Issue link
Demo
QA notes
Please run make kat and verify the boefjes still run properly!
Code Checklist
Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.