FS#69074 - [jenkins] Reasons for limitless systemd unit configuration

Attached to Project: Community Packages
Opened by Daniel Otero (canu7) - Wednesday, 23 December 2020, 08:55 GMT
Last edited by Robin Candau (Antiz) - Tuesday, 18 July 2023, 17:13 GMT
Task Type General Gripe
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Filipe Laíns (FFY00)
Robin Candau (Antiz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Why does the [provided](https://github.com/archlinux/svntogit-community/blob/74358607746bf997f845eb2bfcf3c5bdd260396a/trunk/jenkins.service) Jenkins systemd configuration service does have some (for me) unreasonable defaults?

> OOMScoreAdjust=-1000
> LimitCPU=infinity
> LimitFSIZE=infinity
> LimitDATA=infinity
> LimitCORE=0
> LimitAS=infinity
> LimitLOCKS=infinity

This makes this service able to take down a system pretty easily, as any task executed by Jenkins (compilations, tests, whatever) will inherit the same limits. Just having a process executed by Jenkins that consumes an absurdly amount of memory will make the system trash so hard to become completely locked down requiring a hard-reset. This is because having a -1000 offset to the OOM score will make any Jenkins child process invulnerable to the kernel OOM killer.

Removing all the limits doesn't seem to impact the normal usage of Jenkins, and fixed the issue to me.

I guess my question is... Why are they there? Are they really needed?

Just trying to avoid this headaches to other users :D
This task depends upon

Closed by  Robin Candau (Antiz)
Tuesday, 18 July 2023, 17:13 GMT
Reason for closing:  Implemented
Additional comments about closing:  Implement in v2.415-3: https://gitlab.archlinux.org/archlinux/p ackaging/packages/jenkins/-/commit/363ff bdba9b1186f8ec42e129cf09eaa7e5e1a97
Comment by Robin Candau (Antiz) - Tuesday, 18 July 2023, 17:11 GMT
I removed those parameters from the systemd service in 2.415-3 (currently in testing): https://gitlab.archlinux.org/archlinux/packaging/packages/jenkins/-/commit/363ffbdba9b1186f8ec42e129cf09eaa7e5e1a97

Thanks for raising this :)

Loading...