Skip to content

Fix GUI console log replay and Windows 63-handle multiprocessing crash. - #878

Closed
Xraytonex wants to merge 4 commits into
MannLabs:mainfrom
Xraytonex:main
Closed

Xraytonex wants to merge 4 commits into
MannLabs:mainfrom
Xraytonex:main

Conversation

@Xraytonex

@Xraytonex Xraytonex commented Oct 12, 2026 •

Copy link
Copy Markdown

Second part of #847 sounded like a renderer problem. Run page remounting also rebuilds the log from the backend buffer. Each tqdm \r is its own buffer entry, so on a multi-day run the backlog replays at like 1000 entries per second.

So all pending rows are now fetched with a singular request. And no more stacking polls.

#755 was detected by Claude while I had it check out if the previous issue was actually a renderer problem lol.

The thread already blames a Windows multiprocessing limit for the follow-up error, but I had it check that thread_count was actually what sized the pool that crashed before capping anything:

  • The traceback ends in pool.py _handle_workers into connection.py:828 _exhaustive_wait, right after peptdeep logs Using multiprocessing with 64 processes.
  • That's peptdeep's predict_all_mp, sized by mp_process_num, which alphaDIA sets from general.thread_count.
  • multiprocessing.Pool waits on one handle per worker plus 2, so 64 + 2 = 66, the exact number in the error. WaitForMultipleObjects takes at most 63, so 61 workers is the max.

So thread_count now gets capped at 61 on Windows with Python < 3.13 (3.13 batches the wait, gh-89240), with a warning, and the capped value is what ends up in frozen_config.yaml.

So thread_count now gets capped at 61 on Windows, with a warning, and the capped value is what ends up in frozen_config.yaml. This needed ConfigKeys.GENERAL.THREAD_COUNT and adding it to the keys Config.set_value allows.

Trade-off: the cap applies to every use of thread_count. Including numba and torch threads.

claude and others added 4 commits October 12, 2026 13:36
When the Run page remounted, it re-read the backend output buffer only 100 rows
per 100 ms poll. Every tqdm progress update is a separate buffer entry, so for long
runs the whole backlog was replayed slowly, making it look like the search was
restarting with wrong timestamps (#847). Now all pending rows are
fetched at once, and overlapping polls are skipped so slow IPC calls can no longer
append the same rows twice.
Multiprocessing pools on Windows fail with "need at most 63 handles" for more than
61 worker processes (#755). Warn and limit general.thread_count
instead of crashing.
CPython 3.13 batches WaitForMultipleObjects (gh-89240), so larger pools work there.
Fix GUI console log replay and Windows 63-handle multiprocessing crash
@Xraytonex Xraytonex closed this by deleting the head repository Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants