← Back to issue list

Lots of noise produced at the end of build

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2147036
Type
issue
State
open
Author
~nteodosio
Labels
—
Created
Updated
Closed
—

Current evaluation

A failed snapcraft --debug build prints a huge escaped duplicate of its output before opening a shell, obscuring the error; the issue remains open and untriaged.

Suggested action: needs triage

Reason: The report clearly identifies severe diagnostic noise: about 23,000 lines are printed with literal \n sequences, but it provides no minimal project, build command, or exact origin of the escaped text. Current lifecycle code opens a debugging shell after a Snapcraft exception, confirming the relevant path, but further reproduction is needed to identify where the output is escaped and select the appropriate truncation or log-retention fix.

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 20 Complexity: 45 Confidence: 78 Actionability: 65

Issue body

I ran 'snapcraft --debug'. The build failed. The execution returned to the shell inside the container, with a huge amount of noise, which consists namely of the failed build's normal output except that newline characters are replaced by the literal string '\n', right before the end of execution. The scrollback, as catpured inside Tmux with its capture-pane command, is attached. Note how the noise begins at line 65798 and ends thousands of lines later, at line number 89571. The default configuration of many terminal emulators won't even save that many lines in memory. As such, to the "debug the failed build" problem Snapcraft prepends a new one, namely the problem of figuring out where the failed build's output is even located. It is just a disheartening sight. Sure, right at the end of the execution, it tells us that the execution log is at /tmp/snapcraft.log, which is no real solace considering that inside the container there is no text editor, not even 'cat' or 'less'. Presumably because --debug was used, the log is not saved in the host's filesystem under ~/.local/state/snapcraft/ either. Expected behavior: Build output at most couple of lines above the end of execution, instead of thousands of lines above the end of execution.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 55
Quick Win: 20
Complexity: 45
Confidence: 78
Actionability: 65
needs triage A failed snapcraft --debug build prints a huge escaped duplicate of its output before opening a shell, obscuring the error; the issue remains open and untriaged.
stealth/space-bunny-alpha
Impact: 55
Quick Win: 30
Complexity: 31
Confidence: 89
Actionability: 78
needs triage Failed --debug builds re-emit the entire managed-instance log at debug level, burying the failure in thousands of escaped-line output entries; no maintainer triage yet.
stealth/space-bunny-alpha
Impact: 50
Quick Win: 26
Complexity: 32
Confidence: 92
Actionability: 77
needs triage Awaiting triage: snapcraft --debug replays the entire container build log on exit, turning newlines into literal \n and burying the failure in thousands of lines.
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 38
Staleness: 55
Complexity: 25
Confidence: 45
Support Request: 10
needs triage Excessive output noise when using --debug mode; newline characters replaced by literal \n strings, creating thousands of lines of noise that obscure the actual build error
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 35
Confidence: 85
Support Request: 10
needs triage snapcraft --debug prints thousands of lines of build output with literal characters right before returning to the container shell, obscuring the actual error log. Unlabelled, no maintainer response, inactive for 112 days.
qwen/qwen3.6-35b-a3b
Staleness: 65
Complexity: 25
Confidence: 90
Support Request: 10
needs triage Snapcraft --debug prints thousands of lines of malformed build output at the end of a failed build, obscuring the actual error. Currently untriaged and inactive for 111 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 30
Confidence: 85
Support Request: 10
needs triage snapcraft --debug outputs thousands of lines of mangled build logs at execution end, obscuring failures. Unlabeled, zero maintainer comments, inactive for 99 days.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1609803 snapcraft cleanbuild --no-clean-up snapcraft (launchpad) closed Cleanbuild debugging landed in snapcore/snapcraft PR #740 (commit a24083e75); follow-up PR #1404 made --debug enter a shell when builds fail.
70%