Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O open-build-service-debian
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • obs
  • open-build-service-debian
  • Merge requests
  • !10

worker: override DefaultTasksMax

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Héctor Orón Martínez requested to merge wip-t13138 into collabora/master Mar 22, 2019
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 2

The following error

[   67s] Unpacking gcc-7 (7.3.0-16ubuntu3) ...
[   67s] dpkg-deb: unrecoverable fatal error, aborting:
[   67s]  fork failed: Resource temporarily unavailable
[   67s] dpkg: error processing archive /var/cache/apt/archives/gcc-7_7.3.0-16ubuntu3_i386.deb (--unpack):
[   67s]  dpkg-deb --fsys-tarfile subprocess returned error exit status 2
[   67s] dpkg: unrecoverable fatal error, aborting:
[   67s]  fork failed: Resource temporarily unavailable
[   67s] /usr/sbin/debootstrap: 996: /usr/sbin/debootstrap: Cannot fork
[...]

happens since all builds happen in the same cgroup which is limited to 4915 tasks by systemd's per-service defaults. If it reaches a total of 4915 tasks (processes and threads) calls like fork(), clone(), pthread_create() will fail.

Raise the limit to 64000 processes, which is similar to the NPROC rlimit that would be used if the cgroup didn't impose a task limit at all.

This is a short term fix proposed by Simon McVittie, while the long term solution should place each bs_worker instance in its own systemd-managed cgroup. The default task limit of 4915 might then be adequate.

Signed-off-by: Héctor Orón Martínez hector.oron@collabora.com

Edited Mar 22, 2019 by Héctor Orón Martínez
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip-t13138