Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2016, 05:22 AM   #1
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 576
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Device not ejecting?

I'm using Calibre 2.49 (32-bit) in Windows 8.1. Having updated my Kindle, I select "eject" from the Devices menu and all the device related buttons disappear from the toolbar as if the device was ejected successfully. However, Windows won't eject it because it was still in use... and this is now the third time in a row that this has happened. As Goldfinger said to James Bond, "Once is happenstance, twice is coincidence, but the third time it's enemy action."

Further investigation shows that the process which has a handle open for the device is an instance of calibre-parallel.exe, with this command line:

Code:
calibre-parallel.exe --pipe-worker "from calibre.utils.ipc.pool import run_main, worker main; run_main(worker_main)"
...which, without knowing what has been pumped into worker_main, tells me very little. The process isn't using any processor time, but neither does it terminate. Killing it allows me to eject the device, and doesn't seem to have any effect on anything else; but it does require a certain amount of effort on my part to find the process responsible and then kill it, which is annoying. What I'm wondering is, what might this process be doing that it still has an open handle after the device has been ejected? Anyone have any ideas?
Phssthpok is offline   Reply With Quote
Old 02-06-2016, 08:17 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: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As far as I know, there are no worker processes involved with devices in core calibre at all -- all device interaction is handled in a separate thread, not a worker process. The only thing I can think of that could possibly launch a worker process for the device is reading metadata of files on the device. What file is open on the device?
kovidgoyal is offline   Reply With Quote
Advert
Old 02-06-2016, 09:41 AM   #3
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 576
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by kovidgoyal View Post
As far as I know, there are no worker processes involved with devices in core calibre at all -- all device interaction is handled in a separate thread, not a worker process. The only thing I can think of that could possibly launch a worker process for the device is reading metadata of files on the device. What file is open on the device?
Damn, I forgot to check the handle itself, rather than just the process associated with the the handle... I'll try and make it happen again and let you know.
Phssthpok is offline   Reply With Quote
Old 02-06-2016, 12:06 PM   #4
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 576
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by kovidgoyal View Post
What file is open on the device?
It is indeed the metadata file (metadata.calibre) that's it's hanging on to.

There is a difference this time: instead of the one process I described, there are 3 processes: a calibre-parallel.exe (no command-line parameters) with 2 subprocesses, one of which is another calibre-parallel.exe with no command-line parameters, and the other one with these parameters:
Code:
--pipe-worker "from calibre.gui2.tweak_book.completion.worker import run_main, main; run_main(main)"
As I write, the Kindle was ejected from within Calibre just over 40 minutes ago, Calibre is no longer showing the device tools on the toolbar, the metadata file hasn't been written to since, but all three processes still have an open handle to the metadata file, are all idle, and I can't eject the device.

Last edited by Phssthpok; 02-06-2016 at 12:30 PM.
Phssthpok is offline   Reply With Quote
Old 02-06-2016, 10:25 PM   #5
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: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...ba580e85aaf844
kovidgoyal is offline   Reply With Quote
Advert
Old 02-07-2016, 04:13 AM   #6
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 576
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Aha, so that was it! Many thanks, as always.
Phssthpok is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo Ejecting SD Card Crusader Kobo Reader 7 01-16-2014 05:28 PM
Touch Ejecting multiple times? vaeditor Kobo Reader 19 07-01-2011 10:24 AM
K3 and PC: pluging & ejecting pavelh Amazon Kindle 10 03-17-2011 06:14 PM
Ejecting PRS 950 ccowie Devices 4 02-25-2011 05:03 PM
Ejecting from tray-icon Logseman Calibre 6 03-18-2010 09:49 PM


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


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