-
Notifications
You must be signed in to change notification settings - Fork 788
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
Agent leaves hanging child processes #2820
Labels
Bug
An error, flaw, misbehavior or failure in the Monkey or Monkey Island.
Complexity: High
Impact: High
Plugins
Comments
mssalvatore
added
Bug
An error, flaw, misbehavior or failure in the Monkey or Monkey Island.
Impact: High
Complexity: High
Plugins
labels
Jan 11, 2023
It turns out the root cause was the Log4Shell exploiter's LDAP server was not being properly closed. This is resolved by 69c2c88. EDIT:
|
mssalvatore
added a commit
that referenced
this issue
Jan 12, 2023
Just because the Twisted reactor failed to start doesn't mean that the server process is not running. The server process should be stopped before raising the LDAPServerStartError, otherwise the server or process may be left running indefinitely. Fixes #2820
mssalvatore
added a commit
that referenced
this issue
Jan 12, 2023
mssalvatore
added a commit
that referenced
this issue
Jan 12, 2023
Just because the Twisted reactor failed to start doesn't mean that the server process is not running. The server process should be stopped before raising the LDAPServerStartError, otherwise the server or process may be left running indefinitely. Fixes #2820
mssalvatore
added a commit
that referenced
this issue
Jan 12, 2023
mssalvatore
added a commit
that referenced
this issue
Jan 12, 2023
Just because the Twisted reactor failed to start doesn't mean that the server process is not running. The server process should be stopped before raising the LDAPServerStartError, otherwise the server or process may be left running indefinitely. Fixes #2820
mssalvatore
added a commit
that referenced
this issue
Jan 12, 2023
mssalvatore
added a commit
that referenced
this issue
Jan 12, 2023
Using Twisted for the Log4Shell exploiter has been nothing but trouble since the beginning. When we refactor this exploiter we should use another solution. In the meanwhile, we must be doing something wrong WRT stopping Twisted. The heavy-handed approach is to SIGKILL the process. This isn't ideal, but will be changed when we refactor this component. Issue #2820
mssalvatore
added a commit
that referenced
this issue
Jan 13, 2023
Just because the Twisted reactor failed to start doesn't mean that the server process is not running. The server process should be stopped before raising the LDAPServerStartError, otherwise the server or process may be left running indefinitely. Fixes #2820
mssalvatore
added a commit
that referenced
this issue
Jan 13, 2023
mssalvatore
added a commit
that referenced
this issue
Jan 13, 2023
Using Twisted for the Log4Shell exploiter has been nothing but trouble since the beginning. When we refactor this exploiter we should use another solution. In the meanwhile, we must be doing something wrong WRT stopping Twisted. The heavy-handed approach is to SIGKILL the process. This isn't ideal, but will be changed when we refactor this component. Issue #2820
cakekoa
pushed a commit
that referenced
this issue
Jan 13, 2023
cakekoa
pushed a commit
that referenced
this issue
Jan 13, 2023
Using Twisted for the Log4Shell exploiter has been nothing but trouble since the beginning. When we refactor this exploiter we should use another solution. In the meanwhile, we must be doing something wrong WRT stopping Twisted. The heavy-handed approach is to SIGKILL the process. This isn't ideal, but will be changed when we refactor this component. Issue #2820
cakekoa
added a commit
that referenced
this issue
Jan 13, 2023
Forked processes will inherit all resources from the parent process. This includes the socket we use for ensuring only a single agent is running at any given time. Additionaly, threads will also be inherited by the forked process, which could cause problems. Using a spawn context should fix our singleton issue, and give the process a cleaner environment in which to run. Issue #2820
cakekoa
added a commit
that referenced
this issue
Jan 13, 2023
Forked processes will inherit all resources from the parent process. This includes the socket we use for ensuring only a single agent is running at any given time. Additionaly, threads will also be inherited by the forked process, which could cause problems. Using a spawn context should fix our singleton issue, and give the process a cleaner environment in which to run. Issue #2820
mssalvatore
added a commit
that referenced
this issue
Jan 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
An error, flaw, misbehavior or failure in the Monkey or Monkey Island.
Complexity: High
Impact: High
Plugins
Description
After the agent completes its task, it is unable to exit. It seems that the process is being kept open by its child processes. It's unclear why the child processes do not exit. This occurs intermittently but happens most frequently if the agent is run within a docker container.
The effects of this are:
SystemSingleton
is never properly released. It would seem that maybe one of the child processes has a copy of the file descriptor for the unix socket, but it's not quite clear how that's possible since this occurs even of the child processes are spawned before the socket is opened.Tasks
The text was updated successfully, but these errors were encountered: