conan icon indicating copy to clipboard operation
conan copied to clipboard

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

Open vreddy10 opened this issue 1 year ago • 6 comments

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?

  • [X] I've read the CONTRIBUTING guide

vreddy10 avatar Oct 01 '24 10:10 vreddy10

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)

memsharded avatar Oct 01 '24 11:10 memsharded

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 avatar Oct 01 '24 12:10 vreddy10

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?

vreddy10 avatar Oct 01 '24 12:10 vreddy10

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 avatar Oct 01 '24 13:10 memsharded

Hi @vreddy10

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

memsharded avatar Oct 03 '24 08:10 memsharded

Marking as staled, please let us know if you have any further feedback. Thanks!

memsharded avatar Oct 17 '24 12:10 memsharded

Closing as staled, please re-open or create a new ticket if you have any further feedback.

memsharded avatar Nov 25 '24 10:11 memsharded

@memsharded Thank you for the input.

vreddy10 avatar Nov 25 '24 11:11 vreddy10