Skip to content
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

Binder Crashes when building with BUILD_MODE=prod #962

Open
andrewathalye opened this issue Aug 13, 2023 · 3 comments
Open

Binder Crashes when building with BUILD_MODE=prod #962

andrewathalye opened this issue Aug 13, 2023 · 3 comments

Comments

@andrewathalye
Copy link

Linux x86_64, NixOS, GNAT 12.2.0

Building v23.0.0 with BUILD_MODE=prod causes a Stack Overflow (Storage_Error) in gnatbind after building static libadalang. This is probably related to the optimisation level? It compiles and binds without issue in the default BUILD_MODE.

No additional information is dumped by gnatbind unfortunately, but I saw in top that it was using ~4GB of memory which is fairly high for a normal compile job.

@thvnx
Copy link
Contributor

thvnx commented Aug 24, 2023

Hi @andrewathalye . How much memory is available on this machine? Some libadalang Ada sources can be huge, and compiling them in prod mode will make GNAT very resource-consuming.

Can you try running the build by limiting the parallelism (you can pass --jobs=N to manage.py)?

@andrewathalye
Copy link
Author

The machine in question had 64GB RAM and 6 cores with hyperthreading. I can try with less parallelism, but this seems like a stack overflow to me rather than an out of memory.

@thvnx
Copy link
Contributor

thvnx commented Sep 12, 2023

That should be quite enough indeed! Could you retry with more stack (ulimit -s) to check whether the problem persists?

I have 8MB of stack on my system and I was not able to reproduce your issue.

okellogg pushed a commit to okellogg/libadalang that referenced this issue Apr 28, 2024
Change the ada_gpr_project_source_files signature in C header

Closes AdaCore#962

See merge request eng/libadalang/libadalang!1279
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

No branches or pull requests

2 participants