Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] sqlite3.OperationalError: disk I/O error #7063

Closed
drew2a opened this issue Sep 23, 2022 · 1 comment
Closed

[Tests] sqlite3.OperationalError: disk I/O error #7063

drew2a opened this issue Sep 23, 2022 · 1 comment

Comments

@drew2a
Copy link
Contributor

drew2a commented Sep 23, 2022

os: ubuntu-latest
https://github.com/Tribler/tribler/actions/runs/3111710669/jobs/5044306829#step:4:245

__________________ ERROR at setup of test_get_channels_peers ___________________

func = <function SQLiteProvider.set_transaction_mode at 0x7ff83fea0dc0>
provider = <pony.orm.dbproviders.sqlite.SQLiteProvider object at 0x7ff83dbe0520>
args = (<sqlite3.Connection object at 0x7ff83f832300>, <pony.orm.core.SessionCache object at 0x7ff83dbe0ee0>)
kwargs = {}
dbapi_module = <module 'sqlite3' from '/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/sqlite3/__init__.py'>
should_retry = False

    @decorator
    def wrap_dbapi_exceptions(func, provider, *args, **kwargs):
        dbapi_module = provider.dbapi_module
        should_retry = False
        try:
            try:
                if provider.dialect != 'SQLite':
                    return func(provider, *args, **kwargs)
                else:
                    provider.local_exceptions.keep_traceback = True
>                   try: return func(provider, *args, **kwargs)

../../../.virtualenvs/.venv/lib/python3.8/site-packages/pony/orm/dbapiprovider.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

provider = <pony.orm.dbproviders.sqlite.SQLiteProvider object at 0x7ff83dbe0520>
connection = <sqlite3.Connection object at 0x7ff83f832300>
cache = <pony.orm.core.SessionCache object at 0x7ff83dbe0ee0>

    @wrap_dbapi_exceptions
    def set_transaction_mode(provider, connection, cache):
        assert not cache.in_transaction
        if cache.immediate:
            provider.acquire_lock()
        try:
            cursor = connection.cursor()
    
            db_session = cache.db_session
            if db_session is not None and db_session.ddl:
                cursor.execute('PRAGMA foreign_keys')
                fk = cursor.fetchone()
                if fk is not None: fk = fk[0]
                if fk:
                    sql = 'PRAGMA foreign_keys = false'
                    if core.local.debug: log_orm(sql)
                    cursor.execute(sql)
                cache.saved_fk_state = bool(fk)
                assert cache.immediate
    
            if cache.immediate:
                sql = 'BEGIN IMMEDIATE TRANSACTION'
                if core.local.debug: log_orm(sql)
>               cursor.execute(sql)
E               sqlite3.OperationalError: disk I/O error

../../../.virtualenvs/.venv/lib/python3.8/site-packages/pony/orm/dbproviders/sqlite.py:392: OperationalError

During handling of the above exception, another exception occurred:

tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_get_channels_peers0')

    @pytest.fixture
    def metadata_store(tmp_path):
>       mds = MetadataStore(db_filename=tmp_path / 'test.db',
                            channels_dir=tmp_path / 'channels',
                            my_key=TEST_PERSONAL_KEY,
                            disable_sync=True)
@drew2a
Copy link
Contributor Author

drew2a commented Dec 1, 2022

Seems to be fixed.

@drew2a drew2a closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant