Skip to content

Wine processes spin at full CPU after their wineserver exits (msync) #439

Todo

Description

@frankea

When a bottle's wineserver exits while programs are still running, every thread that was waiting on more than one object starts spinning instead of the process exiting. I found a Steam client in this state that had used about two full cores for a week.

What happens. msync_wait_multiple registers the wait with the server over its Mach port. Once the server is gone that port is a dead name, the send fails with MACH_SEND_INVALID_DEST (0x10000003), and the function returns STATUS_PENDING. msync_wait_objs takes that as "try again", so the thread loops straight back into the same failed send. The log fills with err:sync:server_register_wait Failed to send server register wait: 0x10000003. A sample of the stuck Steam showed its libusb and socket threads in exactly this loop (NtWaitForMultipleObjects -> msync_wait_objs -> msync_wait_multiple).

Repro (engine 4.8.7, WINEMSYNC=1): a program that calls WaitForMultipleObjects on two events with a 100 ms timeout in a loop sits at 0% CPU. Kill that prefix's wineserver and it goes to 97% CPU and never exits.

Fix. The pipe-based server calls already treat a server that has gone away as fatal. The engine fix does the same for a dead server port in an msync multiple-object wait: it logs wineserver is gone, exiting and ends the process. With it, the repro exits as soon as its server is killed. A beta engine with the fix follows.

The app half (Whisky not stopping processes like these) is #440.

Activity

  1. added
    beta-testing
    on Nov 30, 2026
  2. frankea commented on Nov 30, 2026

    @frankea
    OwnerAuthor

    The fix is in v4.8.10-beta.1. With Whisky 3.10.4 or later, install it from Settings > Beta Engine > Try Beta Engine. On that build, a program whose wineserver goes away logs wineserver is gone, exiting and exits instead of spinning. I'll close this when the beta is promoted to stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

beta-testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions