Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mullvad-cli sometimes panics if not printing to stdout? #7689

Open
2 tasks done
rivke41levp656 opened this issue Feb 19, 2025 · 1 comment
Open
2 tasks done

mullvad-cli sometimes panics if not printing to stdout? #7689

rivke41levp656 opened this issue Feb 19, 2025 · 1 comment
Labels

Comments

@rivke41levp656
Copy link

Is it a bug?

  • I know this is an issue with the app, and contacting Mullvad support is not relevant.

I have checked if others have reported this already

  • I have checked the issue tracker to see if others have reported similar issues.

Current Behavior

If the output of mullvad-cli is not printed to stdout, it sometimes panics.

Expected Behavior

It should not panic.

Steps to Reproduce

With mullvad-cli version 2025.4, and Rust version 1.84.1-1 on Arch Linux, capture the output of mullvad-cli, as in the following script:

#!/bin/bash

# Error occurs in ~15% of cases?
status="$(mullvad status | head -n1)"

# Errors ~1%?
read -r status < <(mullvad status)

# Errors ~100%.
status="$(mullvad status | echo)"

and it will sometimes print:

thread 'main' panicked at std/src/io/stdio.rs:1123:9:
failed printing to stdout: Broken pipe (os error 32)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Similar issue from another rust application: typst/typst#5439

I first noticed this after upgrading to mullvad version 2024.6 with Rust ver 1.82.0.

Failure Logs

Operating system version

No response

Mullvad VPN app version

No response

Additional Information

No response

@faern
Copy link
Member

faern commented Feb 19, 2025

I can reproduce! Thank you for reporting this. We should handle stdout being closed in a better way.

@hulthe hulthe added Linux Issues related to Linux and removed Linux Issues related to Linux labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants