fix jmimemagic outofspace exception when uploading 50MB files with unknown 
extension
------------------------------------------------------------------------------------

                 Key: NXP-2698
                 URL: http://jira.nuxeo.org/browse/NXP-2698
             Project: Nuxeo Enterprise Platform
          Issue Type: Bug
    Affects Versions: 5.2 M2, 5.1.5
            Reporter: Olivier Grisel
            Assignee: Thierry Delprat
            Priority: Major
             Fix For: 5.1.6, 5.2 M3


Maybe upgrading to a newer version of jmimemagic will fix the problem.

To reproduce, create a big file with a funky extension:

  dd if=/dev/zero of=/tmp/file-050MB.funky bs=1048576 count=50

And then drag and drop it using the firefox plugin to some workspace.

Here is the log excerpt leading to the memory exception:

18:27:51,162 INFO  [MagicParser] endElement(): not adding invalid matcher 
'ASCII,'
18:27:51,163 INFO  [MagicParser] endElement(): not adding invalid matcher 
'continuation,'
18:27:51,164 INFO  [MagicParser] endElement(): not adding invalid matcher 
'extra field,'
18:27:51,165 INFO  [MagicParser] endElement(): not adding invalid matcher 
'original filename,'
18:27:51,165 INFO  [MagicParser] endElement(): not adding invalid matcher 
'comment,'
18:27:51,166 INFO  [MagicParser] endElement(): not adding invalid matcher 
'encrypted,'
18:27:51,217 INFO  [MagicParser] endElement(): not adding invalid matcher 
'interlaced'
18:27:51,259 INFO  [MagicParser] endElement(): not adding invalid matcher '%s'
18:27:51,261 INFO  [MagicParser] endElement(): not adding invalid matcher '%s'
18:27:51,284 INFO  [MagicParser] endElement(): not adding invalid matcher 
'POSIX'
18:27:51,346 INFO  [MagicParser] endElement(): not adding invalid matcher 
'Windows 3.x format'
18:27:51,360 INFO  [MagicParser] endElement(): not adding invalid matcher 
'Windows 3.x format'
18:27:51,390 INFO  [MagicParser] endElement(): not adding invalid matcher 'SGI'
18:28:32,267 INFO  [CacheManager] resizeAll size=6
18:28:38,275 INFO  [CacheManager] resizeAll size=6
18:28:39,186 INFO  [IndexingThreadPool] Indexing thread pool will be 
initialized with a size pool @ 5
18:28:39,194 INFO  [IndexingThreadPool] Indexing Thread Pool initialized...
18:28:39,375 INFO  [CacheManager] resizeAll size=10
18:28:54,115 ERROR [IndexingSingleDocumentTask] failed to index document with 
ref: '56435e93-3e27-4e02-82c6-6f5c072f74d6': null

Caused by: java.lang.OutOfMemoryError: Java heap space
        at 
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
        at 
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:393)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to