Memory Error/ Failed to convert to opf for id:

Bug #1291142 reported by William Harr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Not sure if this is due to the large number of books, or an error processing a particular file. I uninstalled and re-installed, no difference. Calibre goes into an infinite loop, ramping up memory to about 2.8 GB, then dropping back down to about 300MB and trying again. The debug lists:

calibre 1.27 isfrozen: True is64bit: False
Linux-3.2.0-59-generic-pae-i686-with-debian-wheezy-sid Linux ('32bit', 'ELF')
('Linux', '3.2.0-59-generic-pae', '#90-Ubuntu SMP Tue Jan 7 23:07:06 UTC 2014')
Python 2.7.5
Linux: ('debian', 'wheezy/sid', '')
Starting up...
Failed to read metadata from font file: /usr/share/fonts/truetype/ttf-tamil-fonts/TSCu_Times.ttf tuple index out of range
Failed to read metadata from font file: /usr/share/fonts/truetype/ttf-tamil-fonts/TSCu_Comic.ttf tuple index out of range
Failed to convert to opf for id: 229273
Traceback (most recent call last):
  File "site-packages/calibre/db/backup.py", line 92, in do_one
  File "site-packages/calibre/ebooks/metadata/opf2.py", line 1539, in metadata_to_opf
  File "site-packages/calibre/ebooks/metadata/opf2.py", line 1526, in factory
  File "lxml.etree.pyx", line 1413, in lxml.etree._Element.makeelement (src/lxml/lxml.etree.c:46060)
  File "apihelpers.pxi", line 123, in lxml.etree._makeElement (src/lxml/lxml.etree.c:13860)
  File "apihelpers.pxi", line 111, in lxml.etree._makeElement (src/lxml/lxml.etree.c:13732)
  File "apihelpers.pxi", line 264, in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:15399)
  File "apihelpers.pxi", line 1327, in lxml.etree._utf8 (src/lxml/lxml.etree.c:24596)
MemoryError
Failed to convert to opf for id: 229273

This repeats over and over, about every 5 seconds.
Running Ubuntu 12.04.
I reported this once before, but didn't have the debug output. Just thought you might want to be aware of a potential infinite loop based on a memory request error. Or a memory request error due to a failure to convert, possibly. Good Luck, and thanks for the great program. I have 4 GB on this machine, may upgrade to 8 to see if it gets past the memory error. Calibre reports 220280 books in the library, but the failure is on id 229273. The GUI is working, albeit very slowly. Some task is using 100% of one CPU for processing this.
I uninstalled and reinstalled. Then ran Library Maintenance/Check Library. It vacuumed for quite a while, and then I had it clean up the stuff it said needed cleaning. Still no luck. Rescan finds no errors.
Will probably work around by starting a new library and copying files into it. Will try rebuilding database first.
Under debug it cycles between 2.3 and 2.6 GB on each retry.

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

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
William Harr (william-h-harr) wrote : Re: [Bug 1291142] Fixed in master
Download full text (3.4 KiB)

Damn you're fast!

On Tue, Mar 11, 2014 at 11:40 PM, Kovid Goyal <email address hidden>wrote:

> Fixed in branch master. The fix will be in the next release. calibre is
> usually released every Friday.
>
> status fixreleased
>
> ** Changed in: calibre
> Status: New => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1291142
>
> Title:
> Memory Error/ Failed to convert to opf for id:
>
> Status in calibre: e-book management:
> Fix Released
>
> Bug description:
> Not sure if this is due to the large number of books, or an error
> processing a particular file. I uninstalled and re-installed, no
> difference. Calibre goes into an infinite loop, ramping up memory to
> about 2.8 GB, then dropping back down to about 300MB and trying again.
> The debug lists:
>
> calibre 1.27 isfrozen: True is64bit: False
> Linux-3.2.0-59-generic-pae-i686-with-debian-wheezy-sid Linux ('32bit',
> 'ELF')
> ('Linux', '3.2.0-59-generic-pae', '#90-Ubuntu SMP Tue Jan 7 23:07:06 UTC
> 2014')
> Python 2.7.5
> Linux: ('debian', 'wheezy/sid', '')
> Starting up...
> Failed to read metadata from font file:
> /usr/share/fonts/truetype/ttf-tamil-fonts/TSCu_Times.ttf tuple index out of
> range
> Failed to read metadata from font file:
> /usr/share/fonts/truetype/ttf-tamil-fonts/TSCu_Comic.ttf tuple index out of
> range
> Failed to convert to opf for id: 229273
> Traceback (most recent call last):
> File "site-packages/calibre/db/backup.py", line 92, in do_one
> File "site-packages/calibre/ebooks/metadata/opf2.py", line 1539, in
> metadata_to_opf
> File "site-packages/calibre/ebooks/metadata/opf2.py", line 1526, in
> factory
> File "lxml.etree.pyx", line 1413, in lxml.etree._Element.makeelement
> (src/lxml/lxml.etree.c:46060)
> File "apihelpers.pxi", line 123, in lxml.etree._makeElement
> (src/lxml/lxml.etree.c:13860)
> File "apihelpers.pxi", line 111, in lxml.etree._makeElement
> (src/lxml/lxml.etree.c:13732)
> File "apihelpers.pxi", line 264, in lxml.etree._initNodeAttributes
> (src/lxml/lxml.etree.c:15399)
> File "apihelpers.pxi", line 1327, in lxml.etree._utf8
> (src/lxml/lxml.etree.c:24596)
> MemoryError
> Failed to convert to opf for id: 229273
>
> This repeats over and over, about every 5 seconds.
> Running Ubuntu 12.04.
> I reported this once before, but didn't have the debug output. Just
> thought you might want to be aware of a potential infinite loop based on a
> memory request error. Or a memory request error due to a failure to
> convert, possibly. Good Luck, and thanks for the great program. I have 4
> GB on this machine, may upgrade to 8 to see if it gets past the memory
> error. Calibre reports 220280 books in the library, but the failure is on
> id 229273. The GUI is working, albeit very slowly. Some task is using
> 100% of one CPU for processing this.
> I uninstalled and reinstalled. Then ran Library Maintenance/Check
> Library. It vacuumed for quite a while, and then I had it clean up the
> stuff it said needed cleaning. Still no luck. Rescan finds no errors.
> Will ...

Read more...

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.