Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-09-2020, 02:24 AM   #1
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
Calibre 4.23 crashing on Ubuntu 20.10

Calibre 4.23, installed via the linux-installer script was working great on Ubuntu 20.04, but when I updated to the recently released Ubuntu 20.10, it began to crash on launch (just giving a SIGABT message).

After some experimentation, I determined that calibre will run fine the very first time, and create the Calibre Library and .config/calibre directories. But if launched while those directories exist, it will crash, every time. I've tried completely deinstalling and reinstalling several times, the reinstall goes fine and Calibre launches and runs the first time, but as soon as it is restarted it's back to crashing every time.

I'm going to continue troubleshooting but I was hoping someone might have already encountered it and know a work around.

I need to stick with 4.23 for now as I'd like to use the DeDRM and Obok plugins, which have not been updated for 5 yet.

Any clues or leads appreciated.
rafial is offline   Reply With Quote
Old 11-09-2020, 04:37 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Did you install from the Calibre website or the Ubantu suppository? If the later, then do the former.
JSWolf is offline   Reply With Quote
Old 11-09-2020, 10:16 AM   #3
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by rafial View Post
Calibre 4.23, installed via the linux-installer script was working great on Ubuntu 20.04, but when I updated to the recently released Ubuntu 20.10, it began to crash on launch (just giving a SIGABT message).

After some experimentation, I determined that calibre will run fine the very first time, and create the Calibre Library and .config/calibre directories. But if launched while those directories exist, it will crash, every time. I've tried completely deinstalling and reinstalling several times, the reinstall goes fine and Calibre launches and runs the first time, but as soon as it is restarted it's back to crashing every time.

I'm going to continue troubleshooting but I was hoping someone might have already encountered it and know a work around.

I need to stick with 4.23 for now as I'd like to use the DeDRM and Obok plugins, which have not been updated for 5 yet.

Any clues or leads appreciated.
Please open a terminal and run calibre in debug mode then post the result, also please post the entire SIGABT error code.

Code:
calibre-debug -g
bernie
gbm is offline   Reply With Quote
Old 11-09-2020, 11:46 AM   #4
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
Hilariously, calibre-debug -g launches just fine and dandy. I suppose in the worst case, this is my workaround.

Here is the output from the (successful) calibre-debug run:

calibre 4.23 embedded-python: True is64bit: True
Linux-5.8.0-7625-generic-x86_64-with-debian-bullseye-sid Linux ('64bit', 'ELF')
('Linux', '5.8.0-7625-generic', '#26~1603126178~20.10~210fe73~dev-Ubuntu SMP Tue Oct 20 01:00:22 ')
Python 2.7.16
Linux: ('debian', 'bullseye/sid', '')
Interface language: None
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 94.1467181467 x 94.0740740741
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.06] splash screen shown
[0.06] Initializing db...
[0.08] db initialized
[0.08] Constructing main UI...
Looking for desktop notifier support from: org.freedesktop.Notifications
org.freedesktop.Notifications found in 0.0 seconds
[0.57] main UI initialized...
[0.57] Hiding splash screen
[0.64] splash screen hidden
[0.64] Started up in 0.64 seconds with 1 books

Plain 'calibre' continue to crash, with the simple message:

fish: “calibre” terminated by signal SIGABRT (Abort)
rafial is offline   Reply With Quote
Old 11-09-2020, 11:57 AM   #5
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
I've been messing with strace to see if I can figure out any clues. Here's the very end of a crashing run. I'm not very experienced with reading strace, but my assumption is the mmap is last thing calibre actually did, and the rest of the stuff is the signal handler on the way out...

