Calibre crashes when trying to download a large file from content server

Bug #1909880 reported by Sunyata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

I'm using Calibre version 5.8.1 and have started a content server. When accessing the web page using my Kobo e-reader and trying to download a large file (17 MB) the Calibre application on Ubuntu crashes

(There is no problem for small files)

Ḯ've installed Calibre using the binary install instructions here: https://calibre-ebook.com/download_linux

My OS is Ubuntu 20.04

### Crash run

sunyata@sunyata-VivoBook:~$ calibre-debug -g
calibre 5.8.1 embedded-python: True is64bit: True
Linux-5.4.0-58-generic-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '5.4.0-58-generic', '#64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020')
Python 3.8.5
Interface language: None
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 157.8252427184466 x 157.65517241379308
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.24] splash screen shown
[0.24] Initializing db...
[0.38] db initialized
[0.38] Constructing main UI...
Looking for desktop notifier support from: org.freedesktop.Notifications
org.freedesktop.Notifications found in 0.0 seconds
[1.76] main UI initialized...
[1.76] Hiding splash screen
Starting QuickView
[2.14] splash screen hidden
[2.14] Started up in 2.14 seconds with 210 books

(No more messages appear)

sunyata@sunyata-VivoBook:~$ echo bt | coredumpctl gdb
No match found.
sunyata@sunyata-VivoBook:~$

#### Server logs

192.168.0.16 port-56955 - 03/jan/2021:10:59:11 +0100 "GET / HTTP/1.1" HTTPStatus.OK -
192.168.0.16 port-56955 - 03/jan/2021:10:59:16 +0100 "GET /mobile HTTP/1.1" HTTPStatus.OK -
192.168.0.16 port-56956 - 03/jan/2021:10:59:16 +0100 "GET /mobile HTTP/1.1" HTTPStatus.OK -
192.168.0.16 port-56956 - 03/jan/2021:10:59:16 +0100 "GET /static/mobile.css HTTP/1.1" HTTPStatus.OK -
192.168.0.16 port-56957 - 03/jan/2021:10:59:16 +0100 "GET /static/calibre.png HTTP/1.1" HTTPStatus.OK 7136
192.168.0.16 port-56956 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/242/CalibreLibrary HTTP/1.1" HTTPStatus.OK 28165
192.168.0.16 port-56958 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/240/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1713
192.168.0.16 port-56961 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/237/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1002
192.168.0.16 port-56960 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/238/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1236
192.168.0.16 port-56959 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/239/CalibreLibrary HTTP/1.1" HTTPStatus.OK 2717
192.168.0.16 port-56958 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/229/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1555
192.168.0.16 port-56957 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/235/CalibreLibrary HTTP/1.1" HTTPStatus.OK 4632
192.168.0.16 port-56961 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/236/CalibreLibrary HTTP/1.1" HTTPStatus.OK 4576
192.168.0.16 port-56956 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/230/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1900
192.168.0.16 port-56960 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/232/CalibreLibrary HTTP/1.1" HTTPStatus.OK 5019
192.168.0.16 port-56959 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/231/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1309
192.168.0.16 port-56958 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/233/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1441
192.168.0.16 port-56957 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/234/CalibreLibrary HTTP/1.1" HTTPStatus.OK 5070
192.168.0.16 port-56961 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/228/CalibreLibrary HTTP/1.1" HTTPStatus.OK 4763
192.168.0.16 port-56956 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/227/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1484
192.168.0.16 port-56960 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/226/CalibreLibrary HTTP/1.1" HTTPStatus.OK 2048
192.168.0.16 port-56958 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/224/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1713
192.168.0.16 port-56959 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/225/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1725
192.168.0.16 port-56957 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/223/CalibreLibrary HTTP/1.1" HTTPStatus.OK 2097
192.168.0.16 port-56961 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/222/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1933
192.168.0.16 port-56956 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/221/CalibreLibrary HTTP/1.1" HTTPStatus.OK 2462
192.168.0.16 port-56960 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/219/CalibreLibrary HTTP/1.1" HTTPStatus.OK 1746
192.168.0.16 port-56958 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/218/CalibreLibrary HTTP/1.1" HTTPStatus.OK 4723
192.168.0.16 port-56959 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/216/CalibreLibrary HTTP/1.1" HTTPStatus.OK 4510
192.168.0.16 port-56957 - 03/jan/2021:10:59:16 +0100 "GET /get/thumb/217/CalibreLibrary HTTP/1.1" HTTPStatus.OK 2062
192.168.0.16 port-56956 - 03/jan/2021:10:59:31 +0100 "GET /legacy/get/EPUB/242/CalibreLibrary/Python%20and%20Qt5%20-%20Martin%20Fitzpatrick_242.epub HTTP/1.1" HTTPStatus.OK 18441907
192.168.0.16 port-56957 - 03/jan/2021:10:59:31 +0100 "GET /legacy/get/EPUB/242/CalibreLibrary/Python%20and%20Qt5%20-%20Martin%20Fitzpatrick_242.epub HTTP/1.1" HTTPStatus.OK 18441907

