html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/7146#issuecomment-1272558504,https://api.github.com/repos/pydata/xarray/issues/7146,1272558504,IC_kwDOAMm_X85L2bOo,11075246,2022-10-09T14:49:33Z,2022-10-09T14:49:33Z,NONE,"I had to change ints and floats to doubles to reproduce the issue. ```python import h5py N_TIMES = 48 with h5py.File(""/my_s3_fs/test.nc"", mode=""w"") as f: time = f.create_dataset(""time"", (N_TIMES,), dtype=""d"") time[:] = 0 d1 = f.create_dataset(""d1"", (N_TIMES, 201, 201), dtype=""d"") d1[:] = 0 ```","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645 https://github.com/pydata/xarray/issues/7146#issuecomment-1272553921,https://api.github.com/repos/pydata/xarray/issues/7146,1272553921,IC_kwDOAMm_X85L2aHB,11075246,2022-10-09T14:27:06Z,2022-10-09T14:27:06Z,NONE,"datatype seems to be not important. But the two variables are required to get a segfault. The following with just floats produces a segfault ``` import numpy as np import xarray as xr N_TIMES=48 ds = xr.Dataset({""time"": (""T"", np.zeros((N_TIMES))), 'd1': ([""T"", ""x"", ""y""], np.zeros((N_TIMES, 201,201)))}) ds.to_netcdf(path=""/my_s3_fs/test_netcdf.nc"", format=""NETCDF4"", mode=""w"") ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645 https://github.com/pydata/xarray/issues/7146#issuecomment-1272544819,https://api.github.com/repos/pydata/xarray/issues/7146,1272544819,IC_kwDOAMm_X85L2X4z,11075246,2022-10-09T13:37:57Z,2022-10-09T14:25:51Z,NONE,"It seems that we need the time variable to reproduce the problem. The following code does not fail: ``` import numpy as np import xarray as xr import pandas as pd N_TIMES=64 ds = xr.Dataset({'d1': ([""T"", ""x"", ""y""], np.zeros((N_TIMES, 201,201)))}) ds.to_netcdf(path=""/my_s3_fs/test_netcdf.nc"", format=""NETCDF4"", mode=""w"") ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645 https://github.com/pydata/xarray/issues/7146#issuecomment-1272541759,https://api.github.com/repos/pydata/xarray/issues/7146,1272541759,IC_kwDOAMm_X85L2XI_,11075246,2022-10-09T13:21:22Z,2022-10-09T13:21:40Z,NONE,"The first one results in a segfault: ```python import numpy as np import xarray as xr import pandas as pd N_TIMES = 48 time_vals = pd.date_range(""2022-10-06"", freq=""20 min"", periods=N_TIMES) ds = xr.Dataset({""time"": (""T"", time_vals), 'd1': ([""T"", ""x"", ""y""], np.zeros((len(time_vals), 201,201)))}) ds.to_netcdf(path=""/my_s3_fs/test_netcdf.nc"", format=""NETCDF4"", mode=""w"") ``` Not sure how to add the 3D var to the second dataset.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645 https://github.com/pydata/xarray/issues/7146#issuecomment-1272539102,https://api.github.com/repos/pydata/xarray/issues/7146,1272539102,IC_kwDOAMm_X85L2Wfe,11075246,2022-10-09T13:08:26Z,2022-10-09T13:08:26Z,NONE,"Will try to reproduce this with h5py. For the bug to show up the file has to be large enough. That is why my example has a 2D array variable alongside the time dimension. With just the time dimension the script completes without an error. All three cases work without an error: `ds.to_netcdf()`, `ds2.to_netcdf()`, and `ds3.to_netcdf()`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645 https://github.com/pydata/xarray/issues/7146#issuecomment-1272514059,https://api.github.com/repos/pydata/xarray/issues/7146,1272514059,IC_kwDOAMm_X85L2QYL,11075246,2022-10-09T10:48:35Z,2022-10-09T10:48:35Z,NONE,"Adding a gdb [stackrace.txt](https://github.com/pydata/xarray/files/9741351/stackrace.txt) from corefile obtained with ``` docker run -v /mnt/fs:/my_s3_fs -it --rm --ulimit core=-1 --privileged netcdf:latest /bin/bash ``` and ``` sudo sysctl -w kernel.core_pattern=/tmp/core-%e.%p.%h.%t python mcve.py ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645 https://github.com/pydata/xarray/issues/7146#issuecomment-1272365368,https://api.github.com/repos/pydata/xarray/issues/7146,1272365368,IC_kwDOAMm_X85L1sE4,11075246,2022-10-08T17:37:24Z,2022-10-08T17:37:24Z,NONE,"libnetcdf, netcdf4 and hdf5 are at their latest versions available on conda-forge","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645 https://github.com/pydata/xarray/issues/7146#issuecomment-1272364031,https://api.github.com/repos/pydata/xarray/issues/7146,1272364031,IC_kwDOAMm_X85L1rv_,11075246,2022-10-08T17:30:41Z,2022-10-08T17:30:41Z,NONE,Can confirm the issue with xarray 2022.6.0 and dask 2022.9.2. The latest versions available on conda-forge. The issue might be related to netcdf4 and hdf5 libraries. Will try to update this as well.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1402002645