DeadCodeProductions / dead

Other
50 stars 5 forks source link

runtime: how to solve "Maybe the cache is in an inconsistent state" #74

Closed Ghy0202 closed 1 year ago

Ghy0202 commented 1 year ago

Hi~When I successfully set up the local environment, I encountered some operational issues. Is this normal under multi-core operation conditions? After I set it to 8 cores, it seems like I'm stuck in this situation. Compared to the Docker image given in the paper, this speed is much slower... (waiting for one hour without outputting any cases,) Is this a screenshot of the normal operation of the program?In addition to improving hardware performance, are there other ways to see results as soon as possible?And how long does this program typically run?

image
Quarub commented 1 year ago

Hi @Ghy0202

the first run is very slow because dead has a cold compiler cache and needs to build every compiler it needs to use first.

For the situation in you screenshot, there's a path to a build log, so theoretically, the compiler is being built and your machine is under load. Is you machine under load? If so, the compiler is being built. You can track the compilation progress by looking at the build log with, for example in this case, tail -f /home/ecs-assist-user/dead/logs/20230322-124258-clang-a72[...].log.

If your machine shows no activity while you get these messages (and you ran ccbuilder cache clean before), remove the directory for the compiler that is being built from the compiler cache, after you have stopped dead and then try again. The directory in this case would be called clang-a721[...]. Your compiler cache is probably located at ./compiler_cache. You can look up the directory of the compiler cache in ~/.config/dead/config.json.

I see that only 2 workers have been started (Starting worker... in the terminal), hence you are probably compiling with only 2 cores. You can make sure all 8 cores are used by specifying --cores 8 after main.py and before run. You seem to have changed the amount of cores of the machine ("After I set it to 8 cores"). That this is probably not being picked up by the method we use to get the cpu count. (multiprocessing.cpu_count()).

I also noticed that you have not specified an additional compiler after --additional-compilers. This is required, otherwise it is unclear what to test against.

Regarding getting results ASAP: What kind of result do you need? You can get results in different processing stages:

If you don't need the bisection or the reduction, you can disable them with --no-bisector and --no-reducer after run respectively. Note that you need the bisection for the (proper) reduction. Also note that we use the bisection commit to deduplicate the cases.

Ghy0202 commented 1 year ago

Thx.😊Maybe I should read the source code and readme carefully~~

./main.py -ll info --cores 2 run --no-bisector --no-reducer --no-parallel-generation --targets gcc trunk 1 2 3 s --additional-compilers gcc releases/gcc-11.2.0 -acdol 1 2 3 s

After using this command , I can finally see the output of cases.