You are not logged in.

#1 2021-09-17 20:56:21

chris200x9
Member
Registered: 2008-03-05
Posts: 31

[SOLVED]Calibre disk I/O errors after upgrade

Hi I'm trying to add books to calibre but I keep getting errors:

calibre, version 5.27.0
ERROR: Errors while adding: Failed to add any books, click "Show details" for more information


----------------------------------------------------------------------
Failed to add the book: A Tree Grows in Brooklyn
	/home/chris200x9/Downloads/A Tree Grows in Brooklyn.epub
With error:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/db/backend.py", line 937, in execute
    return self.conn.cursor().execute(sql, bindings)
apsw.IOError: IOError: disk I/O error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/add.py", line 457, in add_book
    book_id = self.dbref().create_book_entry(mi, cover=cdata)
  File "/usr/lib/calibre/calibre/db/legacy.py", line 334, in create_book_entry
    ret = self.new_api.create_book_entry(mi, cover=cover, add_duplicates=add_duplicates, force_id=force_id)
  File "/usr/lib/calibre/calibre/db/cache.py", line 77, in call_func_with_lock
    return func(*args, **kwargs)
  File "/usr/lib/calibre/calibre/db/cache.py", line 1729, in create_book_entry
    self.backend.execute('INSERT INTO books(title, series_index, author_sort) VALUES (?, ?, ?)',
  File "/usr/lib/calibre/calibre/db/backend.py", line 944, in execute
    return self.conn.cursor().execute(sql, bindings)
apsw.IOError: IOError: disk I/O error

From looking at the command line input it seems the books are opening fine but this error sounds like they will not import, maybe something is up with the database. Another thing that leads me to that conclusion is, if I double click a book in the library I get an I/O error dialogue box but then the actual book does open. I read somewhere it's probably a permissions issue but even setting my library folder and the child files/folders to 777 does not help. I also cannot even create a new library as a user but everything works flawlessly as root. I'm really stumped. Is this a bug? It was fine before my latest system upgrade. Thanks in advance for any help.

Edit: I also tried both downgrading calibre and building it from git so it doesn't seem to be a calibre issue in and of itself.

Last edited by chris200x9 (2021-09-19 14:14:56)

Offline

#2 2021-09-18 05:37:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,442

Re: [SOLVED]Calibre disk I/O errors after upgrade

Found this dead old bug: https://github.com/rogerbinns/apsw/issues/61
It might be caused by either an sqlite update or your library have grown toomuch™.
In any event, check dmesg/the system journal to make sure that there're not *actual* IO errors and your disk is falling apart.

Offline

#3 2021-09-19 02:56:50

chris200x9
Member
Registered: 2008-03-05
Posts: 31

Re: [SOLVED]Calibre disk I/O errors after upgrade

seth wrote:

Found this dead old bug: https://github.com/rogerbinns/apsw/issues/61
It might be caused by either an sqlite update or your library have grown toomuch™.
In any event, check dmesg/the system journal to make sure that there're not *actual* IO errors and your disk is falling apart.

Nothing is written to dmesg. I don't think my database is too large, it's only 1.5 mb. I've also started a thread on the calibre reddit and someone suggested creating a new library but that results in a similar error. I even created a new user and it does the same thing when trying to create a library. It's weird running it as root creates an initial library in /root just fine and I can add books but regardless of how permissive I make things I cannot add books or create libraries as a regular user.

Edit: The reddit link in case anyone cares: https://www.reddit.com/r/Calibre/commen … _add_book/

Last edited by chris200x9 (2021-09-19 02:57:43)

Offline

#4 2021-09-19 07:51:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,442

Re: [SOLVED]Calibre disk I/O errors after upgrade

https://bbs.archlinux.org/viewtopic.php?id=269429 - the upstream report is because of a corrupted FS - I assume /root is not on the same partition as /home?

Offline

#5 2021-09-19 13:59:04

chris200x9
Member
Registered: 2008-03-05
Posts: 31

Re: [SOLVED]Calibre disk I/O errors after upgrade

seth wrote:

https://bbs.archlinux.org/viewtopic.php?id=269429 - the upstream report is because of a corrupted FS - I assume /root is not on the same partition as /home?

I think this is it, thank you so much! Any suggestions on how to fix it? I didn't see anything in the other threads.

Stupid f2fs, this is the second time I've had major problems with it.

Edit: Also none of my data seems to be corrupt though.

Edit2: Booted to single user mode andran fsck.f2fs -f on my /home partition and now it's all good. Thanks so much!

Last edited by chris200x9 (2021-09-19 14:16:15)

Offline

Board footer

Powered by FluxBB