Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-2698

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.5, 5.2 M2
    • Fix Version/s: 5.1.6, 5.2 M3
    • Component/s: None

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day, 1 hour
                  1d 1h
                  Remaining:
                  Remaining Estimate - 1 day, 1 hour
                  1d 1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified