minus icon indicating copy to clipboard operation
minus copied to clipboard

BUG: terminal freeze/crash when using `minus` with `tracing`

Open ljahier opened this issue 9 months ago • 0 comments

Describe the bug When integrating the minus crate with tracing in my Rust application, the terminal freezes/crash upon invoking the pager. This issue requires opening a new terminal to forcibly terminate the process, sometimes necessitating multiple attempts to kill process.

To Reproduce Steps to reproduce the behavior:

  1. Clone the repository: https://gist.github.com/ljahier/adfd4d90c5467f7f54c93ea9508bc9d4
  2. Build and run the application.
  3. Use LLDB to set a breakpoint at the display_text function.
    • (lldb) break set --name display_text
    • (lldb) run
  4. Continue execution and, when the breakpoint is hit, step over (n) to the next state.
  5. Observe that the pager opens and the terminal becomes unresponsive.

Expected behavior The pager should display content without causing the terminal to freeze, allowing normal interaction.

Screenshots Not applicable.

Desktop:

  • OS: macOS Sequoi 15.3.2
  • Terminal: Ghostty
  • Shell: bash
  • minus Version: 5.6.1

Additional context

  • The issue occurs specifically when combining minus with tracing. Using either independently does not produce the problem.
  • Attempts to reproduce the bug in isolated environments without minus have been unsuccessful.
  • The freeze suggests a potential deadlock or threading issue related to the tracing context.
  • Without tracing, the application runs as expected without any terminal freezing.

ljahier avatar Mar 31 '25 05:03 ljahier