Issue217

Title Folder indexer crashing when in the folder there's a 7GB file
Priority bug Status in-progress
Superseder Nosy List admin
Assigned To
Keywords Plugin - Other

Created on 2023-08-29.13:03:29 by admin, last changed by admin.

Messages
msg992 (view) Author: admin Date: 2023-08-29.13:03:29
[Bugzilla user: telari7455@pbridal.com]
[Bugzilla date: 2023-08-29T11:03:29+00:00]

I have a folder with a single 7GB file that causes the indexer plugin to crash. The 7GB file is not a DICOM file so presumably it should not crash. Note that the size is about the size of my RAM allocated.
msg993 (view) Author: admin Date: 2023-08-29.13:07:52
[Bugzilla user: telari7455@pbridal.com]
[Bugzilla date: 2023-08-29T11:07:52+00:00]

Latest indexer cloned with "hg clone <indexer mercurial link>". Orthanc 12.2
msg994 (view) Author: admin Date: 2023-08-29.13:27:29
[Bugzilla user: telari7455@pbridal.com]
[Bugzilla date: 2023-08-29T11:27:29+00:00]

I experimentally determined that the exact way of crashing is that if the file size is greater than RAM size PLUS the swap size then on Ubuntu the exact error message is just "Killed". Which means that somewhere there is "malloc(entire_file_size)" which then crashes
msg995 (view) Author: admin Date: 2023-08-29.13:30:32
[Bugzilla user: telari7455@pbridal.com]
[Bugzilla date: 2023-08-29T11:30:32+00:00]

The culprit

https://orthanc.uclouvain.be/hg/orthanc-indexer/file/4bde2c2dc03c/Sources/Plugin.cpp#l102

I think it'd be nice to have it in the TODO to use mmap or something else to do this check without loading the whole file
msg996 (view) Author: admin Date: 2023-08-29.19:54:51
[Bugzilla user: telari7455@pbridal.com]
[Bugzilla date: 2023-08-29T17:54:51+00:00]

I self-assign this
msg997 (view) Author: admin Date: 2023-12-20.12:17:48
[Bugzilla user: s.jodogne@gmail.com]
[Bugzilla date: 2023-12-20T11:17:48+00:00]

For reference, this issue is related to the following discussion on Discourse:
https://discourse.orthanc-server.org/t/patch-for-orthanc-indexer-plugin-crashing-on-big-non-dicom-files/3849/7
History
Date User Action Args
2026-07-29 15:51:28admincreate