FS#47662 - [linux] "Resource temporarily unavailable" when creating threads/forks

Attached to Project: Arch Linux
Opened by Candid Dauth (cdauth) - Thursday, 07 January 2016, 19:30 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 16 January 2016, 01:26 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Since upgrading from linux-4.2.5-1 to 4.3.3-2, programs crash regularly when they try to fork or create threads. The error message is always "Resource temporarily unavailable". I have made sure that all the ulimits are high enough. Downgrading back to the old kernel version fixes the issue. Different people on the internet report similar issues when upgrading to 4.3, for example here: https://lkml.org/lkml/2015/11/24/203.

In my particular case I run a docker server and several containers, and both the server and the containers crash regularly. I published more details of my case here: http://unix.stackexchange.com/q/253903/59955

On FreeNode ##linux, people who have had similar problems solved them by changing kernel options. I have myself not yet looked into which particular kernel options are causing this, but I’m opening this bug anyways in the hope that someone might already have an idea.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Saturday, 16 January 2016, 01:26 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#47303 
Comment by Candid Dauth (cdauth) - Thursday, 07 January 2016, 19:34 GMT
The issue is also being discussed in the Forum: https://bbs.archlinux.org/viewtopic.php?id=207255
Comment by Thorsten Z (T2k3) - Wednesday, 13 January 2016, 05:06 GMT
I can confirm the issue, had to change to lts because of this. My thread count was limited around ~1200 no matter what i did.

@cdauth: Can you tell what kernel options they changed to fix the issue? maybe that will help the maintainers to narrow down the problem.
Comment by Marko Mihovilic (m1h4) - Wednesday, 13 January 2016, 15:34 GMT
Also can confirm this issue. Our build machines are having problems running parallelized builds after upgrading from 4.2.5-1 to 4.3.3-2.
Comment by Candid Dauth (cdauth) - Friday, 15 January 2016, 19:28 GMT
Seems to be caused by systemd making use of the task limit introduced with the pid subsystem in kernel 4.3. The workaround/fix posted in  FS#47303  solves the issue for me.
Comment by Thorsten Z (T2k3) - Saturday, 16 January 2016, 00:29 GMT
Can confirm, changed UserTasksMax in logind.conf and system.conf to a higher value solved the issue for me. Guess the default values are to small.

Loading...