01-13-2024, 12:30 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
Can't quit calibre
I'm running calibre-server on Ubuntu 22.04.
When I need to do things like merging books or adding another user, I connect to my server using x2go and run run a script to kill the server service, wait until the process is no longer running, run calibre, wait until the process is no longer running, restart the server process. It used to run without an issue but for some weird reason, I no longer seem to be able to quit calibre: after pressing ctrl+q, I get the shutting down message, the window closes but the process never dies. Normally I kill it on the command line but today I decided to wait and see if it would die by itself. I've been checking it since I closed it and its CPU and memory usage have been dropping but, almost 5 hours later, the process is still alive. Any ideas what might be going on / how to fix it? Thanks. |
01-13-2024, 01:58 AM | #2 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Run calibre as calibre-debug -g from a terminal and see if anything is printed when quitting.
|
01-13-2024, 07:42 AM | #3 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
do I need a GUI? running from ssh I get:
calibre 7.3 embedded-python: True Linux-5.15.0-91-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF') ('Linux', '5.15.0-91-generic', '#101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023') Python 3.11.5 Interface language: None Successfully initialized third party plugins: Find Duplicates (1, 10, 8) qt.qpa.xcb: could not connect to display qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: minimalegl, linuxfb, vnc, vkkhrdisplay, eglfs, offscreen, xcb, wayland-egl, wayland, minimal. Aborted (core dumped) |
01-13-2024, 07:53 AM | #4 |
Addict
Posts: 237
Karma: 291844
Join Date: Oct 2019
Device: Kobo Nia
|
Yes as the switch "-g" means load the GUI.
|
01-13-2024, 08:02 PM | #5 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
so, this is interesting:
1. calibre-debug started without a problem despite the original calibre process still being in memory 2. when I closed the window I got a brief shutting down message, the window closed and I now have both calinbre (almost 24 h after shutdown) and calibre-debug -g in memory 3. the original process shows almost 0 CPU and memory usage now, but calibre-debug is still using 8%/10% #1 made me realise that while the processes are not dying, they seem to be releasing the database lock and I CAN run the server after closing the GUI's window. Do you have any ideas on why the processes are not unloading or how I could automate killing them as a workaround? Unfortunately, as the processes are staying in memory, waiting for them not to show on 'ps aux' is not working for me calibre-debug output: calibre 7.3 embedded-python: True Linux-5.15.0-91-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF') ('Linux', '5.15.0-91-generic', '#101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023') Python 3.11.5 Interface language: None Successfully initialized third party plugins: Find Duplicates (1, 10, 8) qt.qpa.xcb: X server does not support XInput 2 qt.qpa.gl: QXcbConnection: Failed to initialize GLX qt.qpa.gl: Xcb EGL gl-integration initialize failed QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled QPA platform: xcb devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 96.0 x 95.9160839160839 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... Falling back to using screens root_visual. [0.98] splash screen shown [0.98] Initializing db... [11.16] db initialized [11.16] Constructing main UI... [27.16] GUI main window shown [27.97] main UI initialized... [27.97] Hiding splash screen [32.50] splash screen hidden [32.55] Started up in 32.54 seconds with 13153 books |
01-13-2024, 09:37 PM | #6 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That means it isnt hanging in calibre code since releasing the database lock is oneof the last things it does.
|
01-13-2024, 11:00 PM | #7 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
where else could it be hanging if it's the calibre binary that comes up on 'ps aux':
calibre 493011 0.0 0.1 2075260 4380 pts/2 Sl+ Jan13 0:52 /home/calibre/bin/calibre/bin/calibre |
01-13-2024, 11:15 PM | #8 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In any library that the binary links against.
|
01-14-2024, 05:19 AM | #9 | |
Resident Curmudgeon
Posts: 76,004
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
01-14-2024, 05:54 AM | #10 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
|
01-14-2024, 07:40 AM | #11 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
so, it turns out I wasn't using wayland anyway. my server started it's life on mythbuntu and at some point I moved to the mate desktop but, as I only use it as server, I forgot it was using X11.
I removed all wayland libraries I could - there are 5 that I can't seem to be able to remove without losing my whole desktop. It didn't solve the issue with calibre hanging after closing. Any idea what library might be causing the problem? I installed it and always upgrade with "sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin" |
01-14-2024, 11:11 AM | #12 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Nope, no idea, cant say I have ever come across this issue before either.
|
01-14-2024, 04:51 PM | #13 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
might it be because people aren't noticing?
As the processes are releasing the DB locks, people wouldn't necessarily notice unless they are looking for the processes. The only reason I did is because I automated the "stop server, run calibre, restart server" routine when I need to do some DB maintenance and it relies on monitoring the processes to trigger some steps. so if people are not looking they might have a couple of zombie processes running and, if they're not opening and closing calibre too often and restart their machines somewhat regularly, they may not notice any adverse effects. |
01-14-2024, 08:46 PM | #14 | |
Wizard
Posts: 2,117
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Quote:
bernie My system: Linux Mint 21.3 Virginia Cinnamon 6.0.4 wayland Xwayland Code:
xxxx@xxxx:~$ calibre-debug -g calibre 7.3 embedded-python: True Linux-5.15.0-91-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF') ('Linux', '5.15.0-91-generic', '#101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023') Python 3.11.5 Interface language: None Successfully initialized third party plugins: DeACSM (0, 0, 16) && DeDRM (10, 0, 9) && Baen (1, 1, 0) && Barnes & Noble (1, 5, 2) && Diaps Editing Toolbag (0, 4, 0) && EpubMerge (2, 17, 0) && EpubSplit (3, 6, 0) && Goodreads (1, 7, 9) && Hyphenate This! (0, 1, 3) && KePub Metadata Reader (3, 4, 3) && KePub Metadata Writer (3, 4, 3) && KePub Output (3, 6, 6) && KindleUnpack - The Plugin (0, 83, 1) && Kobo Books (1, 10, 2) && Kobo Utilities (2, 16, 13) && Modify ePub (1, 8, 2) && Quality Check (1, 13, 6) QPA platform: wayland devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 92.01509433962264 x 91.44 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... [0.07] splash screen shown [0.07] Initializing db... [0.29] db initialized [0.29] Constructing main UI... DEBUG: 0.0 Kobo Utilities Configuration - CreateNewCustomColumn is supported DEBUG: 0.0 KoboUtilites::action.py - loading translations DEBUG: 0.0 KoboUtilites::dialogs.py - loading translations DEBUG: 0.0 KoboUtilites::action.py - loading translations qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile [1.15] GUI main window shown EpubMerge: DEBUG: 2024-01-14 20:47:13,964: calibre_plugins.epubmerge.epubmerge_plugin(156): macmenuhack file_path:/home/xxxx/.config/calibre/plugins/fanficfare_macmenuhack.txt DEBUG: 0.6 No Kobo Touch, Glo or Mini appears to be connected DEBUG: 0.6 rebuild_menus - self.supports_ratings=None, self.supports_tiles=None DEBUG: 0.6 KoboUtilities:set_toolbar_button_tooltip - start: text='None' DEBUG: 0.6 device_driver_name - could not load extended driver. Exception= No module named 'calibre_plugins.kobotouch_extended' [1.59] Started up in 1.59 seconds with 3715 books xxxx@xxxx:~$ Last edited by gbm; 01-14-2024 at 09:04 PM. |
|
01-17-2024, 12:58 AM | #15 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
|
Thanks.
I checked my preferences and I don't have the system tray enabled. I'm goin to put it down to a quirkiness of my configuration. Maybe because I'm using x2go, maybe because the box I'm running it in has seen a stupid amount of upgrades and changes since it started its life as a mythbuntu 7 or 8 box. |
Tags |
calibre, linux |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre Quit Unexpectedly | HogDrvr | Calibre | 1 | 07-31-2019 05:05 AM |
calibre-server quit working | technochitlin | Calibre | 7 | 06-12-2017 04:42 PM |
Calibre Quit Unexpectedly | kbenenson | Calibre | 5 | 11-08-2014 10:52 PM |
How to you quit calibre | DaleDe | Calibre | 4 | 02-02-2009 05:24 PM |