Project

General

Profile

Bug #22576

Some classes do not properly initialize and close socket descriptors

Added by Eric Flumerfelt 2 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
05/10/2019
Due date:
% Done:

0%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

During testing of artdaq v3_05_00, one test was failing due to a strange error in XMLRPC. It appears that an XMLRPC file descriptor is being closed or shutdown prematurely. While researching potential causes of this issue, I found that several artdaq sockets are closed in destructors when their corresponding open may never have been called.

I have reviewed all instances of the close system call in artdaq and made sure that the socket variable is initialized to -1, that the socket variable's current value is compared to -1 before calling close, and that the socket variable's value is set to -1 after the close call.

History

#1 Updated by Eric Flumerfelt 2 months ago

Implemented on artdaq:bugfix/22576_FixSocketCloseCalls

#2 Updated by Eric Flumerfelt 2 months ago

  • Status changed from New to Resolved

#3 Updated by Ron Rechenmacher 2 months ago

I merged in bugfix branch, but commented out the added initialization:
...
//, request_socket_(-1)
, multicast_out_addr_(pset.get<std::string>("multicast_interface_ip", pset.get<std::string>("output_address", "0.0.0.0")))
, request_mode_(detail::RequestMessageMode::Normal)
//, token_socket_(-1)
...

I ran with: just_do_it.sh v --config demo_largesystem --comps component01 component02 component03 component04 - -v /home/ron/work/artdaqPrj/demo28-devel2/DAQInterface/boot.txt 60 --runs 2
and got error on the msgviewer:

Error / EventBuilder1_RequestSender
10-May-2019 13:29:14 CDT
mu2edaq01.fnal.gov (131.225.80.173)
UDPMessage 41 / PID 541 / RequestSender.cc:80
eventbuilder / Stopping / Sequence ID 640
Shutdown of token_socket_ resulted in ENOTSOCK. NOT Closing file descriptor!
Error / EventBuilder2_RequestSender
10-May-2019 13:29:14 CDT
mu2edaq01.fnal.gov (131.225.80.173)
UDPMessage 41 / PID 544 / RequestSender.cc:80
eventbuilder / Stopping / Sequence ID 639
Shutdown of token_socket_ resulted in ENOTSOCK. NOT Closing file descriptor!

and traces:

320 1557513032834286   546 20072  11    Dispatcher1_RequestSender nfo . Shutting down RequestSender: request_socket_: 574252397, token_socket_: 979726457
320 1557513032834286 546 20072 11 Dispatcher1_RequestSender nfo . Shutting down RequestSender: request_socket_: 574252397, token_socket_: 979726457

Then with the initialization back in, I got no errors.

#4 Updated by Ron Rechenmacher 2 months ago

  • Status changed from Resolved to Reviewed

I merged the branch into develop.

#5 Updated by Eric Flumerfelt 2 months ago

  • Target version set to artdaq v3_05_00
  • Status changed from Reviewed to Closed


Also available in: Atom PDF