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
Core Dump When Using OpenMP on AWS Lambda #53955
Comments
@llvm/issue-subscribers-openmp |
@AndreyChurbanov WDYT, can we check and use a tmp folder in case it's not available? |
|
If the intent of the startup & shutdown code is to handle openMP versioning then a long term solution may be to remove it and let clients handle versioning themselves. Though I realise that is not backwards compatible. |
When `libomp` is initialized, it creates a temp file in `/dev/shm` to store registration flag. Some systems, like Android, don't have `/dev/shm`, then this feature is disabled by the macro `KMP_USE_SHM`, though most Linux distributions have that. However, some customized distribution, such as the one reported in llvm/llvm-project#53955, doesn't support it either. It causes a core dump. In this patch, if it is the case, we will try to create a temporary file in `/tmp`, and if it still doesn't make it, then we error out. Note that we don't consider in this patch if the temporary directory has been set to `TMPDIR` in this patch. If `/tmp` is not accessible, we error out. Fix #53955. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D142175
Since AWS Lambda does not support
/dev/shm
the OpenMP runtime causes a core dump. Output below:To fix the issue we have to switch to an OpenMP runtime earlier than this commit:
changing OMP rtl to use shared memory instead of env variable
Could you please consider adding a runtime check for
/dev/shm
creation and add a fall back?I see there is already a compile time switch to turn it off for Android, I would guess other embedded systems may have the same issue.
The text was updated successfully, but these errors were encountered: