[STOR-217] Service crashes on status of async operations Created: 14/May/13  Updated: 30/Jan/15  Resolved: 22/Nov/13

Status: Closed
Project: StoRM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.11.3
Security Level: Public (Visbile by non-authn users.)

Type: Bug Priority: Major
Reporter: Valerio Venturi [X] (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

https://storm.cnaf.infn.it:8443/redmine/issues/373



 Description   

If the frontend is serving a request for the status of an asynchronous request, and for any reason it is unable to get any surl status information from the DB where no surls have been provided by the user, the code tries to allocate a 0 size array causing a logic_error.

This can happen for example when the user provides a non existent token and not the surls, or when the DB is overloaded and storm fails in obtaining a db connection in its tollerance time (3 attemps in a total of 10 seconds).



 Comments   
Comment by Enrico Vianello [ 18/Nov/13 ]

The test "Status of bring online using a non existent token" doesn't check the output returned from clientSRM. StoRM 1.11.2 passes this test because of this issue (ClientSRM return code is always zero). In fact the output of this test was:

============================================================
Sending BringOnline request to: omii004-vm03.cnaf.infn.it:8444
Before execute:
Afer execute:
Request Status Code -1
Poll Flag 0
============================================================
Request status:
gSoap code: 1

soap_print_fault:
SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
"Fatal error"
Detail: [no detail]


soap_print_fault_location:
HTTP/1.1 500 Internal Server Error
Server: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 556
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://srm.lbl.gov/StorageResourceManager"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Fatal error</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
<!-- ** HERE ** -->
============================================================

It doesn't seem a good output but the FE doesn't crash.

With StoRM 1.11.3 (still under development) something has changed and now the output is:

============================================================
Sending BringOnline request to: omii005-vm03.cnaf.infn.it:8444
Before execute:
Afer execute:
Request Status Code -1
Poll Flag 0
============================================================
Request status:
gSoap code: -1

soap_print_fault:
Error -1 fault: SOAP-ENV:Client [no subcode]
"CGSI-gSOAP running on jen06.cnaf.infn.it reports Error reading token data header: Connection closed"
Detail: [no detail]


soap_print_fault_location:
============================================================

And the FE crashes!

Comment by Valerio Venturi [X] (Inactive) [ 15/May/13 ]

Tests pass. The issue was actually fixed.

Comment by Valerio Venturi [X] (Inactive) [ 15/May/13 ]

Regression tests added
https://github.com/valerioventuri/storm-testsuite/commit/be1a30ebda7f8b6c57260d9f94d2cf91c33238d4

Generated at Sat Apr 19 21:32:00 CEST 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.