csmith-project / creduce

C-Reduce, a C and C++ program reducer
Other
1.31k stars 123 forks source link

crash "cannot copy <input> at /usr/bin/creduce/..." #179

Open nickdesaulniers opened 5 years ago

nickdesaulniers commented 5 years ago
===< pass_clang_binsrch :: remove-unused-function >===
cannot copy '/android0/kernel-all/fault.i' at /usr/bin/creduce line 308.
 at /usr/bin/creduce line 35.
    main::__ANON__("cannot copy '/android0/kernel-all/fault.i' at /usr/bin/creduc"...) called at /usr/bin/creduce line 308
    main::copy_files_here() called at /usr/bin/creduce line 623
    main::delta_pass(HASH(0x56518eb8e118)) called at /usr/bin/creduce line 1069

Looks like maybe some kind of race when copying a file?

Also, thanks for such a great tool: https://nickdesaulniers.github.io/blog/2019/01/18/finding-compiler-bugs-with-c-reduce/

nickdesaulniers commented 5 years ago

fault.i

z.sh

could not repro with the default 4 threads.

regehr commented 5 years ago

Thanks! This symptom seems like something I haven't seen before, but I've long suspected there's a race or two somewhere in C-Reduce that I've not managed to track down. I'll take another look at some point but not in the next few weeks.

regehr commented 5 years ago

cool blog post!

dwblaikie commented 5 years ago

Hit a similar thing today running with 32 threads:

cannot copy '/usr/local/google/home/blaikie/dev/scratch/creduce/mod_mutex/mutex.h' at /usr/local/google/home/blaikie/dev/creduce/build/creduce/creduce line 308. at /usr/local/google/home/blaikie/dev/creduce/build/creduce/creduce line 35. main::ANON("cannot copy '/usr/local/google/home/blaikie/dev/scratch/credu"...) called at /usr/local/google/home/blaikie/dev/creduce/build/creduce/creduce line 308 main::copy_files_here() called at /usr/local/google/home/blaikie/dev/creduce/build/creduce/creduce line 621 main::delta_pass(HASH(0x556fe7a772f0)) called at /usr/local/google/home/blaikie/dev/creduce/build/creduce/creduce line 1067

Not sure if there's anything especially useful I can provide/do to help debugging this.

regehr commented 5 years ago

argh! thanks David. I guess I just need to review the threading logic again, this is hard enough to repro that I don't think any other debugging method will get it.

dwblaikie commented 5 years ago

Hmm - I realized my /tmp is on a relatively small drive - so a second run hit a "not enough space on device" error. Possible that the previous error was related to that but just with a slightly different failure mode?

I'm running with a bigger /tmp - well... I thought I was, but seems I'm not. Not sure how to tell creduce to use a different temp directory. But I reduced the amount of space my test script uses, so maybe that'll be enough.