Hello,
I'd like to report a bug in the Docker Engine app's cold-boot logic. Full disclosure: the diagnosis below and this report were written with the help of Claude (Anthropic's AI assistant), based on my own logs and the app's init script.
Environment
- Model: [F6-425]
- TOS: [TOS 7.0.1298]
- Docker Engine: 29.4.0.007
- ~31 containers deployed with Docker Compose, all with "restart: unless-stopped"
Symptom
After a restart, only 7 of 31 containers came back. The other 24 had their restart policy set to "no" (docker inspect -> HostConfig.RestartPolicy.Name = "no"), although their compose files say unless-stopped. The 7 that did start now show "always" instead of unless-stopped.
Analysis
In /Volume2/@apps/DockerEngine/init.d/service, on cold boot:
- disable_container_autostart() rewrites every hostconfig.json from always/unless-stopped to "no" and saves the container list in /tmp/docker_autostart_containers;
- restore_container_autostart() later runs "docker update --restart=always" and "docker start" on that list.
Excerpt from /Volume2/@apps/DockerEngine/conf/log.txt (full log attached):
2026-10-18 00:27:16 - Disabled autostart for 31 container(s).
2026-10-18 00:27:45 - Restoring autostart and starting container ... (several)
2026-10-18 00:27:46 - Found existing dockerd (pid=9375) started without cold-boot protections, stopping it to restart properly.
2026-10-18 00:27:49 - Stopped existing dockerd, proceeding with cold-boot sequence.
2026-10-18 00:27:50 - Disabled autostart for 7 container(s).
2026-10-18 00:28:13 - Restored autostart for 7 container(s), skipped 0 due to mount validation.
A second run of the script started while the first one was still restoring containers. It killed the running dockerd (all running containers exited with code 255), rebuilt the autostart list from the containers still at always/unless-stopped at that moment (only the 7 already restored), and overwrote /tmp/docker_autostart_containers. The other 24 containers stay at "no" permanently: every later boot only sees and restores those 7 (confirmed by the following boots in the log). Before this event, the log shows clean cycles (e.g. 27/27 restored).
Suggested fixes
1. Prevent concurrent runs of the service script (e.g. flock on a lock file).
2. Keep the autostart list on persistent storage instead of /tmp, and never overwrite a list that has not been fully restored yet.
3. Restore each container's original restart policy (unless-stopped vs always) instead of forcing "always".
Note: the workaround suggested on the forum (switching to "always", see viewtopic.php?t=9883) does not protect against this issue, since containers end up at "no" regardless of their original policy.
Current workaround on my side: re-applying the policy with "docker update --restart unless-stopped" and starting the containers, plus a boot-time scheduled task as a safety net.
Best regards.
[Help] Docker Engine 29.4.0.007 – race in cold-boot autostart logic leaves containers permanently at restart policy "no"
- Izzyunster
- Posts: 2
- Joined: 18 Oct 2026, 07:40

- Izzyunster
- Posts: 2
- Joined: 18 Oct 2026, 07:40

Re: [Help] Docker Engine 29.4.0.007 – race in cold-boot autostart logic leaves containers permanently at restart policy
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was always).
2026-10-18 00:27:15 - Disabled autostart for container xx(was always).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was always).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was always).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was always).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for 31 container(s).
2026-10-18 00:27:16 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:27:16 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:27:25 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:27:44 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:46 - Restoring autostart and starting container xx...
2026-10-18 00:27:46 - Found existing dockerd (pid=9375) started without cold-boot protections, stopping it to restart properly.
2026-10-18 00:27:49 - Stopped existing dockerd, proceeding with cold-boot sequence.
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:50 - Disabled autostart for container xx(was always).
2026-10-18 00:27:50 - Disabled autostart for container xx(was always).
2026-10-18 00:27:50 - Disabled autostart for 7 container(s).
2026-10-18 00:27:50 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:27:50 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:27:59 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restored autostart for 7 container(s), skipped 0 due to mount validation.
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:59 - Disabled autostart for 7 container(s).
2026-10-18 00:52:59 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:52:59 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:53:08 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:53:26 - Restoring autostart and starting container xx...
2026-10-18 00:53:26 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:28 - Restored autostart for 7 container(s), skipped 0 due to mount validation.
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for 7 container(s).
2026-10-18 00:53:48 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:53:48 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:53:57 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:54:10 - Restoring autostart and starting container xx...
2026-10-18 00:54:10 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restored autostart for 7 container(s), skipped 0 due to mount validation.
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was always).
2026-10-18 00:27:15 - Disabled autostart for container xx(was always).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was always).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:15 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was always).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was always).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for container xx(was unless-stopped).
2026-10-18 00:27:16 - Disabled autostart for 31 container(s).
2026-10-18 00:27:16 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:27:16 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:27:25 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:27:44 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:45 - Restoring autostart and starting container xx...
2026-10-18 00:27:46 - Restoring autostart and starting container xx...
2026-10-18 00:27:46 - Found existing dockerd (pid=9375) started without cold-boot protections, stopping it to restart properly.
2026-10-18 00:27:49 - Stopped existing dockerd, proceeding with cold-boot sequence.
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:49 - Disabled autostart for container xx(was always).
2026-10-18 00:27:50 - Disabled autostart for container xx(was always).
2026-10-18 00:27:50 - Disabled autostart for container xx(was always).
2026-10-18 00:27:50 - Disabled autostart for 7 container(s).
2026-10-18 00:27:50 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:27:50 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:27:59 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restoring autostart and starting container xx...
2026-10-18 00:28:13 - Restored autostart for 7 container(s), skipped 0 due to mount validation.
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:58 - Disabled autostart for container xx(was always).
2026-10-18 00:52:59 - Disabled autostart for 7 container(s).
2026-10-18 00:52:59 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:52:59 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:53:08 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:53:26 - Restoring autostart and starting container xx...
2026-10-18 00:53:26 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:27 - Restoring autostart and starting container xx...
2026-10-18 00:53:28 - Restored autostart for 7 container(s), skipped 0 due to mount validation.
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for container xx(was always).
2026-10-18 00:53:48 - Disabled autostart for 7 container(s).
2026-10-18 00:53:48 - Waiting for storage volumes to mount (timeout=120s)...
2026-10-18 00:53:48 - Detected 7 data volume(s) (was 0), waiting for stability...
2026-10-18 00:53:57 - Storage volumes stable: 7 data volume(s) mounted.
2026-10-18 00:54:10 - Restoring autostart and starting container xx...
2026-10-18 00:54:10 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restoring autostart and starting container xx...
2026-10-18 00:54:11 - Restored autostart for 7 container(s), skipped 0 due to mount validation.
Re: [Help] Docker Engine 29.4.0.007 – race in cold-boot autostart logic leaves containers permanently at restart policy
Thanks for sharing! This root-cause analysis regarding the race condition in the cold-boot initialization script is exceptionally professional and thorough.
We have synchronized your complete report—including the log trace, the breakdown of concurrent script execution triggering dockerd restarts, and your three suggested fixes (using flock to prevent concurrent execution, moving the autostart queue to persistent storage, and accurately preserving original unless-stopped and always policies)—directly with our team for evaluation.
Thank you once again for your invaluable contribution to the community!
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
Re: [Help] Docker Engine 29.4.0.007 – race in cold-boot autostart logic leaves containers permanently at restart policy
Thanks again for your feedback!
We have confirmed that this issue exists and will be fixed in subsequent versions.
Please Stay tuned.
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
