Description
Issue Summary
When running in the foreground, normally hitting Ctrl-C will result in the an orderly shutdown, as seen in the logs:
2021-07-12 14:54:06,292 INFO [SpringContextShutdownHook] c.a.s.internal.home.HomeLockAcquirer Releasing lock on /tmp/shared 2021-07-12 14:54:06,328 INFO [SpringContextShutdownHook] c.a.s.internal.home.HomeLockAcquirer Releasing lock on /tmp 2021-07-12 14:54:06,396 INFO [SpringContextShutdownHook] c.a.b.i.boot.log.BuildInfoLogger Bitbucket 7.13.1 has shut down
However in 7.14.0 and 7.14.1 these messages do not appear, suggesting the orderly shutdown is not happening.
(This also applies to sending SIGTERM to the top-level process, I'm using Ctrl-C/SIGINT here for convenience.)
Steps to Reproduce
- Run ./bin/start-bitbucket.sh --no-search -fg
- Wait until startup is complete
- Press Ctrl-C
Expected Results
The above shutdown messages are normally seen.
Similar behaviour has been seen in the past in the Docker images, due to the subtleties of Docker signal propagation with nested startup shells. For this reason the Docker images provide their own alternative to start-bitbucket.sh which calls exec at appropriate points. It is notable that we are still seeing the above behaviour in the Docker image tests, which pass for 7.13 but fail for 7.14. The test can be seen here: https://bitbucket.org/atlassian-docker/docker-atlassian-bitbucket-server/src/ee144f7a05edfbd440d7ed26cfeaa930fc6267de/tests/test_image.py#lines-21
Actual Results
No logs are output.
Workaround
None known