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

bug: java modular input launchers in windows may not kill java process when it be terminated #92

Closed
vettal-wu opened this issue Jan 16, 2017 · 1 comment

Comments

@vettal-wu
Copy link
Contributor

I run modular input using shim.exe in windows.

When I stop splunk, I found that the shim.exe process will be killed, but the java process is still running. And in splunkd.log, there is a warning messages:

WARN  ProcessRunner - Process with pid 4840 did not exit within a given grace period after being signaled to exit. Will have to forcibly terminate.

Process 4840 is the shim.exe.

I read the code of shim.cpp. I found that shim.exe will wait splunkd and java process using function waitOutcome = WaitForMultipleObjects(2, processHandles, FALSE, INFINITE);. If splunkd is stopping, it will be signaled and this function will return. Then we can send CTRL+C signal to java process.

But as I found, shim.exe can't exit gracefully within the given grace period. So it is terminated by splunk and will not send CTRL+C signal to java process. I still don't know how long the given grace period.

I think even if the shim.exe be terminated, we should also ensure the related java process be killed.

@shakeelmohamed
Copy link
Contributor

PR has been merged to develop

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

No branches or pull requests

2 participants