Skip to content

Docker AsyncProcess can split logs #111

@MaciejKaszynski

Description

@MaciejKaszynski

Description

We have observed some log lines be split into two pytest logs.

In our cpp code we have the log

log.LogFatal() << "clock() at failed initial state transition:"
                           << (static_cast<double>(clock()) / (static_cast<double>(CLOCKS_PER_SEC) / 1000.0)) << "ms";

This then can be seen on the pipeline:
https://github.com/eclipse-score/lifecycle/actions/runs/26170133165/job/76985174099?pr=194#step:5:1680

[2026-05-20 14:47:23.692] [INFO] [launch_manager] 2026/05/20 14:47:23.8443692 3403461 000 ECU1 NONE LM log fatal verbose 3
[2026-05-20 14:47:23.693] [INFO] [launch_manager] clock() at failed initial state transition: 38.712000 ms

From a first look, this might be caused by the following code:

def _process_text(text):
for line in text.strip().split("\n"):
if line:
cmd_logger.info(line)
output_lines.append(line)

I think the stream should be somehow buffered so that log lines are not split.

Analysis results

No response

Solution

No response

Error Occurrence Rate

Sporadic

How to reproduce

No response

Supporting Information

No response

Classification

Minor

First Affected Release

not released (main)

Last Affected Release

not released (main)

Expected Fixed Release

before release (main)

Category

  • Safety Relevant
  • Security Relevant

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions