marxin / cvise

Super-parallel Python port of the C-Reduce
Other
219 stars 25 forks source link

Add the ability to control when `cvise_extra` directories are created. #146

Open vext01 opened 2 months ago

vext01 commented 2 months ago

I have a cvise setup where the interestingness oracle needs to copy a whole source code directory into the temp dir in order for a binary to be compiled.

cvise was filling my filesystem because it creates these cvise_extra directories when there's a timeout. And then those directories would get copied into the temp dir each time. Eventually the disk would be filled and cvise would crash in strange ways.

I've worked around this by using rsync to not copy those directories into the cvise temp dirs, like this:

rsync -a --exclude 'cvise_extra_*' ${YKLUA_HOME}/creduce/src .
cp onelua.c src/
cd ./src
make onelua
./onelua -e "_U=true" ${YKLUA_HOME}/tests/events.lua 2>&1 | grep 'trace_builder.rs:389'

But it would be nice if there was a way to disable creation of those directories upon a timeout.

marxin commented 2 months ago

Oh, good catch! These folders are generally created every time a potential C-Vise bug encounters, where timeouts of a C-Vise pass are commonly known as such a bug. Thus, we create reproducer folders where all intermediate files are preserved for further analysis.

But in this case (timeout) I doubt we should preserve it for further analysis. Would you like to develop a PR that will remove the creation of reproducers for situations where int. tests time out?

https://github.com/marxin/cvise/blob/16a34b273966e32843b3f193590198e2a769b1b0/cvise/utils/testing.py#L396

vext01 commented 2 weeks ago

Hrm. I'm actually starting to question why cvise has a built-in timeout mechanism, when (as we discussed in #145) the timeout utility does a better job of it.

For backwards compat with creduce, I suppose.