SQLite connection close exception
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
## Description
After the experiment finishes and the report is generated, before the final termination, it will have with the following error messages:
```
INFO:root:Measuring all trials.
INFO:root:Finished measuring.
INFO:root:Finished scheduling.
INFO:root:Dispatcher finished.
ERROR:sqlalchemy.pool.impl.NullPool:Exception during reset or similar
Traceback (most recent call last):
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 693, in _finalize_fairy
fairy._reset(pool)
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 880, in _reset
pool._dialect.do_rollback(self)
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 538, in do_rollback
dbapi_connection.rollback()
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140352417691392 and this is thread id 140355676514048.
ERROR:sqlalchemy.pool.impl.NullPool:Exception closing connection
Traceback (most recent call last):
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 693, in _finalize_fairy
fairy._reset(pool)
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 880, in _reset
pool._dialect.do_rollback(self)
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 538, in do_rollback
dbapi_connection.rollback()
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140352417691392 and this is thread id 140355676514048.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 270, in _close_connection
self._dialect.do_close(connection)
File "/work/.venv/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 544, in do_close
dbapi_connection.close()
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140352417691392 and this is thread id 140355676514048.
INFO:root:Local experiment stopped.
```
## What is affected by this bug?
Currently, it will not affect final report generating.
The experiment run successfully in general. This error only shows up at the very end.
## When does this occur?
It shows up at the end of whole execution, after
```
...
INFO:root:Measuring all trials.
INFO:root:Finished measuring.
INFO:root:Finished scheduling.
INFO:root:Dispatcher finished.
```
and before
```
INFO:root:Local experiment stopped.
```
## Where on the platform does it happen?
- Linux 5.2.17-1rodete3-amd64, CPU: 16 cores, RAM: 62.9 G
- Docker version 19.03.5, build 633a0ea838
- Repo source commit: https://github.com/zchcai/fuzzbench/tree/b294ef59062a429b8b27f2fb933ac34f8d46e7b3
## How do we replicate the issue?
It mainly refers to the commands described in [here](https://github.com/google/fuzzbench/pull/399#issuecomment-638967274). A full documentation for local running will update soon.
The difference is the code repo to use (i.e., not the zchcai/filesys one) and the command to run:
```
PYTHONPATH=. python3 experiment/run_experiment.py --experiment-config experiment-config.yaml --benchmarks zlib_zlib_uncompress_fuzzer jsoncpp_jsoncpp_fuzzer --experiment-name multitest --fuzzers afl aflfast fairfuzz
```
## Expected behavior
No such error reporting at last.
## Other
It has no effect for running the whole experiment.
Contributor guide
Assessment
This issue has not been assessed yet.