rapp-project / rapp-platform

RAPP Platform is a collection of ROS nodes and back-end processes that aim to deliver ready-to-use generic services to robots
Other
28 stars 20 forks source link

Authentication Manager failure on simultaneous/parallel calls #336

Closed klpanagi closed 8 years ago

klpanagi commented 8 years ago
[ERROR] [WallTime: 1465347194.458473] Error processing request: 'NoneType' object has no attribute 'close'
['Traceback (most recent call last):\n', '  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 623, in _handle_request\n    response = convert_return_to_response(self.handler(request), self.respon
se_class)\n', '  File "/home/klpanagi/rapp_platform/rapp-platform-catkin-ws/src/rapp-platform/rapp_application_authentication_manager/src/rapp_application_authentication_manager/application_authentication_node.py", line 301, in aut
henticate_token_callback\n    res.username = self._db_handler.get_token_user(req.token)\n', '  File "/home/klpanagi/rapp_platform/rapp-platform-catkin-ws/src/rapp-platform/rapp_application_authentication_manager/src/rapp_applicatio
n_authentication_manager/database_handler.py", line 276, in get_token_user\n    response = self._get_token_user_proxy(req)\n', '  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 435, in __call_
_\n    return self.call(*args, **kwds)\n', '  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 528, in call\n    transport.close()\n', '  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/
impl/tcpros_base.py", line 807, in close\n    self.socket.close()\n', "AttributeError: 'NoneType' object has no attribute 'close'\n"]
[ERROR] [WallTime: 1465347194.467025] [Client 15] [id: Cv7fP9HCXD] call_service ServiceException: service [/rapp/rapp_application_authentication/authenticate_token] responded with an error: error processing request: 'NoneType' obje
ct has no attribute 'close'
[ERROR] [WallTime: 1465347194.468946] Error processing request: 32Broken pipe

Investigated this issue while performing parallel service call tests. It seems to break on any number of simultaneous calls (n>1).

etsardou commented 8 years ago

Probably due to simultaneous calls to the same ROS service proxy (as it is a member of self):

https://github.com/rapp-project/rapp-platform/blob/devel/rapp_application_authentication_manager/src/rapp_application_authentication_manager/database_handler.py#L276