### Frequency of problem

6/6

Sunyata (tord-dellsen)
summary: - Calibre crashes when downloading large files from content server
+ Calibre crashes when downloading a large file from content server
summary: - Calibre crashes when downloading a large file from content server
+ Calibre crashes when trying to download a large file from content server
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1909880

I do not provide support for people using distro provided packages. If you are using a distro provided package, uninstall it and install the official calibre binary from https://calibre-ebook.com/download_linux and if you can reproduce the bug with that, re-open the ticket. Of course, if you are already using the official binary, apologies and feel free to re-open the ticket immediately :)

 status invalid

Changed in calibre:
status: New → Invalid
Sunyata (tord-dellsen)
Changed in calibre:
status: Invalid → New
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote :

Crashes with what error? Run calibre in debug mode

calibre-debug -g

an post the log. If its an actual crash run

echo bt | coredumpctl gdb

and post the back trace. Go to Preferences->Sharing over the net and post the server logs.

Revision history for this message
Sunyata (tord-dellsen) wrote :

Okay, done! (see description above)

PS: Thank you for creating Calibre, a wonderful piece of software that has opened up a new world to me

description: updated
Revision history for this message
Kovid Goyal (kovid) wrote :

well according to that log the 18MB file was successfully sent and there
are no crashes.

Revision history for this message
Sunyata (tord-dellsen) wrote :

Okay. Just to be clear: Every time i try to download the large file the application crashes (simply closes, nothing else happens)

Revision history for this message
Kovid Goyal (kovid) wrote :

well without some kind of crash information, there isnt much I can do to
help. When calibre disappears when you run calibre-debug -g does the
command quit? With what exit code?

echo $?

Revision history for this message
Sunyata (tord-dellsen) wrote :

I've been able to transfer the book using a cable now, i mostly reported this bug for your sake and other's (i see it as giving a bit back), so i don't expect a solution soon

Anyway i don't think there was an exit code, or at least nothing after the line " [2.14] Started up in 2.14 seconds with 210 books" (i guess that's where the exit code would appear?)

Btw what does "echo $" mean?

Kind Regards

Revision history for this message
Kovid Goyal (kovid) wrote :

After running calibre-debug -g you wait till the prompt re-appears,
which means calibre-debug has quit. Then you run

echo $?

and post the output

Revision history for this message
Sunyata (tord-dellsen) wrote :

Okay, i've done this, here is the result i get:

[1.28] main UI initialized...
[1.28] Hiding splash screen
Starting QuickView
[1.66] splash screen hidden
[1.66] Started up in 1.66 seconds with 210 books
sunyata@sunyata-VivoBook:~$
sunyata@sunyata-VivoBook:~$ echo $?
141
sunyata@sunyata-VivoBook:~$

Hope this helps!

Revision history for this message
Kovid Goyal (kovid) wrote :

That indictes a crsh, now I need the back trace, see the genration section here: https://wiki.ubuntu.com/Backtrace

Revision history for this message
Sunyata (tord-dellsen) wrote :

That's a lot! Have you been able to reproduce the crash yourself? I could send you the file, the license is such that it is okay to share it

Revision history for this message
Kovid Goyal (kovid) wrote :

Nope I cant reproduce the crash, I doubt the file will matter, but sure
feel free to attach it.

Revision history for this message
Sunyata (tord-dellsen) wrote :

Well i haven't had problems with smaller files, so i figured the size of the file was the problem. I can send the file to you directly if you like, i'm uncertain about putting it up here for everyone (probably okay but i'm not sure). If so: What email can i send the file to?

Revision history for this message
Kovid Goyal (kovid) wrote :

just mark the bug private (top right corner)

Revision history for this message
Kovid Goyal (kovid) wrote :

I finally figured out the cause for this, it is fixed by https://github.com/kovidgoyal/bypy/commit/156d2b550491deb0be5a6d4db767519d7b5de05c
which will be in the next release.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
Sunyata (tord-dellsen) wrote :

Great!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers