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

Turborepo panics when Ctrl-Cing #8072

Closed
1 task done
weyert opened this issue May 2, 2024 · 2 comments
Closed
1 task done

Turborepo panics when Ctrl-Cing #8072

weyert opened this issue May 2, 2024 · 2 comments
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo

Comments

@weyert
Copy link
Contributor

weyert commented May 2, 2024

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

n/a

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

turbo 1.13.4-canary.0

Describe the Bug

name = "turbo"
operating_system = "Mac OS 14.4.1 [64-bit]"
crate_version = "1.13.4-canary.0"
explanation = """
file '/Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/terminal/terminal.rs' at line 442
"""
cause = "chunk size must be non-zero"
method = "Panic"
backtrace = """

0: 0x10530e924 - __mh_execute_header
1: 0x104f31dd4 - __mh_execute_header
2: 0x104b6c764 - __mh_execute_header
3: 0x104b69cf4 - __mh_execute_header
4: 0x104b32430 - __mh_execute_header
5: 0x18a932f94 - __pthread_joiner_wake"""

Expected Behavior

Not panicing when trying to close/stop turbo using ctrl-c

To Reproduce

Not sure how

Additional context

No response

@weyert weyert added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels May 2, 2024
@weyert
Copy link
Contributor Author

weyert commented May 7, 2024

After getting out of sleep over night, got a similar panic:

name = "turbo"
operating_system = "Mac OS 14.4.1 [64-bit]"
crate_version = "1.13.4-canary.0"
explanation = """
file '/Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/terminal/terminal.rs' at line 442
"""
cause = "chunk size must be non-zero"
method = "Panic"
backtrace = """

   0: 0x103b62924 - __mh_execute_header
   1: 0x103785dd4 - __mh_execute_header
   2: 0x1033c0764 - __mh_execute_header
   3: 0x1033bdcf4 - __mh_execute_header
   4: 0x103386430 - __mh_execute_header
   5: 0x18b3c6f94 - __pthread_joiner_wake"""

chris-olszewski added a commit that referenced this issue May 9, 2024
### Description

Changes our UI to render in the alternative screen (think `vim` or
`less`)

This provides a few benefits:
- We can render to the entire terminal without worrying about
over-allocating space and removing useful information from the screen.
- Users won't need to scroll up at the end of a run to see the task logs
- We no longer use `insert_before` for persisting task logs. This
function panics if there isn't an available row to render to (#8072) or
rendering terminal logs that have an area that exceeds `u16::MAX`
(#7843). Instead our log persisting story is a "simple"
`stdout.write_all()`.
 - Removes hacks added to avoid hitting #7843 

We write the logs in a row-wise fasion as `vt100` attempts to optimize
performance by using cursor moves to avoid necessary writes. This
creates problems when printing multiple terminal screens as the cursor
move coordinates will be incorrect.

### Testing Instructions



https://github.com/vercel/turbo/assets/4131117/9746dcd3-188e-48fd-a52d-21d95d0e6e43



Closes TURBO-2979
@chris-olszewski
Copy link
Contributor

Okay, now that we're rendering to the alternative screen and not using insert_before we shouldn't hit this codepath at all. If this is encountered in 1.13.4-canary.3 or later, then please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo
Projects
None yet
Development

No branches or pull requests

2 participants