Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #12606 (closed)

Opened 5 years ago

Closed 5 years ago

BUG: tables.setMetadata creates a corrupt table

Reported by: spli Owned by: spli
Priority: critical Milestone: 5.1.0-m3
Component: API Version: 5.0.5
Keywords: n.a. Cc: python-team@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description (last modified by spli)

Tables.setMetadata appears to corrupt the HDF5 file:

t = session.sharedResources().newTable(0, 'test.h5')
t.initialize([omero.grid.DoubleColumn('ID')])
t.setMetadata('test', wrap('test'))
tid = unwrap(t.getOriginalFile().getId())
t.close()

session.sharedResources().openTable(omero.model.OriginalFileI(tid))
# Fails to open the table: returns None

Tables-0.log:

2014-10-21 12:29:31,515 INFO  [                            omero.remote] (Dummy-3   )  Meth: TablesI.getTable
2014-10-21 12:29:31,515 INFO  [                    omero.tables.TablesI] (Dummy-3   ) getTable: 266433 {'omero.session.uuid': 'fab3629b-20e8-4bf8-b1fa-4fa31eaca16e', 'omero.client.uuid': '7c1ff9da-3cc0-40df-84d3-c0ac374117e7'}
2014-10-21 12:29:31,529 INFO  [                 omero.tables.HdfStorage] (Dummy-3   ) Size: 0 - Attaching Table-1160A343-9BE0-49A9-A5A5-4C2455BE2CBB to /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266433
2014-10-21 12:29:31,530 INFO  [                            omero.remote] (Dummy-3   )  Rslt: 1160A343-9BE0-49A9-A5A5-4C2455BE2CBB -t @ Tables-0.TablesAdapter
2014-10-21 12:29:31,535 INFO  [                            omero.remote] (Dummy-4   )  Meth: TableI.initialize
2014-10-21 12:29:31,541 INFO  [                     omero.tables.TableI] (Dummy-4   ) Initialized Table-1160A343-9BE0-49A9-A5A5-4C2455BE2CBB with 1 col(s)
2014-10-21 12:29:31,541 INFO  [                            omero.remote] (Dummy-4   )  Rslt: None
2014-10-21 12:29:31,544 INFO  [                            omero.remote] (Dummy-5   )  Meth: TableI.setMetadata
2014-10-21 12:29:31,544 INFO  [                     omero.tables.TableI] (Dummy-5   ) Table-1160A343-9BE0-49A9-A5A5-4C2455BE2CBB.setMetadata() => test=test
2014-10-21 12:29:31,545 INFO  [                            omero.remote] (Dummy-5   )  Rslt: None
2014-10-21 12:29:31,548 INFO  [                            omero.remote] (Dummy-3   )  Meth: TableI.getOriginalFile
2014-10-21 12:29:31,548 INFO  [                     omero.tables.TableI] (Dummy-3   ) Table-1160A343-9BE0-49A9-A5A5-4C2455BE2CBB.getOriginalFile() => id=266433
2014-10-21 12:29:31,548 INFO  [                            omero.remote] (Dummy-3   )  Rslt: object #0 (::omero::model::OriginalFile)
{
    _id = object #1 (::omero::RLong)
    {
        _val = 266433
    }
    _d
2014-10-21 12:29:31,556 INFO  [                            omero.remote] (Dummy-4   )  Meth: TableI.close
2014-10-21 12:29:31,556 INFO  [                 omero.tables.HdfStorage] (Dummy-4   ) Size: 1 - Detaching Table-1160A343-9BE0-49A9-A5A5-4C2455BE2CBB from /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266433
2014-10-21 12:29:31,556 INFO  [                 omero.tables.HdfStorage] (Dummy-4   ) Cleaning storage: /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266433
2014-10-21 12:29:31,557 INFO  [                     omero.tables.TableI] (Dummy-4   ) Closed Table-1160A343-9BE0-49A9-A5A5-4C2455BE2CBB
2014-10-21 12:29:31,673 INFO  [                     omero.tables.TableI] (Dummy-4   ) Updated file object 266433 to hash=None (6008 bytes)
2014-10-21 12:29:31,673 INFO  [                            omero.remote] (Dummy-4   )  Rslt: None
2014-10-21 12:29:38,566 INFO  [                            omero.remote] (Dummy-5   )  Meth: TablesI.getTable
2014-10-21 12:29:38,566 INFO  [                    omero.tables.TablesI] (Dummy-5   ) getTable: 266433 {'omero.session.uuid': 'fab3629b-20e8-4bf8-b1fa-4fa31eaca16e', 'omero.client.uuid': '7c1ff9da-3cc0-40df-84d3-c0ac374117e7'}
2014-10-21 12:29:38,570 ERROR [                 omero.tables.HdfStorage] (Dummy-5   ) HDFStorage initialized with bad path: /repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266433
2014-10-21 12:29:38,570 INFO  [                            omero.remote] (Dummy-5   )  Excp: exception ::omero::ValidationException
{
    serverStackTrace = None
    serverExceptionClass = None
    message = HDFSt

Table file is corrupted:

[spli@ome-c6100-1 ~]$ python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tables
>>> tables.openFile('/repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266433')Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/tables/file.py", line 230, in openFile
    return File(filename, mode, title, rootUEP, filters, **kwargs)
  File "/usr/lib64/python2.6/site-packages/tables/file.py", line 495, in __init__
    self._g_new(filename, mode, **params)
  File "hdf5Extension.pyx", line 317, in tables.hdf5Extension.File._g_new (tables/hdf5Extension.c:3039)
tables.exceptions.HDF5ExtError: HDF5 error back trace

  File "H5F.c", line 1522, in H5Fopen
    unable to open file
  File "H5F.c", line 1313, in H5F_open
    unable to read superblock
  File "H5Fsuper.c", line 351, in H5F_super_read
    unable to load superblock
  File "H5AC.c", line 1322, in H5AC_protect
    H5C_protect() failed.
  File "H5C.c", line 3567, in H5C_protect
    can't load entry
  File "H5C.c", line 7957, in H5C_load_entry
    unable to load entry
  File "H5Fsuper_cache.c", line 471, in H5F_sblock_load
    truncated file

End of HDF5 error back trace

Unable to open/create file '/repositories/OMERO-5.0-merge-deploy/Files/Dir-266/266433'

In addition when tables.setAllMetadata is passed a dict it appears to set 'key'=>dict, instead of iterating through the key-value pairs in the dict.

Change History (5)

comment:1 Changed 5 years ago by spli

  • Description modified (diff)
  • Priority changed from major to critical
  • Summary changed from BUG: tables *metadata methods are broken to BUG: tables.setMetadata creates a corrupt table

comment:2 Changed 5 years ago by spli

setMetadata works in OMERO.server-4.4.12-ice35-b116 and fails in OMERO.server-5.0.0-ice35-b19

comment:3 Changed 5 years ago by spli

  • Remaining Time set to 2
  • Status changed from new to accepted

comment:4 Changed 5 years ago by spli

Corruption should be fixed by https://github.com/openmicroscopy/openmicroscopy/pull/3194

setAllMetadata still needs to be fixed

comment:5 Changed 5 years ago by spli

  • Remaining Time changed from 2 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.84073 sec.)

We're Hiring!