Skip to content

[pull] master from kevoreilly:master#438

Merged
pull[bot] merged 10 commits intothreatcode:masterfrom
kevoreilly:master
Mar 11, 2026
Merged

[pull] master from kevoreilly:master#438
pull[bot] merged 10 commits intothreatcode:masterfrom
kevoreilly:master

Conversation

@pull
Copy link

@pull pull bot commented Mar 11, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

wmetcalf and others added 10 commits February 19, 2026 23:17
Spawns a dedicated Python process per VM, each with its own gevent
event loop on a unique port, bypassing GIL serialization of result
uploads across concurrent analyses. Enabled via multiworker=yes in
cuckoo.conf [resultserver] section; default off preserves existing
single-port behavior unchanged.

- ResultServerWorkerProcess: multiprocessing.Process per VM
- SingleVMResultServerWorker: gevent server reading task_id from
  shared multiprocessing.Value
- Auto-assigns sequential ports (base_port + index) to machines
- analysis_manager rooter calls use machine.resultserver_port
  instead of global config port for correct per-VM firewall rules
- Add task_id re-check after negotiate_protocol() to prevent results
  from being associated with wrong task if cancelled during I/O
- Remove unused task_id parameter from clear_task()
The stuck-VM killer calls stop_machine() which triggers
set_machine_status() via _status()/set_status(), causing SQLAlchemy
autobegin outside any transaction block. The next session.begin()
then fails with "A transaction is already begun", crashing the
scheduler and leaving all VMs stuck in poweroff.

- Wrap stop_machine() in the stuck-VM monitor with session.begin()
- Move try/except outside the begin() block in the main loop to let
  the context manager handle rollback naturally (the old manual
  rollback() + return pattern corrupted session state)
- Make shutdown_machinery() resilient to leftover transaction state
- Set machine status to poweroff on unlock_machine()
Add multi-worker ResultServer: one process per VM
Fix on-demand subfile updates and handle related oversized Mongo writes
@pull pull bot locked and limited conversation to collaborators Mar 11, 2026
@pull pull bot added the ⤵️ pull label Mar 11, 2026
@pull pull bot merged commit 0e35d16 into threatcode:master Mar 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants