Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#6750 closed defect (fixed)

gdalwarp falsely claims it doesn't have enough disk space (32 bit Linux)

Reported by: kwaters Owned by: warmerdam
Priority: normal Milestone: 2.1.3
Component: Utilities Version: 2.1.1
Severity: normal Keywords: gdalwarp
Cc:

Description (last modified by kwaters)

When running gdalwarp I get a message that there isn't enough space, but there is. Oddly, changing the destination file name changes the behavior. The failure looks like this (there are 3.2 Tb free on the disk): gdalwarp -of GTiff ./testdem_1_10_2_11.tif ./testdem_1_10_2_01.tif ./testdem_1_10_2_00.tif ./testdem_1_10_2_10.tif ./testdem_1_10.tif

Creating output file that is 18923P x 14430L.

ERROR 3: Free disk space available is 323878912 bytes, whereas 1092235560 are at least necessary.

However, if I change the name of the output file slightly, it works, as in the following: gdalwarp -of GTiff ./testdem_1_10_2_11.tif ./testdem_1_10_2_01.tif ./testdem_1_10_2_00.tif ./testdem_1_10_2_10.tif ./testdem_1_10_nocomp.tif

Those input files are floating point DEMs. A tarball of the files is at ftp://coast.noaa.gov/temp/kwaters/dems.tgz. Adding compression as a creation option gets me around this, but also makes the output file about 3 times bigger with LZW alone or 1.8 times bigger with PREDICTOR=3. Running this on a 32-bit RHEL machine.

Change History (11)

comment:1 Changed 3 months ago by kwaters

Description: modified (diff)

comment:2 Changed 3 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 36866:

Fix GetDiskFreeSpace?() on 32bit Linux to avoid 32bit overflow when free disk space is above 4 GB (fixes #6750)

comment:3 Changed 3 months ago by Even Rouault

In 36867:

Fix GetDiskFreeSpace?() on 32bit Linux to avoid 32bit overflow when free disk space is above 4 GB (fixes #6750)

comment:4 Changed 3 months ago by Even Rouault

Milestone: 2.1.3
Summary: gdalwarp falsely claims it doesn't have enough disk spacegdalwarp falsely claims it doesn't have enough disk space (32 bit Linux)

The issue was specific to 32 bit Linux. You can workaround the issue by disabling the check for free space by adding "--config CHECK_DISK_FREE_SPACE NO" to your command line

comment:5 Changed 3 months ago by Even Rouault

In 36868:

VSIUnixStdioFilesystemHandler::GetDiskFreeSpace?(): use statvfs64() when available (fixes #6750)

comment:6 Changed 3 months ago by Even Rouault

In 36869:

VSIUnixStdioFilesystemHandler::GetDiskFreeSpace?(): use statvfs64() when available (fixes #6750)

comment:7 Changed 3 months ago by Even Rouault

In 36870:

VSIUnixStdioFilesystemHandler::GetDiskFreeSpace?(): use statvfs64() when available (fixes #6750)

comment:8 Changed 3 months ago by Even Rouault

In 36871:

Unbreak MacOSX build failure due to previous commit (fixes #6750)

comment:9 Changed 3 months ago by Even Rouault

In 36872:

Unbreak MacOSX build failure due to previous commit (fixes #6750)

comment:10 Changed 3 months ago by Even Rouault

In 36873:

Safer detection of statvfs64 presence to avoid issues on other Unixes (fixes #6750)

comment:11 Changed 3 months ago by Even Rouault

In 36874:

Safer detection of statvfs64 presence to avoid issues on other Unixes (fixes #6750)

Note: See TracTickets for help on using tickets.