...
openat(AT_FDCWD, "/proc/mounts", O_RDONLY) = 22
fstat(22, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(22, "sysfs /sys sysfs rw,nosuid,nodev"..., 1024) = 1024
read(22, "s/fs/bpf bpf rw,nosuid,nodev,noe"..., 1024) = 1024
read(22, "p=1,timeout=0,minproto=5,maxprot"..., 1024) = 1024
read(22, "mes/1440 squashfs ro,nodev,relat"..., 1024) = 1024
read(22, "1000,group_id=1000 0 0\nportal /r"..., 1024) = 248
read(22, "", 1024) = 0
close(22) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4688016000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid() = 62546
gettid() = 62546
tgkill(62546, 62546, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=62546, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
fish: “strace calibre” terminated by signal SIGABRT (Abort)
rafial is offline   Reply With Quote
Old 11-09-2020, 09:37 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
where have you got this crashing calibre from? calibre does not use squashfs. Am guessing you are using th eflatpak version. uninstall that and install the official binaries.
kovidgoyal is offline   Reply With Quote
Old 11-10-2020, 03:11 AM   #7
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
Hello Kovid, thanks for taking a look. I got calibre by running:

sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin version=4.23.0

...that is the official way, is it not?

Just to be sure I double checked that there wasn't some other version accidentally in the path:

➜ which calibre
/usr/bin/calibre
➜ ls -l /usr/bin/calibre
lrwxrwxrwx 1 root root 20 Nov 9 08:37 /usr/bin/calibre -> /opt/calibre/calibre*


The squashfs you see in the strace output is just part of the contents of /proc/mounts as it is being read in. Looks like various bits of gnome running out of snaps, seems to be the Ubuntu way now. But nothing directly to do with calibre.
rafial is offline   Reply With Quote
Old 11-10-2020, 04:52 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Run it under gdb and get a backtrace that will likely be more useful than strace output.
kovidgoyal is offline   Reply With Quote
Old 11-11-2020, 01:56 AM   #9
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
Thanks for the gdb suggestion. I'm not very fluent in native development, but I was able to get this (center of the trace where it is bouncing around inside libpython elided):

Thread 1 "calibre" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1 0x00007ffff7be1864 in __GI_abort () at abort.c:79
#2 0x00007fffe821b452 in ?? () from /usr/lib/x86_64-linux-gnu/libffi.so.8
#3 0x00007fffd6179594 in ?? ()
from /opt/calibre/lib/python2.7/lib-dynload/_ctypes.so
#4 0x00007ffff783769b in ?? ()
from /opt/calibre/lib/../lib/libpython2.7.so.1.0
#5 0x00007fffd61753d7 in ?? ()
from /opt/calibre/lib/python2.7/lib-dynload/_ctypes.so
#6 0x00007ffff78592b2 in ?? ()
from /opt/calibre/lib/../lib/libpython2.7.so.1.0
#7 0x00007ffff78acaee in PyEval_EvalFrameEx ()
from /opt/calibre/lib/../lib/libpython2.7.so.1.0
#8 0x00007ffff78ab525 in PyEval_EvalFrameEx ()
from /opt/calibre/lib/../lib/libpython2.7.so.1.0
#9 0x00007ffff78aefbc in PyEval_EvalCodeEx ()
from /opt/calibre/lib/../lib/libpython2.7.so.1.0
#10 0x00007ffff78af0d9 in PyEval_EvalCode ()
from /opt/calibre/lib/../lib/libpython2.7.so.1.0
#11 0x00007ffff78c2ddc in PyImport_ExecCodeModuleEx ()
...
#54 0x00007ffff78a5087 in PyEval_CallObjectWithKeywords ()
from /opt/calibre/lib/../lib/libpython2.7.so.1.0
#55 0x00007ffff7dbe529 in execute_python_entrypoint ()
from /opt/calibre/lib/libcalibre-launcher.so
#56 0x0000000000400636 in ?? ()
#57 0x00007ffff7be3cb2 in __libc_start_main (main=0x400600, argc=1,
argv=0x7fffffffe5c8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe5b8)
at ../csu/libc-start.c:314
#58 0x0000000000400669 in ?? ()

So python calling out to something native?
rafial is offline   Reply With Quote
Old 11-11-2020, 02:01 AM   #10
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
Oh hmm... It's getting the system installed libffi.so.8 instead of the calibre bundled libffi.so.6 ... any way to control that?
rafial is offline   Reply With Quote
Old 11-11-2020, 02:06 AM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Make sure you are starting it as

/opt/calibre/calibre

and not

/opt/calibre/bin/calibre


the former is a launcher that set the LD_LIBRARY_PATH variable to make sure correct libraries are picked up.
kovidgoyal is offline   Reply With Quote
Old 11-11-2020, 02:26 AM   #12
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
➜ /opt/calibre/calibre
fish: “/opt/calibre/calibre” terminated by signal SIGABRT (Abort)
~
➜ /opt/calibre/bin/calibre
/opt/calibre/bin/calibre: error while loading shared libraries: libcalibre-launcher.so: cannot open shared object file: No such file or directory
rafial is offline   Reply With Quote
Old 11-11-2020, 02:32 AM   #13
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
And voila...

LD_PRELOAD=/opt/calibre/lib/libffi.so.6 calibre

...works!

Still a bit puzzled as to why calibre-debug runs okay, and regular calibre runs okay if it has to show the setup wizard before it launches, but ... I can at least hack the launch file this way if I need to.
rafial is offline   Reply With Quote
Old 11-11-2020, 03:01 AM   #14
rafial
Junior Member
rafial began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2020
Location: Seattle
Device: Kobo Glo HD
If anybody else runs into this... editing

/usr/share/applications/calibre-gui.desktop

And changing the Exec line to:

Exec=env LD_PRELOAD=/opt/calibre/lib/libffi.so.6 calibre --detach %F

...has got things running.
rafial is offline   Reply With Quote
Reply

Tags
calibre 4.23, crash, ubuntu, ubuntu 20.10


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre 5.0 Wireless Device Connection Crashing Calibre Companion datostar Calibre 3 10-05-2020 11:50 PM
Calibre Keeps Crashing? QueenFreewood Calibre 2 05-23-2015 08:57 AM
sigil 7.4 and maverick crashing crashing crashing Carrigboy Sigil 103 09-04-2014 11:47 AM
Calibre crashing on Ubuntu 13.04 - add books dcolhoun Library Management 2 08-22-2013 07:22 AM
Calibre crashing in Ubuntu 12.04 economix Calibre 17 07-29-2012 04:47 AM


All times are GMT -4. The time now is 01:11 AM.


MobileRead.com is a privately owned, operated and funded community.