[ome-devel] API call can crash server 5.1.4

Damir Sudar dsudar at lbl.gov
Fri Feb 12 19:56:57 GMT 2016


Hi all,

We're using the API to query the OMERO server (currently running 5.1.4) and
have run into a situation where this can crash the server or at least get
the server into a state where it becomes unresponsive. A hopefully useful
chunk from the OMEROweb.log is enclosed. I did not see anything in the
other logs that appeared related to the activity that caused the crash or
the crash itself. An excerpt of the code that causes the crash is here:

const std::string orphanedImagesQueryString =
    "select img from Image as img "
    "left outer join fetch img.datasetLinks as idl "
    "left outer join fetch idl.parent as dst "
    "left outer join fetch img.fileset as fs "
    "join fetch fs.usedFiles as uf "
    "join fetch uf.originalFile as of "
    "join fetch img.pixels as pxl "
    "join fetch pxl.pixelsType as pxt ";
//  "where dst.id is null";

omero::sys::ParametersIPtr dsParams = new omero::sys::ParametersI();
dsParams->addLong("id", omero::rtypes::rlong(803));
auto imageObjects = query->findAllByQuery(orphanedImagesQueryString,
dsParams);
for (auto image : omero::cast<omero::model::ImagePtr>(imageObjects)) {
    std::cout << "i: "  << image->getId()->getValue() << " " <<
image->getName()->getValue() << "\n";
}

I'm not sure, but as I understand, the crash occured when I commented
"where dst.id is null" condition. The query with "where dst.id is null"
didn't return result and I tried to remove the  "is null" condition - to
see what would happen. And the server crashed.

It appears that the server crashed when we tried to query images without
parent dataset ("orphaned images”). I.e. something related to handling a
situation where a parent pointer is NULL.

- Damir

-- 
Damir Sudar - Staff Scientist
Lawrence Berkeley National Laboratory
One Cyclotron Road, MS 977, Berkeley, CA 94720, USA
T: 510/486-5346 - F: 510/486-5586 - E: DSudar at lbl.gov

Visiting Scientist, Oregon Health and Science University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20160212/8d83453e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omeroweb.log
Type: application/octet-stream
Size: 61146 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20160212/8d83453e/attachment.obj>


More information about the ome-devel mailing list