cron.sh doesn't stop without SIGKILL

Open Beginner friendly
#2,483 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
docker, shell
Domain
devops

Research direction

Start with the cron.sh script used by the Docker image and reproduce the issue with the provided docker run and docker stop commands. Trace how the script handles the default stop signals, then verify that the container stops without waiting for the timeout or requiring SIGKILL.

Written by the indexing model from the issue text.

Description

1. To develop bug feature: cron image

The cron.sh script doesn't stop with the default SIGWINCH signal (or SIGTERM), which causes docker stop to wait for 10 seconds and fail over to SIGKILL. To reproduce:

docker run --name nextcloud-cron --rm --entrypoint /cron.sh docker.io/library/nextcloud
docker stop nextcloud-cron # Takes 10 seconds to complete

Docker hides this by silently falling back to SIGKILL, but it makes stopping take an unnecessary 10 seconds. If using podman, podman stop nextcloud-cron returns

WARN[0010] StopSignal SIGWINCH failed to stop container nextcloud-cron in 10 seconds, resorting to SIGKILL
Dominant language
Shell
Stars
7.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/docker

All issues in nextcloud/docker

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.