Opened 7 years ago

Closed 7 years ago

Last modified 7 years 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 by kwaters, 7 years ago

Description: modified (diff)

comment:2 by Even Rouault, 7 years ago

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 by Even Rouault, 7 years ago

In 36867:

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

comment:4 by Even Rouault, 7 years ago

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 by Even Rouault, 7 years ago

In 36868:

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

comment:6 by Even Rouault, 7 years ago

In 36869:

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

comment:7 by Even Rouault, 7 years ago

In 36870:

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

comment:8 by Even Rouault, 7 years ago

In 36871:

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

comment:9 by Even Rouault, 7 years ago

In 36872:

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

comment:10 by Even Rouault, 7 years ago

In 36873:

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

comment:11 by Even Rouault, 7 years ago

In 36874:

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

Note: See TracTickets for help on using tickets.