warp icon indicating copy to clipboard operation
warp copied to clipboard

Warp takes about 1 minute to actually quit after pressing Quit

Open aktasumut34 opened this issue 5 months ago • 1 comments

Pre-submit Checks

Describe the bug

When I quit Warp, the app does not exit promptly. After I hit quit, shutdown starts immediately according to the logs, but the application only appears to actually close about 67 seconds later.

From the log below, application will terminate is logged at 2026-06-25T23:39:54Z, but WindowId(0) will close is only logged at 2026-06-25T23:41:01Z.

Expected behavior

Actual behavior

Warp starts shutdown, but there is a long delay before the window/process actually closes.

To reproduce

  1. Open Warp.
  2. Quit the application, for example with Cmd+Q.
  3. Observe how long it takes for Warp to actually close.
  4. Check ~/Library/Logs/warp.log.

Expected behavior

Warp should quit within a few seconds after pressing Quit.

Screenshots, videos, and logs

2026-06-25T23:39:54Z [INFO] application will terminate
2026-06-25T23:39:54Z [INFO] Shutting down SQLite writer thread
2026-06-25T23:39:54Z [INFO] Shut down SQLite writer in 388.25µs
2026-06-25T23:39:54Z [INFO] Writing queued events to disk because telemetry is enabled.
2026-06-25T23:39:54Z [INFO] Successfully wrote telemetry events to disk
2026-06-25T23:39:54Z [INFO] Terminating all LSP servers for 0 workspaces
2026-06-25T23:39:54Z [INFO] Tearing down terminal server...
2026-06-25T23:39:54Z [INFO] Received empty message; assuming the connection has been closed.
2026-06-25T23:39:54Z [INFO] Tearing down app services...
2026-06-25T23:39:54Z [INFO] Uninitializing crash reporting...
2026-06-25T23:41:01Z [INFO] WindowId(0) will close
2026-06-25T23:41:01Z [WARN] Received EPIPE when trying to kill child shell process; assuming the terminal server has terminated.
2026-06-25T23:41:01Z [INFO] Tried to exit the alternate screen, but it was already inactive
2026-06-25T23:41:01Z [INFO] Block finished with new state DoneWithNoExecution

Operating system (OS)

macOS

Operating system and version

26.5.1 (25F80)

Shell Version

zsh 5.9 (arm64-apple-darwin25.0)

Current Warp version

v0.2026.06.17.09.49.stable_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

aktasumut34 avatar Jun 25 '26 23:06 aktasumut34

@aktasumut34

Here's what I found while triaging this issue:

Thanks for the detailed shutdown log. The delay appears to happen after Warp has accepted the quit request and while shutdown cleanup is running; earlier cleanup steps complete immediately, then the next window-close log appears about 67 seconds later.

I have a few follow-up questions before I can narrow this down:

  1. Can you attach a short screen recording of pressing Cmd+Q that shows whether the Warp window hides immediately or stays visible during the ~1 minute delay?
  2. If you turn off Settings > Privacy > Send crash reports and try the same quit flow, does the delay still happen?

Reply in-thread with those details and the triage workflow will automatically re-evaluate the issue and update the diagnosis, labels, and next steps.

Maintainer details

I concluded that warp accepts a macOS quit request but appears to spend about 67 seconds in shutdown cleanup before the window/process fully closes..

Triage summary

The report has enough detail for initial routing: macOS 26.5.1, Warp v0.2026.06.17.09.49.stable_02, zsh 5.9, direct quit steps, and a shutdown log showing application will terminate at 23:39:54 followed by WindowId(0) will close at 23:41:01.

Reproducibility is medium. The steps are simple and the log evidence is concrete, but this has not been independently reproduced here and appears macOS/AppKit-specific.

Likely area is macOS app lifecycle / UI framework shutdown performance. The provided log shows SQLite writer shutdown, telemetry disk flush, LSP termination, terminal-server teardown, app-services teardown, and crash-reporting uninitialization all beginning immediately at quit time. The strongest code-level clue is that the last log before the 67 second gap is Uninitializing crash reporting...; in app/src/lib.rs, crash reporting is the final shutdown callback, and app/src/crash_reporting/mod.rs then calls the macOS Sentry teardown path (app/src/crash_reporting/mac.rs -> app/src/platform/mac/objc/crash_reporting.m).

Duplicate check: I scanned all open non-PR issues via the GitHub API. #5314 is a related older open report about Warp hanging on quit, but I found fewer than two likely duplicate issues with the same app-quit delay/log pattern, so I am not marking this as a duplicate.

Question reasoning

  1. Can you attach a short screen recording of pressing Cmd+Q that shows whether the Warp window hides immediately or stays visible during the ~1 minute delay? — This distinguishes a visible macOS window-hide/termination handoff problem from a background cleanup delay after the app has already hidden.
  2. If you turn off Settings > Privacy > Send crash reports and try the same quit flow, does the delay still happen? — The log points most strongly at crash-reporting teardown as the blocking step, and this test would help confirm or rule out that path in the reporter's environment.

This is my automated analysis and may be incorrect. A maintainer will verify the details.

Powered by Oz

warp-for-oss[bot] avatar Jun 25 '26 23:06 warp-for-oss[bot]

It's fixed after disabling "Help improve Warp" and "Send crash reports" under Privacy menu. @aktasumut34

oguzhankircali avatar Jul 04 '26 06:07 oguzhankircali

I can reproduce this on macOS 26.5.2 (25F84) with Warp Stable v0.2026.07.08.17.54.stable_02.

The macOS hang stackshot identifies the blocking shutdown path on the AppKit main thread:

NSApplication terminate:
  -> AppCallbackDispatcher::app_will_terminate
  -> warp::crash_reporting::uninit_sentry
  -> sentry_core::Client::close
  -> sentry::TransportThread::flush
  -> semaphore_timedwait_trap

The main thread remained in this path for 15 of 16 samples. Warp's own log also ends at the same boundary:

application will terminate
Shut down SQLite writer in 773.333µs
Successfully wrote telemetry events to disk
Terminating all LSP servers for 0 workspaces
Tearing down terminal server...
Tearing down app services...
Uninitializing crash reporting...

There is also a reproducible network trigger in this environment. Warp's ingest host resolves through the system/ISP DNS to a Turk Telekom address that times out, while public DNS returns the normal ingest address:

system DNS:     o540343.ingest.sentry.io -> 195.175.254.2
Cloudflare DNS: o540343.ingest.sentry.io -> 34.160.81.0
Google DNS:     o540343.ingest.sentry.io -> 34.160.81.0
HTTPS through the system resolution: connection/TLS timeout

The system-resolved IPv4 address reverse-resolves to static.turktelekom.com.tr. The main sentry.io site is reachable; the ingest subdomain is the blocked path. Both telemetry and crash reporting were enabled, but the sampled main-thread stack is specifically inside Rust Sentry teardown.

This makes the split fairly clear: DNS/network filtering is the trigger, while the application bug is that crash-reporting teardown can synchronously block the macOS main thread. The Rust Sentry SDK's configured flush timeout alone does not fully bound shutdown because its transport Drop joins an in-flight reqwest worker.

This appears to be the same underlying bug as #5314, which is already marked ready-to-implement. I am preparing a narrowly scoped fix and a blocked-endpoint regression test against that issue rather than opening a duplicate.

rasitakyol avatar Jul 16 '26 12:07 rasitakyol