Calibre Update Freezes, won't load, won't close -

Bug #1626865 reported by Fook Yew
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Expired
Undecided
Unassigned

Bug Description

2.68 update freezes on opening and won't load.

Standard Linux Debian-Jessie system.

Terminal output on loading below:

Ignoring undecodeable font path: '/home/mike/.fonts/Library/\xe9'
Exception in thread Thread-1:
Traceback (most recent call last):
  File "threading.py", line 810, in __bootstrap_inner
  File "site-packages/calibre/utils/fonts/scanner.py", line 234, in run
  File "site-packages/calibre/utils/fonts/scanner.py", line 252, in do_scan
  File "site-packages/calibre/__init__.py", line 513, in walk
  File "os.py", line 286, in walk
  File "posixpath.py", line 80, in join
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 1: unexpected end of data

Traceback (most recent call last):
  File "site-packages/calibre/gui2/ui.py", line 154, in __init__
  File "site-packages/calibre/gui2/ui.py", line 168, in init_iaction
  File "site-packages/calibre/customize/__init__.py", line 603, in load_actual_plugin
  File "importlib/__init__.py", line 37, in import_module
  File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
  File "calibre_plugins.bbcgf_ebook.ui", line 17, in <module>
  File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
  File "calibre_plugins.bbcgf_ebook.main", line 17, in <module>
ImportError: No module named PyQt4.Qt

Dependencies state that "PyQt 5.3" is minimum dependency, along with QT 5 - both are installed on current system, as is PyQt4 module.

Calibre was operating correctly up until this latest update, 2.68; the update to 2.68 broke it.

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

Run calibre in debug mode and post the output:

calibre-debug -g

And delete the /home/mike/.fonts/Library/é directory

ALso what do you mean by freezes and wont load. Freezes doing what? Wont load what?

Changed in calibre:
status: New → Incomplete
Revision history for this message
Fook Yew (keypier) wrote : Re: [Bug 1626865] Re: Calibre Update Freezes, won't load, won't close -
Download full text (4.0 KiB)

OK -

After deleting the original install and attempting to re-install using a completely new tarball on a wiped installation, the installer kept throwing network failures for some reason. After troubleshooting the network, i found that it was only the Calibre installer that was having this problem and there was no trouble with the Python networking modules in any of my Python IDEs, nor other Python apps.

Changing the name of the Chinese font directory managed to get the installer working again, but Calibre continues to freeze at startup and will not load. It can only be shut down in the background using a kill -9 command.

Calibre was also throwing some error messages about being unable to read other font files; i have corrected those, but Calibre continues to freeze up and refuses to close except through a kill command. This is now this is the debug -g output:

calibre 2.68 embedded-python: True is64bit: True
Linux-3.16.0-4-amd64-x86_64-with-debian-8.6 Linux ('64bit', 'ELF')
('Linux', '3.16.0-4-amd64', '#1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03)')
Python 2.7.9
Linux: ('debian', '8.6', '')
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 106.947368421 x 106.947368421
Starting up...
Failed to check for calibre update: ('_ssl.c:565: The handshake operation timed out',)

Not much there. I really don't have the slightest clue what the problem could be - however, you should note that it is throwing the network error once again. Even a standard interrupt call on the same terminal will not close Calibre - i must switch out to a separate terminal to issue the kill command.

Now, however, standard startup output gives no error messages.

Cheers -

D.

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

-------- Original Message --------
Subject: [Bug 1626865] Re: Calibre Update Freezes, won't load, won't close -
Local Time: September 23, 2016 7:01 PM
UTC Time: September 23, 2016 11:01 AM
From: <email address hidden>
To: <email address hidden>

Run calibre in debug mode and post the output:

calibre-debug -g

And delete the /home/mike/.fonts/Library/é directory

ALso what do you mean by freezes and wont load. Freezes doing what? Wont
load what?

** Changed in: calibre
Status: New => Incomplete

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1626865

Title:
Calibre Update Freezes, won't load, won't close -

Status in calibre:
Incomplete

Bug description:
2.68 update freezes on opening and won't load.

Standard Linux Debian-Jessie system.

Terminal output on loading below:

Ignoring undecodeable font path: '/home/mike/.fonts/Library/\xe9'
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 810, in __bootstrap_inner
File "site-packages/calibre/utils/fonts/scanner.py", line 234, in run
File "site-packages/calibre/utils/fonts/scanner.py", line 252, in do_scan
File "site-packages/calibre/__init__.py", line 513, in walk
File "os.py", line 286, in walk
File "posixpath.py", line 80, in join
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 1: unexpected end of data

Traceback (most recen...

Read more...

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

Once again, what is freezing up? The main user interface, the splash screen, clicking buttons? I can see nothing indicating a freeze in your debug output. Most likely calibre is simply coming up on a secondary monitor/tv you connected to your computer.

Network isses are a red herring. They just mean that the network path between your computer and the calibre server's is congested.

Revision history for this message
Fook Yew (keypier) wrote :

the main window comes up, but it is populated, with only the frozen image of the app that was under it. the splash screen comes up and freezes.

I can't close either from within the program, but must switch to a different way terminal (if I haven't started it in the background, as with the debug process) and kill it from there.

