sqlancer icon indicating copy to clipboard operation
sqlancer copied to clipboard

Unexpected Empty Reducer Folder

Open bajinsheng opened this issue 2 years ago • 5 comments

@oraluben @ColinYoungTaro Great job for your reducer!

I am quite interested in it and have several questions when using it.

java -jar sqlancer-2.0.0.jar --num-threads 20 --use-reducer --reduce-ast --username root --password "" tidb --oracle WHERE

I run this command. Although I observed a crash, but no reduced log file was produced in the reduce folder. Can you help look into this issue?

bajinsheng avatar Aug 31 '23 12:08 bajinsheng

Thanks for using and helping to test! I'll take a look at it.

oraluben avatar Aug 31 '23 12:08 oraluben

@bajinsheng Did you see EXPERIMENTAL: Trying to reduce queries using a simple reducer. in stdout?

oraluben avatar Sep 01 '23 06:09 oraluben

No relevant output.

bajinsheng avatar Sep 01 '23 06:09 bajinsheng

The reducer relies on Reproducer from TestOracle.check, which is currently null for most of the oracle implementations. At the moment only NOREC for sqlite3 implemented that. I'll find a way to reuse the oracle implementations and make that work for other DB/oracle.

oraluben avatar Sep 01 '23 07:09 oraluben

I assume the other DBMSs need to implement the Reproducer class (see https://github.com/sqlancer/sqlancer/blob/7804a3adec0962ad6d24687c42ec473aa49669fe/src/sqlancer/sqlite3/oracle/SQLite3NoRECOracle.java#L41).

mrigger avatar Sep 01 '23 13:09 mrigger