{"action":"created","issue":{"url":"https://api.github.com/repos/sardana-org/sardana/issues/662","repository_url":"https://api.github.com/repos/sardana-org/sardana","labels_url":"https://api.github.com/repos/sardana-org/sardana/issues/662/labels{/name}","comments_url":"https://api.github.com/repos/sardana-org/sardana/issues/662/comments","events_url":"https://api.github.com/repos/sardana-org/sardana/issues/662/events","html_url":"https://github.com/sardana-org/sardana/issues/662","id":277547993,"number":662,"title":"Is PoolUtil thread-safe?","user":{"login":"jkotan","id":10651163,"avatar_url":"https://avatars0.githubusercontent.com/u/10651163?v=4","gravatar_id":"","url":"https://api.github.com/users/jkotan","html_url":"https://github.com/jkotan","followers_url":"https://api.github.com/users/jkotan/followers","following_url":"https://api.github.com/users/jkotan/following{/other_user}","gists_url":"https://api.github.com/users/jkotan/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotan/subscriptions","organizations_url":"https://api.github.com/users/jkotan/orgs","repos_url":"https://api.github.com/users/jkotan/repos","events_url":"https://api.github.com/users/jkotan/events{/privacy}","received_events_url":"https://api.github.com/users/jkotan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-28T21:41:41Z","updated_at":"2017-12-04T10:58:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi, \r\n\r\nI would like to ask if access to `PoolUtil` object (defined on the `poolutil` module level) via its `get_device(...)` is thread safe? \r\nSince `get_device(...)` is non-atomic operation on `CaselessDict()` wouldn't be better to protect it via mutex or lock?\r\n\r\nI ask this question because we encountered problems with `TangoAttrCTController`.\r\nIn one of our pools we have almost a hundred  pool `TangoAttrCTController` devices where many of them are from other `TANGO_HOST`'s. Accessing them simultaneously we get randomly corba TIME_OUT errors, e.g.\r\n\r\n    DevFailed[\r\n    DevError[\r\n\tdesc = TRANSIENT CORBA system exception: TRANSIENT_CallTimedout\r\n      origin = DeviceProxy:read_attribute\r\n      reason = API_CorbaException\r\n    severity = ERR]\r\n\r\n    DevError[\r\n\tdesc = Timeout (3000 mS) exceeded on device expchan/tangoattributectctrl/33\r\n      origin = DeviceProxy:read_attribute\r\n      reason = API_DeviceTimedOut\r\n    severity = ERR]\r\n    ]\r\n\r\nBest regards,\r\nJan \r\n"},"comment":{"url":"https://api.github.com/repos/sardana-org/sardana/issues/comments/348928698","html_url":"https://github.com/sardana-org/sardana/issues/662#issuecomment-348928698","issue_url":"https://api.github.com/repos/sardana-org/sardana/issues/662","id":348928698,"user":{"login":"reszelaz","id":6735649,"avatar_url":"https://avatars1.githubusercontent.com/u/6735649?v=4","gravatar_id":"","url":"https://api.github.com/users/reszelaz","html_url":"https://github.com/reszelaz","followers_url":"https://api.github.com/users/reszelaz/followers","following_url":"https://api.github.com/users/reszelaz/following{/other_user}","gists_url":"https://api.github.com/users/reszelaz/gists{/gist_id}","starred_url":"https://api.github.com/users/reszelaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reszelaz/subscriptions","organizations_url":"https://api.github.com/users/reszelaz/orgs","repos_url":"https://api.github.com/users/reszelaz/repos","events_url":"https://api.github.com/users/reszelaz/events{/privacy}","received_events_url":"https://api.github.com/users/reszelaz/received_events","type":"User","site_admin":false},"created_at":"2017-12-04T10:58:24Z","updated_at":"2017-12-04T10:58:24Z","author_association":"COLLABORATOR","body":"I suspect the following things:\r\n\r\nDo your experimental channels belong to the same controller? If yes, there is a shared resource that need to be protected - their common controller. The `get_state` method in this occasion will lock the element and its controller in order to perform safely the state readout sequence. So if you read all of them at the same time, at the end they are serialized. However in case of the `TangoAttrCTController` the state sequence execution should be very quick - the controller just returns ON. How long does it take to call `get_state` in your case? And how long does it take to call `get_value`? - this method is the one that will call the read sequence.\r\n"}}
{"actor":{"display_login":"reszelaz"}}