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

In which situation we will get the following error - OperationalError('disk I/O error') #17090

Open
1 task done
vreddy10 opened this issue Oct 1, 2024 · 5 comments
Open
1 task done
Assignees

Comments

@vreddy10
Copy link

vreddy10 commented Oct 1, 2024

In which situation we will get the following error - OperationalError('disk I/O error')

Log:

File "/usr/local/lib/python3.8/dist-packages/conans/client/conan_api.py", line 90, in wrapper
    api.create_app(quiet_output=quiet_output)
  File "/usr/local/lib/python3.8/dist-packages/conans/client/conan_api.py", line 244, in create_app
    self.app = ConanApp(self.cache_folder, self.user_io, self.http_requester,
  File "/usr/local/lib/python3.8/dist-packages/conans/client/conan_api.py", line 186, in __init__
    auth_manager = ConanApiAuthManager(rest_client_factory, self.user_io, self.cache.localdb)
  File "/usr/local/lib/python3.8/dist-packages/conans/client/cache/cache.py", line 186, in localdb
    return LocalDB.create(localdb_filename, encryption_key=encryption_key)
  File "/usr/local/lib/python3.8/dist-packages/conans/client/store/localdb.py", line 61, in create
    raise ConanException(message, e)
conans.errors.ConanException: ('Could not initialize local sqlite database', OperationalError('disk I/O error'))

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded memsharded self-assigned this Oct 1, 2024
@memsharded
Copy link
Member

Hi @vreddy10

Thanks for your question.

Conan uses a sqlite3 local DB to store some information, and the DB uses a file in disk for permanent storage. For some reason it seems this is not working fine. Possible reasons:

  • The Python that you are using is limited somehow. Sharing the results of conan version will give more information about your system
  • There is something specific in the permissions of the filesystem that doesn't allow to create or write to that file
  • There could be some race conditions or concurrency problems if you try to do this concurrently (the conan cache is not designed for concurrency, it cannot be shared by concurrent processes)

@vreddy10
Copy link
Author

vreddy10 commented Oct 1, 2024

Hi @memsharded

Question: The Python that you are using is limited somehow. Sharing the results of conan version will give more information about your system

Answer: We are using the following version of Python and Conan

Python3 Version - v3.8.10
Conan - 1.65.0 & 1.60.2

@vreddy10
Copy link
Author

vreddy10 commented Oct 1, 2024

Hi @memsharded

Could you please provide some information on the following point also:

  • There is something specific in the permissions of the filesystem that doesn't allow to create or write to that file

What are the recommended permissions to the Conan folder and file?

@memsharded
Copy link
Member

The Conan 2 conan version command I was referring to also prints other useful information like the OS, architecture, platform, Python installation, etc, these might also be related. Does this happen in different machines or just in one of them? Can you try in other different machines with the same OS and other machines with a different OS?

What are the recommended permissions to the Conan folder and file?

Run as a regular user, not as admin/root, and the cache in the regular user home.

@memsharded
Copy link
Member

Hi @vreddy10

Any further feedback here? did you manage to run in other machine? Running as regular user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants