Why would running golangci-lint built on go 1.21 when I'm using go 1.23 cause my system to become unresponsive?

I installed go 1.23 and golangci-lint from packages and later found out that go 1.21 is preferred as other downstream apps are built against 1.21. To resolve this, I manually install golangci-lint by building it on 1.23 locally.

Why would the system become unresponsive? Shouldn't the system prevent the system becoming unresponsive where a single process is taking down the system? If not, how could I prevent these sorts of things in the future? I am running this in a jail and have memory limits, but disabled cpu limits because that seems to really hurt UI responsiveness even if the system is mostly idle.
 
Get rid of the jail, try again. Maybe the problem is an unfortunate interaction between program and jail.

Is it running as root?

Look at the output of top while the program is running. What is its CPU and memory consumption, how much disk IO does it cause? Try tracing the system calls. I can write a pretty simple program that makes most OSes unresponsive: Spawn a thousand threads, each thread then issues a thousand IOs to every disk in the system (through the appropriate file system), each IO being a megabyte in size. The queue management alone and pinning the memory will probably make most systems go "shiny side down rubber side up".
 
I haven't tried in a long while without jails. I didn't have this issue earlier since I installed a matching version of golangci-lint to go, but only when I bumped go to 1.23.

No, it is running as a regular user.

Yes, I used htop and both CPU and memory usage spike. Understood, but I suppose what I am asking is, shouldn't the OS provide some protection against that? If not, what is the proper way to configure that? Would rctl be the correct tool? Right now, I have rctl set to limit memory usage, but perhaps I need to read more to see if I can do the same for IO. When I do CPU, the system seems to stutter even under little load.
 
I don't know if you can use it in jail but, I used to use # idprio 16 <cmd> to prevent, i.e. poudriere which is compiling something from making my system unresponsive or slow.
idprio(1)

Code:
       To make depend while not    disturbing other machine usage:
         idprio 31 make depend
 
Back
Top