Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chaining a process with CGroups gives an OOMkiller if stdout
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3940
Location: Hamburg

PostPosted: Fri Nov 08, 2024 1:08 pm    Post subject: chaining a process with CGroups gives an OOMkiller if stdout Reply with quote

exceeds memory.max.

I do use [1] https://github.com/toralf/fuzz-utils/tree/main to fuzz test OpenSSL. I do start a new fuzzer via [2]
Code:

nice -n 3 /usr/bin/afl-fuzz -i $input_dir -o ./ $add -I $0 -- ./$(basename $exe) &>./fuzz.log &
local pid=$!
echo -e "\n    started: $fuzzer (pid=$pid)\n"
sudo $(dirname $0)/fuzz-cgroup.sh $fuzz_dirname $pid # create it

and then set an upper limit for the memory the whole process group with [3]
Code:

echo "2G" >$name/memory.max

I do wonder why the process is reaped (oom-killer) by my system if the size of fuzz.log is near to the limit (2GB as in the example, verified it with 1G and 500M).

Well, my gut tells me to use tee to write into the log file, but would that help and why?

[1] https://github.com/toralf/fuzz-utils/tree/main
[2] https://github.com/toralf/fuzz-utils/blob/main/fuzz.sh#L247
[3] https://github.com/toralf/fuzz-utils/blob/main/fuzz-cgroup.sh#L27
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum