Sergey Zhukov zhus
zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@Joshix-1 commented on GitHub (Jun 20, 2025):

does dust -T 1 do anything ?

Works with numbers from 1 to 19 (inclusive)

What happens on your box if you use…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 23, 2025):

Ok(Err(ThreadPoolBuildError { kind: IOError(Os { code: 11, kind: WouldBlock, message: "Resource temporarily…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 23, 2025):

So it seems like it can't spawn the 20th thread because of some sort of stack limitations

I think its because if…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 23, 2025):

cargo run -- -S 1048576

I imagine this would work for you too.

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 23, 2025):

If you change init_rayon to catch your IOError and then set the default stack size and re-try and create the thread…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@Joshix-1 commented on GitHub (Jun 23, 2025):

cargo run -- -S 1048576

Yep, that works too. But with the default for high memory (1024 ** 3) https://github.…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 23, 2025):

what about if it was pow(2) - as we know pow(3) was too much memory ?

edit: No that was a dumb comment.

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jul 5, 2025):

So in summary: If we look at the build_thread_pool function. It seems that it 'works' if we set stack_size or…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jul 5, 2025):

Resource temporarily unavailable (os error 11)

I think this error occurs when the system doesn't have enough…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@Joshix-1 commented on GitHub (Jul 5, 2025):

With available memory of 44635316224 Bytes (41.569 GiB) I can't get 32 threads with stack size of 1073741824 Bytes…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@Joshix-1 commented on GitHub (Jul 5, 2025):

And ./target/release/dust -T 19 uses only a few MiB of RAM, so it's not a memory issue. There is some other…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jul 5, 2025):

Hmm, that'd interesting. surprised that you can't get 32 threads running.

https://docs.rs/rayon/latest/rayon/struc…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:13 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jul 7, 2025):

i hope this is fixed in 1.2.2

zhus opened issue bootandy/archived-dust#223 2026-06-08 11:26:13 +03:00
[GH-ISSUE #509] Show different stats at once
zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:12 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 20, 2025):

Seems like the problem wasn't a pointer width of 32. Other stuff can cause the same issue.

Yeah, I think you are…

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:12 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 20, 2025):

does dust -T 1 do anything ? - This should run dust with 1 thread.

zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:12 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 20, 2025):

What happens on your box if you use this instead:


fn init_rayon(stack_size: &Option<usize>, threads:…
zhus commented on issue bootandy/archived-dust#221 2026-06-08 11:26:12 +03:00
[GH-ISSUE #503] The global thread pool has not been initialized.: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

@bootandy commented on GitHub (Jun 20, 2025):

So here's my thoughts:

I need to call build_thread_pool - but its wrapped in a panic unwrap incase it goes wrong…