{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/rmw_opensplice/issues/99","repository_url":"https://api.github.com/repos/ros2/rmw_opensplice","labels_url":"https://api.github.com/repos/ros2/rmw_opensplice/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/ros2/rmw_opensplice/issues/99/comments","events_url":"https://api.github.com/repos/ros2/rmw_opensplice/issues/99/events","html_url":"https://github.com/ros2/rmw_opensplice/issues/99","id":120232326,"number":99,"title":"Handle Server runs out of handle space","user":{"login":"jacquelinekay","id":495933,"avatar_url":"https://avatars.githubusercontent.com/u/495933?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquelinekay","html_url":"https://github.com/jacquelinekay","followers_url":"https://api.github.com/users/jacquelinekay/followers","following_url":"https://api.github.com/users/jacquelinekay/following{/other_user}","gists_url":"https://api.github.com/users/jacquelinekay/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquelinekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquelinekay/subscriptions","organizations_url":"https://api.github.com/users/jacquelinekay/orgs","repos_url":"https://api.github.com/users/jacquelinekay/repos","events_url":"https://api.github.com/users/jacquelinekay/events{/privacy}","received_events_url":"https://api.github.com/users/jacquelinekay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-12-03T17:58:11Z","updated_at":"2016-06-08T21:51:43Z","closed_at":null,"body":"Originally discovered while testing ros2/rclcpp#165\r\n\r\nThe easiest way to reproduce this is to choose any gtest that exercises the client library using `rmw_opensplice_cpp` with the command line argument `--gtest_repeat=-1`, which will repeat the test indefinitely.\r\n\r\nFor example: `./gtest_executor__rmw_opensplice_cpp --gtest_repeat=-1`\r\n\r\nAfter over 100 to several hundred repeated iterations (depending on the machine), the process will exit with the following error:\r\n\r\n```\r\n========================================================================================\r\nReport      : ERROR\r\nDate        : Thu Dec 03 09:53:20 PST 2015\r\nDescription : The Handle Server ran out of handle space\r\nNode        : pol\r\nProcess     : gtest_executor__rmw_opensplice_cpp <24792>\r\nThread      : main thread 7fde172d1780\r\nInternals   : V6.4.140407OSS///kernel::v_handle::v_handleServerRegister/v_handle.c/235/0/1449165200.978805977\r\n```\r\n\r\nTo me, this suggests that we need to improve our teardown of middleware handles within rmw.\r\n\r\n(I am investigating if there is a similar problem in Connext now.)"},"comment":{"url":"https://api.github.com/repos/ros2/rmw_opensplice/issues/comments/224740715","html_url":"https://github.com/ros2/rmw_opensplice/issues/99#issuecomment-224740715","issue_url":"https://api.github.com/repos/ros2/rmw_opensplice/issues/99","id":224740715,"user":{"login":"gerkey","id":1188842,"avatar_url":"https://avatars.githubusercontent.com/u/1188842?v=3","gravatar_id":"","url":"https://api.github.com/users/gerkey","html_url":"https://github.com/gerkey","followers_url":"https://api.github.com/users/gerkey/followers","following_url":"https://api.github.com/users/gerkey/following{/other_user}","gists_url":"https://api.github.com/users/gerkey/gists{/gist_id}","starred_url":"https://api.github.com/users/gerkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerkey/subscriptions","organizations_url":"https://api.github.com/users/gerkey/orgs","repos_url":"https://api.github.com/users/gerkey/repos","events_url":"https://api.github.com/users/gerkey/events{/privacy}","received_events_url":"https://api.github.com/users/gerkey/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T21:51:43Z","updated_at":"2016-06-08T21:51:43Z","body":"Some progress to report. My test setup is:\r\n\r\n* `rclcpp` on branch `opensplice_cleanup` (to give each waitset its own signal guard condition, which fixes a crash that's unrelated to the thread leakage, but is required to be able to run repeated tests)\r\n* `system_tests` on branch `opensplice_cleanup` (to comment out some test cases to allow repeating just the simplest one)\r\n* `rmw_opensplice` on branch `opensplice_cleanup` (to comment out the use of the builtin subscriber during node creation)\r\n\r\nWith all of those changes, I can execute the simplified test repeatedly (`../../../../build/test_rclcpp/gtest_executor__rmw_opensplice_cpp --gtest_repeat=-1`) with no increase in per-test execution time (constant at ~3ms) and no other apparent increase in system resources. That's the first time that I've been able to repeatedly run an opensplice-based test without growth in resource use.\r\n\r\nFrom this result, I am inclined to believe that the problem is with our management of the `builtin_subscriber` and related entities. We work with them here during node creation:\r\n\r\nhttps://github.com/ros2/rmw_opensplice/blob/master/rmw_opensplice_cpp/src/rmw_node.cpp#L131-L179\r\n\r\nI'm not sure, but I think that we're not correctly doing the symmetric operation during node destruction:\r\n\r\nhttps://github.com/ros2/rmw_opensplice/blob/master/rmw_opensplice_cpp/src/rmw_node.cpp#L281-L311\r\n\r\nand that, as a result, the underlying participant is never actually being deleted.\r\n\r\nIf @wjwwood or somebody else who's familiar with this creation and destruction logic wants to take a look, please do. I'm done for today; I'll try to come back to it tomorrow afternoon."}}
{"actor":{"display_login":"gerkey"}}