D.

Sent from ProtonMail mobile

-------- Original Message --------
On Sep 23, 2016, 20:12, Kovid Goyal wrote:

Once again, what is freezing up? The main user interface, the splash
screen, clicking buttons? I can see nothing indicating a freeze in your
debug output. Most likely calibre is simply coming up on a secondary
monitor/tv you connected to your computer.

Network isses are a red herring. They just mean that the network path
between your computer and the calibre server's is congested.

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1626865

Title:
Calibre Update Freezes, won't load, won't close -

Status in calibre:
Incomplete

Bug description:
2.68 update freezes on opening and won't load.

Standard Linux Debian-Jessie system.

Terminal output on loading below:

Ignoring undecodeable font path: '/home/mike/.fonts/Library/\xe9'
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 810, in __bootstrap_inner
File "site-packages/calibre/utils/fonts/scanner.py", line 234, in run
File "site-packages/calibre/utils/fonts/scanner.py", line 252, in do_scan
File "site-packages/calibre/__init__.py", line 513, in walk
File "os.py", line 286, in walk
File "posixpath.py", line 80, in join
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 1: unexpected end of data

Traceback (most recent call last):
File "site-packages/calibre/gui2/ui.py", line 154, in __init__
File "site-packages/calibre/gui2/ui.py", line 168, in init_iaction
File "site-packages/calibre/customize/__init__.py", line 603, in load_actual_plugin
File "importlib/__init__.py", line 37, in import_module
File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
File "calibre_plugins.bbcgf_ebook.ui", line 17, in <module>
File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
File "calibre_plugins.bbcgf_ebook.main", line 17, in <module>
ImportError: No module named PyQt4.Qt

Dependencies state that "PyQt 5.3" is minimum dependency, along with QT 5 - both are installed on current system, as is PyQt4 module.

Calibre was operating correctly up until this latest update, 2.68; the
update to 2.68 broke it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/calibre/+bug/1626865/+subscriptions

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1626865

If the UI is freezing, before anything is drawn, then there is likely an incompatibility between
Qt and the graphics drivers on your system. Not something I can do
anything about in calibre. Use strace to try to see what is freezing,
check the process monitor top/htop to see if the CPU is busy or idle,
and so on.

Revision history for this message
Fook Yew (keypier) wrote :
Download full text (6.0 MiB)

Here's the STrace (strace -ttT -o alibre.txt calibre:

