containers / containers/toolbox

`libgomp: Thread creation failed: Resource temporarily unavailable` when running OpenEmbedded builds

Open
#849 7 comments 1 reaction 0 assignees View on GitHub
1. Bug
Dominant language
Go
Stars
3.5k
Forks
262
Avg merge
3d 1h
Merged PRs (30d)
1

Description

**Describe the bug**
After creating a toolbox and launching a large build process (an OpenEmbedded build) on a 64-core machine eventually the build fails with this error:

```
libgomp: Thread creation failed: Resource temporarily unavailable
```

After that the toolbox can't be used to build even smaller tasks as the same error continue to appear.

The machine isn't heavily loaded and the containers ulimit looks like:

```
ulimit -a
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 1030086
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 500000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 16384
cpu time (seconds, -t) unlimited
max user processes (-u) 1030086
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
```

**Steps how to reproduce the behaviour**
1. `toolbox enter yocto`
2. `source oe-init-build-env`
3. `export BB_NUMBER_THREADS=24`
4. `export PARALLEL_MAKE="-j16"`
5. bitbake core-image-minimal

**Expected behaviour**
The OpenEmbedded build should complete

**Actual behaviour**
I see lots of `libgomp: Thread creation failed: Resource temporarily unavailable` failures

**Output of `toolbox --version` (v0.0.90+)**
`toolbox version 0.0.99.2`

**Toolbox package info (`rpm -q toolbox`)**
`toolbox-0.0.99.2-1.fc34.x86_64`

**Output of `podman version`**
```
Version: 3.2.2
API Version: 3.2.2
Go Version: go1.16.4
Built: Sat Jun 26 09:49:19 2021
OS/Arch: linux/amd64

```

**Podman package info (`rpm -q podman`)**
`podman-3.2.2-1.fc34.x86_64`

**Info about your OS**
Fedora Silverblue 34

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.