-
Notifications
You must be signed in to change notification settings - Fork 651
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
After running long running command, terminal seems to hang (with fish plugin franciscolourenco/done) #1917
Comments
Running on macOS M1 Max MBP macOS 14.5 |
Do you ever resize the terminal or is this from its default size? |
Default size. I'll test resizing it now |
No need just curious since we know of some memory leaks on certain resize ops that are getting fixed soon. I’ll test this out soon! |
ya resizing has no affect. To regain control and be able to continue using ghostty I have to Ctrl+C So it kinda seems like ghostty isn't responding the the signals from the process that it's done and exited? |
That’d be a shell issue. Ghostty doesn’t do any process management besides spinning up the one process (shell) on start. What shell are you using? |
|
Just tested However, just tested |
I just tried with |
As another approach, if you run |
Ya I get the TCC permissions window too and I select to decline to allow it access to other apps, then it continues on happily until the hang/freeze etc. Again, with iTerm2 it doesn't happen, but I got the same TCC pop-up |
I am using this I also have LockdownMode enabled, but doubt that'd have any effect. |
Maybe it's the plugin |
This very much sounds possible. Ghostty supports user notifications which it's presumably using and should work. User notifications SHOULD all be async... but perhaps something is blocking with it. |
Removing plugin and trying again: 😆 no hang... |
Okay awesome. I think the best thing would be to reproduce that hang if possible while running Ghostty under Xcode and then pause it and we should get all the stack traces. |
Just wanted to say I've also been having this issue for a while now, same fish plugin! Mentioned it in Discord earlier - https://discord.com/channels/1005603569187160125/1005603569711452192/1196333773109870632 - but neglected to open an issue. Happy to help reproduce, let me try that suggestion to get the stack traces... |
I've having trouble with Nix building locally, are you able to get that stack trace @blacktop? |
I managed to build and reproduce the hang locally but not sure what to do / how to provide the stack trace. |
|
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x000000019e9861f4 libsystem_kernel.dylib`mach_msg2_trap + 8
frame #1: 0x000000019e998b24 libsystem_kernel.dylib`mach_msg2_internal + 80
frame #2: 0x000000019e98ee34 libsystem_kernel.dylib`mach_msg_overwrite + 476
frame #3: 0x000000019e986578 libsystem_kernel.dylib`mach_msg + 24
frame #4: 0x000000019eaa6680 CoreFoundation`__CFRunLoopServiceMachPort + 160
frame #5: 0x000000019eaa4f44 CoreFoundation`__CFRunLoopRun + 1208
frame #6: 0x000000019eaa4434 CoreFoundation`CFRunLoopRunSpecific + 608
frame #7: 0x00000001a924819c HIToolbox`RunCurrentEventLoopInMode + 292
frame #8: 0x00000001a9247fd8 HIToolbox`ReceiveNextEventCommon + 648
frame #9: 0x00000001a9247d30 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 76
frame #10: 0x00000001a2303d68 AppKit`_DPSNextEvent + 660
frame #11: 0x00000001a2af9808 AppKit`-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
frame #12: 0x00000001a22f709c AppKit`-[NSApplication run] + 476
frame #13: 0x00000001a22ce2e0 AppKit`NSApplicationMain + 880
frame #14: 0x000000010253296c ghostty`main at main.swift:14:5
frame #15: 0x000000019e63e0e0 dyld`start + 2360
``` |
(lldb) bt
* thread #6, name = 'com.apple.NSEventThread'
* frame #0: 0x000000019e9861f4 libsystem_kernel.dylib`mach_msg2_trap + 8
frame #1: 0x000000019e998b24 libsystem_kernel.dylib`mach_msg2_internal + 80
frame #2: 0x000000019e98ee34 libsystem_kernel.dylib`mach_msg_overwrite + 476
frame #3: 0x000000019e986578 libsystem_kernel.dylib`mach_msg + 24
frame #4: 0x000000019eaa6680 CoreFoundation`__CFRunLoopServiceMachPort + 160
frame #5: 0x000000019eaa4f44 CoreFoundation`__CFRunLoopRun + 1208
frame #6: 0x000000019eaa4434 CoreFoundation`CFRunLoopRunSpecific + 608
frame #7: 0x00000001a242e188 AppKit`_NSEventThread + 144
frame #8: 0x0000000103d055c0 libsystem_pthread.dylib`_pthread_start + 136
``` |
(lldb) bt
* thread #10
* frame #0: 0x000000019e98eb70 libsystem_kernel.dylib`poll + 8
frame #1: 0x0000000102a5a4a8 ghostty`Thread.PosixThreadImpl.spawn__anon_158740.Instance.entryFn at posix.zig:6480:31 [opt]
frame #2: 0x0000000102a5a47c ghostty`Thread.PosixThreadImpl.spawn__anon_158740.Instance.entryFn [inlined] termio.Exec.ReadThread.threadMainPosix(ev=<unavailable>) at Exec.zig:1599:27 [opt]
frame #3: 0x0000000102a5a438 ghostty`Thread.PosixThreadImpl.spawn__anon_158740.Instance.entryFn [inlined] Thread.callFn__anon_162116(args=<unavailable>) at Thread.zig:408:13 [opt]
frame #4: 0x0000000102a5a438 ghostty`Thread.PosixThreadImpl.spawn__anon_158740.Instance.entryFn(raw_arg=<unavailable>) at Thread.zig:674:30 [opt]
frame #5: 0x0000000103d055c0 libsystem_pthread.dylib`_pthread_start + 136
``` |
If there's any other threads you think would be useful let me know, those were just the interesting looking ones |
Thanks, all of those threads are blocking in expected places... I don't see anything abnormal. The logs are also normal. I still plan on trying to repro this myself too. |
Okay I've installed # This hangs!
$ echo "hello" | terminal-notifier -title "Hello" -sender "com.mitchellh.ghostty" It looks like |
It looks like there is an upstream issue: |
Going to close this as upstream and we should discuss in the done issue. I have a feeling this doesn't work since I can reproduce this with the AppStore bundle ID as well. If we can find a configuration in Ghostty to make this go away I'd be happy to take a look! |
awesome triage 👍 |
This is because a upstream issue in `terminal-notifier` caused long running command to hang. See: - julienXX/terminal-notifier#301 - ghostty-org/ghostty#1917 - ghostty-org/ghostty#2453
This has happened every time I've tested ghostty (so maybe it's a setting or meant to happen?)
However, what I do is open ghostty, update it to latest and then run
tree .
in my home dir and it dumps a FLOOD of text (very fast and performantly ;) )When it finishes though it just hangs and doesn't let me type anything.
The text was updated successfully, but these errors were encountered: