New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Issue: thread '<unknown>' has overflowed its stack #5
Comments
Hi, thanks for the hint! In the build pipeline I still use Rust 1.58.1, because newer versions are affected by some performance regressions. If you would like to compile the engine locally, I would recommend to use Rust 1.58.1 for now. |
Today I investigated the issue a bit more. Starting with Rust 1.59.0, the unnecessary stack allocation does not get optimized away anymore. As a workaround I boxed each individual field of the NeuralNetParams struct, instead of the whole struct. This seemed to help the compiler/optimizer and now the struct instance is created directly on the heap again and the stack does not overflow anymore. I could also mitigate some of the performance regressions by explicitly marking certain functions to be always inlined, but unfortunately binaries compiled with 1.63.0 are still around 8% slower than the ones produced by 1.58.1. |
Thanks. I will set Velvet to use 1.58.1 for the time being, and I'll check newer versions every so often for CCC. Can always reach out to me via email (andrew@grantnet.us), or on Discord. |
This happens on my Ubuntu box, and on a WSL Ubuntu image. I have attempted to increase the stack size, by cd'ing into the
engine
dir and building viacargo rustc --release --bin velvet -- -C link-args=-Wl,-zstack-size=16777216
. This did not work.Analog Hors suggested the following code change to spawn_engine_thread(), which worked for him.
A portion of the conversation that was had:
The text was updated successfully, but these errors were encountered: