microsoft / microsoft/windows-container-tools

STDOUT propagation is broken after termination signal

Open
#169 5 comments 0 reactions 2 assignees View on GitHub

@CharityKathure is already working on this.

Since Sep 5, 2024.

bug
Dominant language
C++
Stars
277
Forks
77
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
After docker sends the termination signal to the container, any STDOUT from the hosted process is not propagated anymore to the container.

To Reproduce
Docker compose project here: https://github.com/david-garcia-garcia/dockernosigterm

In the dockerfile you have two entrypoints, one with LogMonitor the other without it.

Without log monitor, when you shutdown the container you get this output in the container stdout:

2024-02-20 21:57:43 True
2024-02-20 21:57:43 Waiting for console control event...
2024-02-20 21:57:47 Task progress: 1 of 20
2024-02-20 21:57:48 Task progress: 2 of 20
2024-02-20 21:57:49 Task progress: 3 of 20
2024-02-20 21:57:50 Task progress: 4 of 20
2024-02-20 21:57:51 Task progress: 5 of 20
2024-02-20 21:57:52 Task progress: 6 of 20
2024-02-20 21:57:53 Task progress: 7 of 20
2024-02-20 21:57:54 Task progress: 8 of 20
2024-02-20 21:57:55 Task progress: 9 of 20
2024-02-20 21:57:56 Task progress: 10 of 20
2024-02-20 21:57:57 Task progress: 11 of 20
2024-02-20 21:57:58 Task progress: 12 of 20
2024-02-20 21:57:59 Task progress: 13 of 20
2024-02-20 21:58:00 Task progress: 14 of 20
2024-02-20 21:58:01 Task progress: 15 of 20
2024-02-20 21:58:02 Task progress: 16 of 20
2024-02-20 21:58:03 Task progress: 17 of 20
2024-02-20 21:58:04 Task progress: 18 of 20
2024-02-20 21:58:05 Task progress: 19 of 20
2024-02-20 21:58:06 Task progress: 20 of 20

When using the entry point with LogMonitor.exe you get nothing.

Expected behavior
Output from the hosted process is properly propagated until the hosted process totally terminates.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.