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

tini + jvm + nginx, signal to jvm kill nginx #174

Open
mhagnumdw opened this issue Dec 26, 2020 · 1 comment
Open

tini + jvm + nginx, signal to jvm kill nginx #174

mhagnumdw opened this issue Dec 26, 2020 · 1 comment

Comments

@mhagnumdw
Copy link

Hi!

Sorry for the issue title, feel free to change

I've done a lot of research and haven't found a simple solution. I also don't want to leave the tini, like using an s6-overlay or supervisord. Thank you in advance for your help.

My container runs a jvm and a nginx. When I run a jvm diagnostic command, something like jcmd 8 VM.version, jvm receives a SIGQUIT and nginx too. The jvm continues to run as expected, but nginx is killed.

By monitoring the PID of the jvm and nginx with strace, it is possible to see both processes receiving the signal.

Below I gave an image that explains the whole scenario.

image

tini logs

[TRACE tini (1)] No child to reap
[TRACE tini (1)] No child to reap
[DEBUG tini (1)] Received SIGCHLD
[DEBUG tini (1)] Reaped child with pid: '14'
[TRACE tini (1)] No child to reap
[TRACE tini (1)] No child to reap

How can I get nginx to continue working after the jvm receives the diagnostic signal?

Thanks!

@yosifkit
Copy link

How can I get nginx to continue working after the jvm receives the diagnostic signal?

First, tini isn't meant to run multiple programs, it is not a full supervisor. The problem isn't that it should "keep running" , but that it should never get sent the SIGQUIT signal. Most likely jcmd is just sending the signal to the "process group" of the specified pid and not just the individual pid.

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