-
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
2820 fix hanging child process #2824
Commits on Jan 13, 2023
-
Agent: Shutdown the SyncManager explicitly
Sometimes, the manager and agent processes are hanging instead of shutting down. This commit explicitly calls shutdown() on the manager object to ensure it terminates.
Configuration menu - View commit details
-
Copy full SHA for fd5c6dc - Browse repository at this point
Copy the full SHA fd5c6dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7ee338 - Browse repository at this point
Copy the full SHA d7ee338View commit details -
Configuration menu - View commit details
-
Copy full SHA for 88d353d - Browse repository at this point
Copy the full SHA 88d353dView commit details -
Agent: Spawn the manager process before acquiring the SystemSingleton
The SystemSingleton uses an abstract unix socket as a "lock" to ensure only one agent at a time runs on a given machine. It seems that if a manager process is spawned after this unix socket is created, the manager process inherits this file handle, which leads to the socket never being properly closed. Spawning the manager before the socket is opened is a quick solution to this problem. A better solution (see #2817) is to use a different method than a unix socket to achieve this goal, but, baby steps for now.
Configuration menu - View commit details
-
Copy full SHA for b0d0d1b - Browse repository at this point
Copy the full SHA b0d0d1bView commit details -
Agent: Stop the server process if the reactor is not running
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
Configuration menu - View commit details
-
Copy full SHA for d6e1ac2 - Browse repository at this point
Copy the full SHA d6e1ac2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cf68bd - Browse repository at this point
Copy the full SHA 3cf68bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for f33384c - Browse repository at this point
Copy the full SHA f33384cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 38c5bcf - Browse repository at this point
Copy the full SHA 38c5bcfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 13202ef - Browse repository at this point
Copy the full SHA 13202efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1329758 - Browse repository at this point
Copy the full SHA 1329758View commit details -
Configuration menu - View commit details
-
Copy full SHA for efacb05 - Browse repository at this point
Copy the full SHA efacb05View commit details -
Agent: Forcefully kill the LDAP server process if necessary
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
Configuration menu - View commit details
-
Copy full SHA for 4bacb7b - Browse repository at this point
Copy the full SHA 4bacb7bView commit details -
Agent: Use spawn context for LDAP server process
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
Configuration menu - View commit details
-
Copy full SHA for 409a77f - Browse repository at this point
Copy the full SHA 409a77fView commit details