Skip to content

[BUG] Terminal freezes in raw mode and deadlocks on early patch errorsΒ #1504

@parthivsaikia

Description

@parthivsaikia

Version of copa

v0.13.0-39-g59f49a7f

Expected Behavior

The CLI should print the error, cleanly shut down the progrock TUI, restore the terminal to its normal state, and exit the program gracefully.

output2.mp4

Actual Behavior

The CLI prints the error but leaves the terminal hijacked by the TUI's raw mode and deadlocks the background worker threads.

output1.mp4

Steps To Reproduce

  1. Use a vulnerability report missing necessary OS metadata e.g.
{
	"SchemaVersion": 2,
	"ArtifactName": "docker.io/archlinux:base-devel-20250907.0.417472",
	"ArtifactType": "container_image",
	"Results": [
		{
			"Target": "archlinux (archlinux 20250907.0.417472)",
			"Class": "os-pkgs",
			"Type": "archlinux",
			"Vulnerabilities": [
				{
					"VulnerabilityID": "CVE-TEST-1234",
					"PkgName": "filesystem",
					"InstalledVersion": "2024.01.01",
					"FixedVersion": "2099.12.31",
					"Layer": {
						"DiffID": "sha256:dummylayer"
					},
					"Severity": "HIGH"
				}
			]
		}
	]
}
  1. Run a patch command
./copacetic patch \
  --image docker.io/archlinux:base-devel-20250907.0.417472 \
  --report arch_report.json \
  --tag arch-patched:test
  1. See the error freeze the terminal

Are you willing to submit PRs to contribute to this bug fix?

  • Yes, I am willing to implement it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    πŸ†• New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions