Build: #163 was successful Changes by André Offringa <offringa@gmail.com>

Stages & jobs

  1. Tag

  2. Default Stage

  3. Create Test Plan Branch

Build result summary

Details

Completed
Queue duration
< 1 second
Duration
16 minutes
Labels
None
Agent
cbt-el7-9.cv.nrao.edu
Revisions
Casa6
82941bcdd6ac17a06eecbc15a648a3feee931033
OPEN-CASA-PKG
e5285e68467f01199807a1f1a978aec8a4781be7
GitHub Casacore
0e84114f672061a969d2306106f6c9287a39b259
Successful since
#153 ()

Code commits

GitHub Casacore
Author Commit Message Commit date
André Offringa <offringa@gmail.com> André Offringa <offringa@gmail.com> 0e84114f672061a969d2306106f6c9287a39b259 Fix disk-space leak in StandardStMan and IncrementalStMan (#1566)
This fixes the issue reported by Reinout:

I think I’ve found a disk-space leak in casacore tables. Removing an array column that is not FixedShape from a StandardStMan or IncrementalStMan deletes the data manager and its table.fN file, but leaves the indirect-array file table.fNi on disk. Nothing refers to that file any more, so its space is never reclaimed. Fixed-shape columns don’t leak. I see this with casacore 3.8.2 and python-casacore 3.6.1.

Minimal reproducer:
import os, numpy as np
from casacore.tables import table, maketabdesc, makescacoldesc, makearrcoldesc
td = maketabdesc([makescacoldesc('KEEP', 0),
                  makearrcoldesc('ARR', 0j, shape=[16, 4], datamanagergroup='grp',
                                 datamanagertype='StandardStMan')])  # not FixedShape -> indirect
t = table('leak.tab', td, nrow=10000, ack=False)
t.putcol('ARR', np.ones((10000, 16, 4), complex)); t.close()
t = table('leak.tab', readonly=False, ack=False)
t.removecols(['ARR'])
print(sorted(v['SEQNR'] for v in t.getdminfo().values()))  # [0]: data manager 1 is gone
t.close()
print({f: os.path.getsize('leak.tab/' + f) for f in os.listdir('leak.tab') if f.startswith('table.f')})

In practice this hits pipelines that add and drop temporary model columns, for example per-direction MODEL_DATA columns in calibration. One of my MSs had 120 such orphan files totalling 6 TB(!). I now delete the leftover files myself after removecols, but it would be good to fix this in casacore.