Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-13-2024, 12:30 AM   #1
d03j
Junior Member
d03j began at the beginning.
 
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.
d03j is offline   Reply With Quote
Old 01-13-2024, 01:58 AM   #2
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,866
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 01-13-2024, 07:42 AM   #3
d03j
Junior Member
d03j began at the beginning.
 
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)
d03j is offline   Reply With Quote
Old 01-13-2024, 07:53 AM   #4
georgemk
Addict
georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.
 
Posts: 234
Karma: 291844
Join Date: Oct 2019
Device: Kobo Nia
Yes as the switch "-g" means load the GUI.
georgemk is offline   Reply With Quote
Old 01-13-2024, 08:02 PM   #5
d03j
Junior Member
d03j began at the beginning.
 
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
d03j is offline   Reply With Quote
Old 01-13-2024, 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,866
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 01-13-2024, 11:00 PM   #7
d03j
Junior Member
d03j began at the beginning.
 
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
d03j is offline   Reply With Quote
Old 01-13-2024, 11:15 PM   #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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In any library that the binary links against.
kovidgoyal is offline   Reply With Quote
Old 01-14-2024, 05:19 AM   #9
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,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by d03j View Post
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)
Whayland is known to cause problems with calibre. Can you dump Wayland?
JSWolf is offline   Reply With Quote
Old 01-14-2024, 05:54 AM   #10
d03j
Junior Member
d03j began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
Quote:
Originally Posted by JSWolf View Post
Whayland is known to cause problems with calibre. Can you dump Wayland?
I can. Although I have my media server connected to my TV, I pretty much only use it headless and unless troubleshooting, only run gui apps through x2go.
d03j is offline   Reply With Quote
Old 01-14-2024, 07:40 AM   #11
d03j
Junior Member
d03j began at the beginning.
 
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"
d03j is offline   Reply With Quote
Old 01-14-2024, 11:11 AM   #12
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Nope, no idea, cant say I have ever come across this issue before either.
kovidgoyal is offline   Reply With Quote
Old 01-14-2024, 04:51 PM   #13
d03j
Junior Member
d03j began at the beginning.
 
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.
d03j is offline   Reply With Quote
Old 01-14-2024, 08:46 PM   #14
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 d03j View Post
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.
I just tested this on my desktop using both x-server and wayland, calibre works as expected. My suggestion is to make sure that you do not have system tray enabled in Preferences--look&feel.

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.
gbm is offline   Reply With Quote
Old 01-17-2024, 12:58 AM   #15
d03j
Junior Member
d03j began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2024
Device: Moon+ Reader on different devices
Thanks.

Quote:
Originally Posted by gbm View Post
make sure that you do not have system tray enabled in Preferences--look&feel.
[/CODE]
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.
d03j is offline   Reply With Quote
Reply

Tags
calibre, linux


Forum Jump

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


All times are GMT -4. The time now is 12:45 PM.


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