Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12919

Hitting CTRL-C when running in the foreground does not appear to result in a clean shutdown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.14.0, 7.14.1
    • StartUp

    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

      1. Run ./bin/start-bitbucket.sh --no-search -fg
      2. Wait until startup is complete
      3. 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            ssmith Steve Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: