On Sat, Sep 14, 2019 at 11:35:23PM +0200, Abou Al Montacir wrote: > On Sat, 2019-09-14 at 12:58 +0200, Geert Stappers wrote: > > On Sat, Sep 14, 2019 at 10:55:11AM +0200, Abou Al Montacir wrote: > > Hello All, > > I have a small Issue with Debian system freezing when compiling a SW the > system > > simply hangs and I need to cut powerTested on both Stretch and Buster. Same > > issue, the compiler makes the system freeze > > Is there a way to avoid this in order to understand what is the issue? >
Some other options, on the assumption that it's memory starvation (may or may not work) might be to: 1) disable swap, and use the "vm.min_free_kbytes = 327680" sysctl. 3) Keep an eye on the system and <SysRQ>+<f> when it loses responsiveness. 4) ulimit (IIRC someone else mentioned this), but I've heard that it doesn't respond quickly enough to some requests. 5) Manual cgroups limits, LXC with cgroup limits, or possibly something like firejail. > Yes please, make it possible to understand the issue. > > Provide information how to reproduce it. > > I'm using a proprietary compiler for compiling a large C file with several > included files. The file used to compile fine when I invoque the compiler > with -std=gnu99, but if I enable -std=c11 then system freezes. > I'll not be able to provide neither the source nor the compiler itself as > it requires a license tied to the HW to run. However I can perform complex > testing. > > Actually I'm very surprised that a user space program (compiler) running on > an > > unprevileged account (non root) can kill the system as it happens. > Just to rule out one exotic possibility: Does this "license tied to the HW" use a kernel module? See this link for how to search of out of tree modules: https://unix.stackexchange.com/questions/72889/how-to-determine-which-module-taints-the-kernel > Does anyone know how to sandbox the command so that It does not kill the > system? > See item #5 above (I've never tested firejail btw)...also, I don't know if this would break the HW tied license check. It seems like it might. > Good question. Make the question better by telling what the command is. > > It might get you an answer how to sandbox it. > > The command is kind of "cc -std=gnu11 -o file.o file.c". > Another general recommendation is to configure syslog to send logs to another system, in case there's a helpful message that isn't getting flushed to disk before the crash. > Please CC me as not subscribed. > Done. Cheers, Nicholas
signature.asc
Description: PGP signature