block / block/buzz

[Bug] Crash on every launch on macOS: EXC_GUARD (mach port INVALID_NAME) in user_idle::UserIdle::get_time

Open
#2,818 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Summary

Buzz Desktop crashes on every launch on macOS. The process is killed by the kernel ~9 seconds after startup with `EXC_GUARD` / `GUARD_TYPE_MACH_PORT` / `INVALID_NAME`, triggered inside the `user-idle` crate's macOS implementation.

## Environment

- **Buzz Desktop**: 0.4.24 (also crashed on the version I ran on 2026-07-23; release notes for 0.4.25 don't mention a fix)
- **macOS**: 26.2 (25C56)
- **Hardware**: Mac Pro (MacPro7,1), Intel x86-64

## Crash details

Three consecutive launches produced identical crash reports. The faulting (main) thread:

```
0 libsystem_kernel _kernelrpc_mach_port_deallocate_trap
1 libsystem_kernel mach_port_deallocate
2 buzz-desktop user_idle::UserIdle::get_time
3 buzz-desktop buzz_lib::run::{closure}::{closure}
4 buzz-desktop buzz_lib::run::{closure}
5 buzz-desktop tauri::webview::Webview::on_message
```

Exception:

```
"exception" : {"codes":"0x0000000009c27b83, 0x0000000000000000",
"message":" INVALID_NAME on mach port 162691 (guarded with 0x0000000000000000)",
"subtype":"GUARD_TYPE_MACH_PORT","violations":["INVALID_NAME"],"type":"EXC_GUARD"}
"termination" : {"namespace":"GUARD","flags":2,"code":2305845208237112195}
```

## Analysis

A Tauri IPC message from the frontend invokes an idle-time check that calls `user_idle::UserIdle::get_time`. The `user-idle` crate's macOS/IOKit path calls `mach_port_deallocate` on a port name it doesn't validly own. Current macOS treats this as a guarded-port violation and terminates the process rather than returning an error, so the app dies on every launch as soon as the idle check runs (consistently ~9s after `procLaunch`).

## Steps to reproduce

1. Launch Buzz.app on macOS 26.2 (Intel).
2. Wait ~10 seconds.
3. App crashes.

Reproduces 100% of the time on this machine.

## Crash report

Sanitized crash report (trimmed to metadata + exception + faulting thread; full .ips available on request)

```json
{"app_name":"buzz-desktop","timestamp":"2026-07-24 22:09:46.00 -0700","app_version":"0.4.24","sroute_id":12,"slice_uuid":"ae2960b8-c483-3178-9098-ccda494612d7","build_version":"0.4.24","platform":1,"bundleID":"xyz.block.buzz.app","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 26.2 (25C56)","roots_installed":0,"name":"buzz-desktop","incident_id":"E3ABCF80-BF8C-4869-BA77-1A9B27B4EC48"}
{
"uptime": 2500000,
"procRole": "Background",
"version": 2,
"userID": 501,
"deployVersion": 210,
"modelCode": "MacPro7,1",
"coalitionID": 388405,
"osVersion": {
"train": "macOS 26.2",
"build": "25C56",
"releaseType": "User"
},
"captureTime": "2026-07-24 22:09:23.5621 -0700",
"codeSigningMonitor": 0,
"incident": "E3ABCF80-BF8C-4869-BA77-1A9B27B4EC48",
"pid": 54797,
"cpuType": "X86-64",
"procLaunch": "2026-07-24 22:09:14.4378 -0700",
"procStartAbsTime": 2547247215812365,
"procExitAbsTime": 2547256318524597,
"procName": "buzz-desktop",
"procPath": "/Applications/Buzz.app/Contents/MacOS/buzz-desktop",
"bundleInfo": {
"CFBundleShortVersionString": "0.4.24",
"CFBundleVersion": "0.4.24",
"CFBundleIdentifier": "xyz.block.buzz.app"
},
"storeInfo": {
"deviceIdentifierForVendor": "00000000-0000-0000-0000-000000000000",
"thirdParty": true
},
"parentProc": "launchd",
"parentPid": 1,
"coalitionName": "xyz.block.buzz.app",
"crashReporterKey": "00000000-0000-0000-0000-000000000000",
"appleIntelligenceStatus": {
"reasons": [
"deviceNotCapable"
],
"state": "unavailable"
},
"developerMode": 1,
"codeSigningID": "xyz.block.buzz.app",
"codeSigningTeamID": "",
"codeSigningFlags": 570490881,
"codeSigningValidationCategory": 1,
"codeSigningTrustLevel": 4294967295,
"codeSigningAuxiliaryInfo": 0,
"bootSessionUUID": "00000000-0000-0000-0000-000000000000",
"sip": "disabled",
"sroute_id": 12,
"exception": {
"port": 162691,
"codes": "0x0000000009c27b83, 0x0000000000000000",
"guardId": 0,
"message": " INVALID_NAME on mach port 162691 (guarded with 0x0000000000000000)",
"subtype": "GUARD_TYPE_MACH_PORT",
"violations": [
"INVALID_NAME"
],
"type": "EXC_GUARD",
"rawCodes": [
163740547,
0
]
},
"termination": {
"namespace": "GUARD",
"flags": 2,
"code": 2305845208237112195
},
"extMods": {
"caller": {
"thread_create": 0,
"thread_set_state": 0,
"task_for_pid": 0
},
"system": {
"thread_create": 2,
"thread_set_state": 0,
"task_for_pid": 2
},
"targeted": {
"thread_create": 0,
"thread_set_state": 0,
"task_for_pid": 0
},
"warnings": 0
},
"faultingThread": 0,
"bug_type": "309",
"roots_installed": 0,
"trmStatus": 2105856,
"faultingThreadOnly": {
"name": "main",
"queue": "com.apple.main-thread",
"frames": [
{
"imageIndex": 6,
"imageOffset": 2558,
"symbol": "_kernelrpc_mach_port_deallocate_trap",
"symbolLocation": 10
},
{
"imageIndex": 6,
"imageOffset": 7084,
"symbol": "mach_port_deallocate",
"symbolLocation": 17
},
{
"imageIndex": 0,
"imageOffset": 15562095,
"symbol": "user_idle::UserIdle::get_time::h0502c375aa91e2c1",
"symbolLocation": 575
},
{
"imageIndex": 0,
"imageOffset": 13634706,
"symbol": "buzz_lib::run::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h479e696919faa543",
"symbolLocation": 130
},
{
"imageIndex": 0,
"imageOffset": 13577822,
"symbol": "buzz_lib::run::_$u7b$$u7b$closure$u7d$$u7d$::h2ef3f288edd8727a",
"symbolLocation": 20990
},
{
"imageIndex": 0,
"imageOffset": 10742081,
"symbol": "tauri::webview::Webview$LT$R$GT$::on_message::h40c987668fff86a8",
"symbolLocation": 4017
},
{
"imageIndex": 0,
"imageOffset": 10557849,
"symbol": "tauri::ipc::protocol::get::_$u7b$$u7b$closure$u7d$$u7d$::hdc1ca8db315ee015",
"symbolLocation": 5977
},
{
"imageIndex": 0,
"imageOffset": 13450181,
"symbol": "",
"symbolLocation": 101
},
{
"imageIndex": 0,
"imageOffset": 10157988,
"symbol": "tauri_runtime_wry::create_webview::_$u7b$$u7b$closure$u7d$$u7d$::h601d320a5348a998",
"symbolLocation": 164
},
{
"imageIndex": 0,
"imageOffset": 43128850,
"symbol": "wry::wkwebview::class::url_scheme_handler::start_task::h587bd34ee14ef320",
"symbolLocation": 3490
},
{
"imageIndex": 7,
"imageOffset": 8811817,
"symbol": "WebKit::WebURLSchemeHandlerCocoa::platformStartTask(WebKit::WebPageProxy&, WebKit::WebURLSchemeTask&)",
"symbolLocation": 105
},
{
"imageIndex": 7,
"imageOffset": 12206697,
"symbol": "WebKit::WebURLSchemeHandler::startTask(WebKit::WebPageProxy&, WebKit::WebProcessProxy&, WTF::ObjectIdentifierGeneric, unsigned long long>, WebKit::URLSchemeTaskParameters&&, WTF::CompletionHandler&&)>&&)",
"symbolLocation": 259
},
{
"imageIndex": 7,
"imageOffset": 11757262,
"symbol": "WebKit::WebPageProxy::startURLSchemeTaskShared(IPC::Connection&, WTF::Ref, WTF::DefaultRefDerefTraits>&&, WTF::ObjectIdentifierGeneric, unsigned long long>, WebKit::URLSchemeTaskParameters&&)",
"symbolLocation": 160
},
{
"imageIndex": 7,
"imageOffset": 11757076,
"symbol": "WebKit::WebPageProxy::startURLSchemeTask(IPC::Connection&, WebKit::URLSchemeTaskParameters&&)",
"symbolLocation": 70
},
{
"imageIndex": 7,
"imageOffset": 6222553,
"symbol": "WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)",
"symbolLocation": 47219
},
{
"imageIndex": 7,
"imageOffset": 17308734,
"symbol": "IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)",
"symbolLocation": 216
},
{
"imageIndex": 7,
"imageOffset": 12172527,
"symbol": "WebKit::WebProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&)",
"symbolLocation": 29
},
{
"imageIndex": 7,
"imageOffset": 6492473,
"symbol": "WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)",
"symbolLocation": 1563
},
{
"imageIndex": 7,
"imageOffset": 17138809,
"symbol": "IPC::Connection::dispatchMessage(WTF::UniqueRef)",
"symbolLocation": 245
},
{
"imageIndex": 7,
"imageOffset": 17139742,
"symbol": "IPC::Connection::dispatchIncomingMessages()",
"symbolLocation": 486
},
{
"imageIndex": 8,
"imageOffset": 2175945,
"symbol": "WTF::RunLoop::performWork()",
"symbolLocation": 505
},
{
"imageIndex": 8,
"imageOffset": 2182634,
"symbol": "WTF::RunLoop::performWork(void*)",
"symbolLocation": 26
},
{
"imageIndex": 9,
"imageOffset": 390493,
"symbol": "__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__",
"symbolLocation": 17
},
{
"imageIndex": 9,
"imageOffset": 390399,
"symbol": "__CFRunLoopDoSource0",
"symbolLocation": 157
},
{
"imageIndex": 9,
"imageOffset": 389818,
"symbol": "__CFRunLoopDoSources0",
"symbolLocation": 203
},
{
"imageIndex": 9,
"imageOffset": 384976,
"symbol": "__CFRunLoopRun",
"symbolLocation": 916
},
{
"imageIndex": 9,
"imageOffset": 1116208,
"symbol": "_CFRunLoopRunSpecificWithOptions",
"symbolLocation": 496
},
{
"imageIndex": 10,
"imageOffset": 681071,
"symbol": "RunCurrentEventLoopInMode",
"symbolLocation": 287
},
{
"imageIndex": 10,
"imageOffset": 693579,
"symbol": "ReceiveNextEventCommon",
"symbolLocation": 606
},
{
"imageIndex": 10,
"imageOffset": 2301639,
"symbol": "_BlockUntilNextEventMatchingListInMode",
"symbolLocation": 37
},
{
"imageIndex": 11,
"imageOffset": 5356956,
"symbol": "_DPSBlockUntilNextEventMatchingListInMode",
"symbolLocation": 172
},
{
"imageIndex": 11,
"imageOffset": 136829,
"symbol": "_DPSNextEvent",
"symbolLocation": 800
},
{
"imageIndex": 11,
"imageOffset": 12327866,
"symbol": "-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]",
"symbolLocation": 1268
},
{
"imageIndex": 11,
"imageOffset": 12326541,
"symbol": "-[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:]",
"symbolLocation": 67
},
{
"imageIndex": 11,
"imageOffset": 101636,
"symbol": "-[NSApplication run]",
"symbolLocation": 472
},
{
"imageIndex": 0,
"imageOffset": 10335352,
"symbol": "tao::platform_impl::platform::event_loop::EventLoop$LT$T$GT$::run::h91c57bbf9a24fa34",
"symbolLocation": 600
},
{
"imageIndex": 0,
"imageOffset": 10799045,
"symbol": "_$LT$tauri_runtime_wry..Wry$LT$T$GT$$u20$as$u20$tauri_runtime..Runtime$LT$T$GT$$GT$::run::h2f9e663f378994f7",
"symbolLocation": 261
},
{
"imageIndex": 0,
"imageOffset": 13552130,
"symbol": "buzz_lib::run::hd820cd75885bdc33",
"symbolLocation": 8754
},
{
"imageIndex": 0,
"imageOffset": 5158,
"symbol": "std::sys::backtrace::__rust_begin_short_backtrace::hb5143d3462090f74",
"symbolLocation": 6
},
{
"imageIndex": 0,
"imageOffset": 5148,
"symbol": "std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h19e6f1e52c737fbf",
"symbolLocation": 12
},
{
"imageIndex": 0,
"imageOffset": 45944811,
"symbol": "_RNvNtCsfnXDAeJPNdo_3std2rt19lang_start_internal",
"symbolLocation": 875
},
{
"imageIndex": 0,
"imageOffset": 5228,
"symbol": "main",
"symbolLocation": 44
},
{
"imageIndex": 12,
"imageOffset": 26497,
"symbol": "start",
"symbolLocation": 3457
}
]
},
"referencedImages": [
{
"index": 0,
"name": "buzz-desktop",
"uuid": "ae2960b8-c483-3178-9098-ccda494612d7",
"path": "/Applications/Buzz.app/Contents/MacOS/buzz-desktop",
"base": 4304715776,
"arch": "x86_64"
},
{
"index": 6,
"name": "libsystem_kernel.dylib",
"uuid": "ef8302be-014f-3db4-9ed0-9e997e835ee3",
"path": "/usr/lib/system/libsystem_kernel.dylib",
"base": 140703410544640,
"arch": "x86_64"
},
{
"index": 7,
"name": "WebKit",
"uuid": "98bb31fc-1df2-30b0-a6e9-0cd7168624e4",
"path": "/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit",
"base": 140707839299584,
"arch": "x86_64"
},
{
"index": 8,
"name": "JavaScriptCore",
"uuid": "4344abb4-dc34-392e-930b-4d2a27436fcf",
"path": "/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore",
"base": 140707698298880,
"arch": "x86_64"
},
{
"index": 9,
"name": "CoreFoundation",
"uuid": "301acc8a-6054-303d-910f-6b52ceb949f6",
"path": "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation",
"base": 140703411085312,
"arch": "x86_64h"
},
{
"index": 10,
"name": "HIToolbox",
"uuid": "dc9cb5ed-56e3-343a-86d5-15e8f2343f73",
"path": "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox",
"base": 140703622082560,
"arch": "x86_64"
},
{
"index": 11,
"name": "AppKit",
"uuid": "e3607d78-5a50-3cc1-ac2e-65fa5275a3ba",
"path": "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit",
"base": 140703476662272,
"arch": "x86_64"
},
{
"index": 12,
"name": "dyld",
"uuid": "759d71bc-86dc-3d9c-a062-86fc312218ea",
"path": "/usr/lib/dyld",
"base": 140703406772224,
"arch": "x86_64"
}
]
}
```

Contributor guide

Open the contributing guide

Research direction

Start at user_idle::UserIdle::get_time and trace the buzz_lib::run Tauri IPC path that invokes the idle check. Reproduce on macOS 26.2 and inspect the user-idle macOS implementation around mach_port_deallocate. Done means the idle check no longer terminates Buzz Desktop with EXC_GUARD after launch.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust, tauri
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.