Skip to content

MATLAB crashed while using zarrread function to read a big (2317GB) array #108

@jm9176

Description

@jm9176

I can consistently reproduce the crash on Windows.

zarrinfo is working fine.

Repro steps:

>> zarrinfo('https://noaa-nwm-retro-v2-zarr-pds.s3.amazonaws.com/elevation/')

ans = 

  struct with fields:

                chunks: [2×1 double]
            compressor: [1×1 struct]
                 dtype: '<f4'
            fill_value: 'NaN'
               filters: []
                 order: 'C'
                 shape: [2×1 double]
           zarr_format: 2
             node_type: 'array'
    x_ARRAY_DIMENSIONS: {2×1 cell}
           coordinates: 'latitude longitude'
             long_name: 'Feature Elevation'
         standard_name: 'Elevation'
                 units: 'meters'

>> out = zarrread('https://noaa-nwm-retro-v2-zarr-pds.s3.amazonaws.com/elevation/');
% MATLAB crashes


Abnormal termination:
std::terminate()

Current Thread: '' id 15904

Register State (captured):
  RAX = 00007fff2f6eb2c8  RBX = 00007fff2f6eb2c8
  RCX = 000000ee5c3faca0  RDX = 00007fff2f694920
  RSP = 000000ee5c3fabe0  RBP = 000000ee5c3fb970
  RSI = 0000000000000000  RDI = 00007fff2f6eb2c8
 
   R8 = 0000000000000003   R9 = 000000ee5c3fab58
  R10 = 0000000000000014  R11 = 0000000000000000
  R12 = 000000ee5c3fb878  R13 = 0000000000000000
  R14 = 00007fff2f6db1f8  R15 = 000000ee5c3fb2b0
 
  RIP = 00007fff2f5d21da  EFL = 00000202
 
   CS = 0033   FS = 0053   GS = 002b

Stack Trace (captured):
[  0] 0x00007fff2f5cb573 C:\Program Files\MATLAB\R2025a\bin\win64\libmwfl.dll+00046451 foundation::core::diag::thread_context::unspecified_bool+00000051
[  1] 0x00007fff2f5c99a8 C:\Program Files\MATLAB\R2025a\bin\win64\libmwfl.dll+00039336 foundation::core::diag::stacktrace_base::capture+00000024
[  2] 0x00007fff2f5cde1f C:\Program Files\MATLAB\R2025a\bin\win64\libmwfl.dll+00056863 foundation::core::diag::symbols::getSymbolAddress+00009903
[  3] 0x00007fff2f5d0cc7 C:\Program Files\MATLAB\R2025a\bin\win64\libmwfl.dll+00068807 foundation::core::diag::is_terminate_message_enabled+00000519
[  4] 0x00007ffee80c0ad8   C:\Program Files\MATLAB\R2025a\bin\win64\mcr.dll+00854744 mnFullExitFcn+00036712
[  5] 0x00007ffee80c02fd   C:\Program Files\MATLAB\R2025a\bin\win64\mcr.dll+00852733 mnFullExitFcn+00034701
[  6] 0x00007ffee80bc655   C:\Program Files\MATLAB\R2025a\bin\win64\mcr.dll+00837205 mnFullExitFcn+00019173
[  7] 0x00007ffee80c22f9   C:\Program Files\MATLAB\R2025a\bin\win64\mcr.dll+00860921 mnSetSegvServiceUrl+00000185
[  8] 0x00007fff132e3b58 C:\Program Files\MATLAB\R2025a\bin\win64\libmwfoundation_crash_handling.dll+00146264 foundation::crash_handling::set_terminate+00000200
[  9] 0x00007fffcf6bee12                   C:\WINDOWS\System32\ucrtbase.dll+00519698 terminate+00000034
[ 10] 0x00007fffa8d61d8d C:\Program Files\MATLAB\R2025a\bin\win64\VCRUNTIME140.dll+00007565 is_exception_typeof+00002909
[ 11] 0x00007fffa8d62d90 C:\Program Files\MATLAB\R2025a\bin\win64\VCRUNTIME140.dll+00011664 is_exception_typeof+00007008
[ 12] 0x00007fffa8d6f351 C:\Program Files\MATLAB\R2025a\bin\win64\VCRUNTIME140.dll+00062289 _CxxFrameHandler3+00000113
[ 13] 0x00007fffd2155cef                      C:\WINDOWS\SYSTEM32\ntdll.dll+00679151 _chkstk+00000303
[ 14] 0x00007fffd20ce8c6                      C:\WINDOWS\SYSTEM32\ntdll.dll+00125126 RtlFindCharInUnicodeString+00002710
[ 15] 0x00007fffd2104995                      C:\WINDOWS\SYSTEM32\ntdll.dll+00346517 RtlRaiseException+00000405
[ 16] 0x00007fffcf2c00ac                 C:\WINDOWS\System32\KERNELBASE.dll+00393388 RaiseException+00000108
[ 17] 0x00007fffa8d65267 C:\Program Files\MATLAB\R2025a\bin\win64\VCRUNTIME140.dll+00021095 CxxThrowException+00000151
[ 18] 0x00007fff2f60dd4a C:\Program Files\MATLAB\R2025a\bin\win64\libmwfl.dll+00318794 foundation::core::mem::manager::instance+00004474
[ 19] 0x00007fff3c461ec1 C:\Program Files\MATLAB\R2025a\bin\win64\MSVCP140.dll+00073409 std::_MP_Rem+00000801
[ 20] 0x00007fffcf6ba5ec                   C:\WINDOWS\System32\ucrtbase.dll+00501228 callnewh+00000044
[ 21] 0x00007fff0317029f C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+23134879 PyInit__tensorstore+21296799
[ 22] 0x00007fff0307fcf0 C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+22150384 PyInit__tensorstore+20312304
[ 23] 0x00007fff01eb59da C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+03496410 PyInit__tensorstore+01658330
[ 24] 0x00007fff02795c25 C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+12803109 PyInit__tensorstore+10965029
[ 25] 0x00007fff0279518a C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+12800394 PyInit__tensorstore+10962314
[ 26] 0x00007fff02ed2894 C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+20392084 PyInit__tensorstore+18554004
[ 27] 0x00007fff02ed477e C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+20399998 PyInit__tensorstore+18561918
[ 28] 0x00007fff02ed3258 C:\Users\ssohal\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorstore\_tensorstore.cp311-win_amd64.pyd+20394584 PyInit__tensorstore+18556504
[ 29] 0x00007fffcf669333                   C:\WINDOWS\System32\ucrtbase.dll+00168755 recalloc+00000163
[ 30] 0x00007fffd03f259d                   C:\WINDOWS\System32\KERNEL32.DLL+00075165 BaseThreadInitThunk+00000029
[ 31] 0x00007fffd210af78                      C:\WINDOWS\SYSTEM32\ntdll.dll+00372600 RtlUserThreadStart+00000040


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions