You’re reaching out of memory (OOM). Running top
exhibits the issue: without MT it’s only allocating 550MB of VIRT and 430MB of RSS at most; with MT it’s trying to allocate over 4TB of virtual memory (VIRT) and over 2.3GB or actual memory (RSS). It passes on my computer but I have plentiful of RAM.
The issue is in #aux?
that spawns fibers within the #hobo
loop: it balloons to create far too many fiber.
Why is only MT impacted? It might be because ST has a single stack pool to recycle the stacks, while MT has one per thread, and you might be unlucky and have the stacks ending up in some stack pools, but fibers being created from a single one (nothing to recycle).
I tested your example with the execution context shard for RFC 2 with a single stack pool per context, and it only allocates 660MB of VIRT and 390MB of RSS. I guess it confirms the issue.