09:53:02.768601 execve("/usr/bin/calibre", ["calibre"], [/* 59 vars */]) = 0 <0.000435>
09:53:02.769487 brk(0) = 0x1016000 <0.000043>
09:53:02.769649 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000050>
09:53:02.769801 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d52da000 <0.000048>
09:53:02.769947 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) <0.000047>
09:53:02.770090 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 <0.000051>
09:53:02.770230 fstat(3, {st_mode=S_IFREG|0644, st_size=190361, ...}) = 0 <0.000042>
09:53:02.770368 mmap(NULL, 190361, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f34d52ab000 <0.000048>
09:53:02.770500 close(3) = 0 <0.000042>
09:53:02.770634 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000045>
09:53:02.770791 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 <0.000053>
09:53:02.770930 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832 <0.000049>
09:53:02.771077 fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0 <0.000044>
09:53:02.771221 mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f34d4d11000 <0.000051>
09:53:02.771358 mprotect(0x7f34d4eb2000, 2097152, PROT_NONE) = 0 <0.000058>
09:53:02.771498 mmap(0x7f34d50b2000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f34d50b2000 <0.000057>
09:53:02.771653 mmap(0x7f34d50b8000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f34d50b8000 <0.000052>
09:53:02.771805 close(3) = 0 <0.000045>
09:53:02.771960 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d52aa000 <0.000046>
09:53:02.772097 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d52a9000 <0.000050>
09:53:02.772270 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d52a8000 <0.000045>
09:53:02.772405 arch_prctl(ARCH_SET_FS, 0x7f34d52a9700) = 0 <0.000043>
09:53:02.772675 mprotect(0x7f34d50b2000, 16384, PROT_READ) = 0 <0.000051>
09:53:02.772818 mprotect(0x7f34d52dc000, 4096, PROT_READ) = 0 <0.000050>
09:53:02.772950 munmap(0x7f34d52ab000, 190361) = 0 <0.000069>
09:53:02.773155 readlink("/proc/self/exe", "/opt/calibre/calibre", 1023) = 20 <0.000102>
09:53:02.773505 brk(0) = 0x1016000 <0.000043>
09:53:02.773628 brk(0x1037000) = 0x1037000 <0.000045>
09:53:02.773802 execve("/opt/calibre/bin/calibre", ["/opt/calibre/bin/calibre"], [/* 62 vars */]) = 0 <0.002549>
09:53:02.776565 brk(0) = 0x16d4000 <0.000013>
09:53:02.776636 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000015>
09:53:02.776694 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8881e12000 <0.000014>
09:53:02.776758 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) <0.000015>
09:53:02.776821 open("/opt/calibre/lib/tls/x86_64/libcalibre-launcher.so", O_RDONLY|O_CLOEXEC) ...

Revision history for this message
Fook Yew (keypier) wrote :

Full strace output -

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

The only thing I can see in that strace that might cause issues is some
font on your system that is causing a hang when loading. Try reducing
the fonts in /usr/share/fonts to a minimum and see if it fixes it.

Revision history for this message
Fook Yew (keypier) wrote :

I removed all but the TrueType fonts; Calibre still freezes up.

What about these calls? These are the last calls it makes before freezing up, currently:

17:15:20.239434 stat("/opt/calibre/lib/python2.7/site-packages/calibre/gui2/dbus", 0x7fff5feefc70) = -1 ENOENT (No such file or directory) <0.000036>
17:15:20.239539 open("/opt/calibre/lib/python2.7/site-packages/calibre/gui2/dbus.so", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000033>
17:15:20.239630 open("/opt/calibre/lib/python2.7/site-packages/calibre/gui2/dbusmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000027>
17:15:20.239712 open("/opt/calibre/lib/python2.7/site-packages/calibre/gui2/dbus.py", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000029>
17:15:20.239795 open("/opt/calibre/lib/python2.7/site-packages/calibre/gui2/dbus.pyo", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000029>

These are all D-Bus calls, and none of the referenced files are in the directory calibre is searching. Here is the directory in question:

actions filename_pattern_ui.pyo search_box.pyo
add_filters.pyo font_family_chooser.pyo search_restriction_mixin.pyo
add.pyo icon_theme.pyo shortcuts.pyo
auto_add.pyo __init__.pyo shortcuts_ui.pyo
bars.pyo init.pyo splash_screen.pyo
book_details.pyo job_indicator.pyo store
catalog jobs.pyo tag_browser
comments_editor.pyo keyboard.pyo tag_mapper.pyo
complete2.pyo languages.pyo threaded_jobs.pyo
convert layout.pyo throbber.pyo
cover_flow.pyo library toc
covers.pyo lrf_renderer tools.pyo
css_transform_rules.pyo main.pyo tweak_book
custom_column_widgets.pyo main_window.pyo ui.pyo
dbus_export metadata update.pyo
device_drivers notify.pyo viewer
device.pyo open_with.pyo widgets2.pyo
dialogs preferences widgets.pyo
dnd.pyo proceed.pyo win_file_dialogs.pyo
ebook_download.pyo progress_indicator wizard
email.pyo save.pyo

No D-Bus modules at all, no D-Bus directory (dbus), no D-Bus libraries (*.so).

Revision history for this message
Fook Yew (keypier) wrote :

Current STrace log attached.

Revision history for this message
Fook Yew (keypier) wrote :

Calibre is also saying that there are no "metadata.db-journal" nor "metadata.db-wal" files in the Calibre Library, but i've never seen either of those files in my time using Calibre.

17:15:19.315590 access("/home/mike/Calibre Library/metadata.db-journal", F_OK) = -1 ENOENT (No such file or directory) <0.000016>
17:15:19.315642 fstat(14, {st_mode=S_IFREG|0644, st_size=27697152, ...}) = 0 <0.000009>
17:15:19.315685 lseek(14, 24, SEEK_SET) = 24 <0.000009>
17:15:19.315720 read(14, "\0\3\274\1\0\0i\250\0\0`k\0\0\0\2", 16) = 16 <0.000012>
17:15:19.315762 fstat(14, {st_mode=S_IFREG|0644, st_size=27697152, ...}) = 0 <0.000009>
17:15:19.315800 access("/home/mike/Calibre Library/metadata.db-wal", F_OK) = -1 ENOENT (No such file or directory) <0.000012>

A Calibre Library search does show the metadata.db files where they should be, though:

[17:33 mike@SMITH Calibre Library] > ls | grep etadat
metadata.db
metadata_db_prefs_backup.json

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

Those are not dbus calls and they are not made by calibre. Those are attempts to load the python dbus package and are perfectly normal. python tries to load modules by going through the list of its package paths. And sqlite looks for -wal and -journal files as part of its normal operation. You need to look for a hang, failed file opens do not cause hangs unless they are done endlessly in a loop. The last (recognizable) thing in your strace that happens is talking to the dbus session bus to try to connect to the notifications service. So try running calibre like this

DBUS_SESSION_BUS_ADDRESS= calibre

to prevent that from happening.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for calibre because there has been no activity for 60 days.]

Changed in calibre:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.