![]() |
#931 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
![]() |
![]() |
#932 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 983
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
I also see the failure to store book positions and failure to backup the database, on OS X 10.10.3 running Calibre 2.26 (64-bit) with the current Kobo Extended plugin.
I can read books in the Calibre reader though, so my install isn't as busted as Grady's :-) |
![]() |
Advert | |
|
![]() |
#933 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,563
Karma: 79436716
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I wonder if (yet again) this is related to OSX being out of file handles? See http://docs.basho.com/riak/latest/op...imit/#Mac-OS-X
|
![]() |
![]() |
#934 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
The file handles might be part of it, but there is also a problem with the logging. The device jobs handle this differently to other jobs. I have seen this problem before and the fix was to reduce the logging. In this case I had added an extra statement that more than doubled the logging and forgot to remove it. I have fixed this now with version 2.0.7 which will be available in the next hour or so.
I also fixed a problem with the backup if one of the files was missing. That won't be a common problem, but my Glo HD didn't have an affiliates file when I first connected. |
![]() |
![]() |
#935 |
Member
![]() Posts: 11
Karma: 10
Join Date: Sep 2013
Device: Kobo Aura
|
David, you rock. I deleted calibre and downloaded a new copy and the book opens fine (but the Kobo backup didn't work). Downloaded the new plugin, restarted calibre and the Kobo backup worked.
Everything is now good. Thanks for your help, and for developing an awesome plugin. |
![]() |
Advert | |
|
![]() |
#936 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 983
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
It works for me too, thanks David!
lsof reports the main calibre process using 181 file descriptors, which seems high compared to the process soft limit of 256, but most of that seems down to Qt and python and thus not easily fixed. I'd be worried if the plugin needed 75 file descriptors! |
![]() |
![]() |
#937 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Good to hear it worked.
As to the file descripters, I really hope it isn't using 75. The line I removed was writing the log in a different way, so it might have used a couple of extras. It also would have meant that a lot of extra log messages were being written. I have seen a similar looking error on Windows and assumed it was a buffer filling up somewhere. Reducing the messages fixed this, but this time it seems to be something different. |
![]() |
![]() |
#938 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 983
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
I don't know how you test the plugin David, but I noticed when playing in Xcode last night that Xcode has a higher soft limit of file descriptors than default.
That makes sense - Xcode users may need lots of open files - but that also means that anything run directly by Xcode inherits those increased resource settings. If you're testing inside Xcode perhaps that's why the problem doesn't show up? Read 'man getrlimit' to find out how to read and change the limits. |
![]() |
![]() |
#939 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
No, I do all my calibre work under Windows. From memory, the file handle limits are a lot higher than that under Windows. So, unless Python or the rest of calibre is using a lot, that explains why I am not seeing the problem.
|
![]() |
![]() |
#940 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 983
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
OK. I don't remember how Windows works.
If it happens again, I'll see if I can figure out what went wrong. |
![]() |
![]() |
#941 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I've added code to increase the limit on calibre startup on unix.
https://github.com/kovidgoyal/calibr...82e4f5cbd322d5 I dont usually like to do things like that with OS controlled policy, but the limit is too low on OS X and there have been a fair number of reports of errors caused by this limitation. |
![]() |
![]() |
#942 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Kovid: I can understand the desire not to fiddle with this sort of thing, but in this case it makes sense. Thanks.
|
![]() |
![]() |
#943 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 983
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
I watched calibre 2.26 opening/closing files via a short dtrace script - and noticed some quite strange behaviour. (I wrote the script in case one of David's driver updates has issues again.)
Essentially, every book cover in the library seems to get opened twice (and then closed, so no fd leaks.) Do you know why that might be? It doesn't seem very efficient to keep hitting the filesystem. Calibre also seems to read the covers (again, double opens and closes) of a number of other books every time you select a book in the main list. It feels like it might be filling a sort of cache (read-ahead), but then when you select one of the other books that got opened, calibre goes and reopens the cover (twice) anyway. Odd. Here's a bit of the output of my script to show you what I mean about the double opens/closes: Quote:
|
|
![]() |
![]() |
#944 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
All books covers should never be opened, only a few books "around" the current book. Different components in the UI open the covers separately, the grid view, the cover browser, the book details panel. The first two also maintain small in memory caches (they have to be separate since the sizes of the displayed covers are different). However, if you hide both the cover browser and the grid view, then you should be seeing only cover opens coming from the book details panel which should be one at a time.
If that does not explain what you are seeing, let me know and I will take a look. Last edited by kovidgoyal; 04-29-2015 at 11:29 PM. |
![]() |
![]() |
#945 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Never mind, there was indeed a bug causing the double opens, now fixed.
|
![]() |
![]() |
Tags |
calibre, kobo, kobo utilities, kobo-utilities, plugins |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Manga plugin | mastertea | Plugins | 6 | 01-06-2022 02:43 AM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |
Kobo Utilities Plugin Question | nikev | Kobo Reader | 10 | 09-25-2018 11:55 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |