aspire-project / chisel-bench

4 stars 9 forks source link

Cannot reduce tar-1.14 #2

Open michaelbrownuc opened 5 years ago

michaelbrownuc commented 5 years ago

When attempting to reduce tar, I get the error:

The specified oracle file ./test.sh cannot execute correctly.

KihongHeo commented 5 years ago

Chisel first checks whether a given test script runs correctly. It seems that test.sh does not preperly terminate with return code 0. Can you first try ./test.sh; echo $??

Some possible reasons are 1) tar-1.14.c is missing, 2) you missed running . setenv in ChiselBench/, or 3) timeout. For 3) can you increase the time limits in the script? In case of tar, we have two different variables TIMEOUT and TIMEOUT_LOW. You can increase both.

michaelbrownuc commented 5 years ago

1) the file is correctly generated from tar-1.14.c.origin.c 2) I did run the setenv command 3) The error occurs immediately, before the the first function reduction. I increased the timeout, this does not affect the failure.

The script test.sh returns 1 when running the command you specified. I did not alter the test script. I didn't see any immediate reason why it was not returning 0.

KihongHeo commented 5 years ago

Can you localize the problem using bash -x ./test.sh and tell me when the script stops?

michaelbrownuc commented 5 years ago

Here's the last 20 or so lines of the output from bash -x

KihongHeo commented 5 years ago

That is quite odd. test.sh does not rely on any other programs except the builtin tar in your os. Do you use bash? Can you take a look at log.txt? Can you localize the problem more by printing the execution steps?

michaelbrownuc commented 5 years ago

It appears the issue is on line 40 of test.sh, execution of one of the files in tests/tar is tripping the exit statement. I'll try to narrow it down further.

michaelbrownuc commented 5 years ago

Looks like the issue is during the execution of tar-archives-multiple-files for the address sanitization option. No information in the log.txt file.

michaelbrownuc commented 5 years ago

I was able to get tar to run by adding a check similar to the one for the leak sanitizer to the desired() function. I'm not sure why this works on my end and not on yours, but this appears to be some progress.

Mohannadcse commented 4 years ago

How did you run the analysis? I'm using the docker-machine, then go to one of the examples (say tar-1.14), finally, I goto the merged directory where are the Makefile and test.sh. Here is the full path: /chiselbench/benchmark/tar-1.14/merged

Then I run the make command make reduce but received the following error shown the the screenshot

image

KihongHeo commented 4 years ago

@Mohannadcse Can you try to replace "../target.mk" with "../../target.mk"?

Mohannadcse commented 4 years ago

Thanks. I changed it. There is another error image

KihongHeo commented 4 years ago

Please adjust benchmark dir (BENCHMARK_DIR) in test.sh, e.g., benchmark/$BENCHMARK_NAME to benchmark/$BENCHMARK_NAME/merged

Mohannadcse commented 4 years ago

Thanks, the script works now.

ternava commented 1 year ago

Still, even with these two last issues fixed, I have an error when I try to run make reduce for tar and sort, in their /chiselbench/benchmark/tar-1.14/merged and /chiselbench/benchmark/sort-8.16/merged respective folders.

In both cases I receive the same error as mentioned before: image

image

I looked in the log.txt of sort, this is the returned error.

https://github.com/aspire-project/chisel-bench/blob/490ae19d7f9cd49185e6fd70541785ad78a82dc5/benchmark/sort-8.16/merged/test.sh#L102

Whereas the log.txt of tar is empty.

Any idea how I can fix them?

ternava commented 1 year ago

Apparently, the error in sort is caused by the wrong use of characters inside comments in these two places:

https://github.com/aspire-project/chisel-bench/blob/490ae19d7f9cd49185e6fd70541785ad78a82dc5/benchmark/sort-8.16/merged/test.sh#L102

and

https://github.com/aspire-project/chisel-bench/blob/490ae19d7f9cd49185e6fd70541785ad78a82dc5/benchmark/sort-8.16/merged/test.sh#L117

In my case, the error in sort is fixed by using the straight single quotation marks, i.e., instead of \‘notexist’\ it should be changed to 'notexist'.

codingsoo commented 1 year ago

Looks like the issue is during the execution of tar-archives-multiple-files for the address sanitization option. No information in the log.txt file.

I have the same problem.