Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foonathan memory leak reported #1288

Open
dirk-thomas opened this issue Sep 3, 2020 · 1 comment
Open

foonathan memory leak reported #1288

dirk-thomas opened this issue Sep 3, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dirk-thomas
Copy link
Member

When running the the rclcpp tests (e.g. https://ci.ros2.org/view/All/job/test_ci_linux/46/foonathan-memory-leaks/).

See ros2/ci#509 (comment)

@sloretz
Copy link
Contributor

sloretz commented Sep 18, 2020

foonathan::memory leaks in https://ci.ros2.org/view/All/job/test_ci_linux/46

rclcpp: test_create_subscription
      Start 13: test_create_subscription

13: Test command: /home/jenkins-agent/workspace/test_ci_linux/venv/bin/python3 "-u" "/home/jenkins-agent/workspace/test_ci_linux/ws/install/ament_cmake_test/share/ament_cmake_test/cmake/run_test.py" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_create_subscription.gtest.xml" "--package-name" "rclcpp" "--output-file" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/ament_cmake_gtest/test_create_subscription.txt" "--command" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_create_subscription" "--gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_create_subscription.gtest.xml"
13: Test timeout computed to be: 60
13: -- run_test.py: invoking following command in '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test':
13:  - /home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_create_subscription --gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_create_subscription.gtest.xml
13: Running main() from /home/jenkins-agent/workspace/test_ci_linux/ws/install/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
13: [==========] Running 2 tests from 1 test case.
13: [----------] Global test environment set-up.
13: [----------] 2 tests from TestCreateSubscription
13: [ RUN      ] TestCreateSubscription.create
13: [       OK ] TestCreateSubscription.create (40 ms)
13: [ RUN      ] TestCreateSubscription.create_with_statistics
13: [       OK ] TestCreateSubscription.create_with_statistics (14 ms)
13: [----------] 2 tests from TestCreateSubscription (54 ms total)
13: 
13: [----------] Global test environment tear-down
13: [==========] 2 tests from 1 test case ran. (54 ms total)
13: [  PASSED  ] 2 tests.
13: [foonathan::memory] Allocator foonathan::memory::new_allocator (at (nil)) leaked 336 bytes.
13: [foonathan::memory] Allocator foonathan::memory::heap_allocator (at (nil)) leaked 20216 bytes.
13: -- run_test.py: return code 0
13: -- run_test.py: inject classname prefix into gtest result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_create_subscription.gtest.xml'
13: -- run_test.py: verify result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_create_subscription.gtest.xml'
13/69 Test #13: test_create_subscription ....................   Passed    0.16 sec
rclcpp: test_executors
      Start 61: test_executors

61: Test command: /home/jenkins-agent/workspace/test_ci_linux/venv/bin/python3 "-u" "/home/jenkins-agent/workspace/test_ci_linux/ws/install/ament_cmake_test/share/ament_cmake_test/cmake/run_test.py" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_executors.gtest.xml" "--package-name" "rclcpp" "--output-file" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/ament_cmake_gtest/test_executors.txt" "--append-env" "LD_LIBRARY_PATH=/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test" "--command" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_executors" "--gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_executors.gtest.xml"
61: Test timeout computed to be: 180
61: -- run_test.py: extra environment variables to append:
61:  - LD_LIBRARY_PATH+=/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test
61: -- run_test.py: invoking following command in '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test':
61:  - /home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_executors --gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_executors.gtest.xml
61: Running main() from /home/jenkins-agent/workspace/test_ci_linux/ws/install/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
61: [==========] Running 33 tests from 5 test cases.
61: [----------] Global test environment set-up.
61: [----------] 9 tests from TestExecutors/SingleThreadedExecutor, where TypeParam = rclcpp::executors::SingleThreadedExecutor
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.detachOnDestruction
61: [       OK ] TestExecutors/SingleThreadedExecutor.detachOnDestruction (38 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.addNodeTwoExecutors
61: [       OK ] TestExecutors/SingleThreadedExecutor.addNodeTwoExecutors (14 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.spinWithTimer
61: [       OK ] TestExecutors/SingleThreadedExecutor.spinWithTimer (16 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.spinWhileAlreadySpinning
61: [       OK ] TestExecutors/SingleThreadedExecutor.spinWhileAlreadySpinning (15 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureComplete
61: [       OK ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureComplete (13 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.testSpinUntilSharedFutureComplete
61: [       OK ] TestExecutors/SingleThreadedExecutor.testSpinUntilSharedFutureComplete (13 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureCompleteNoTimeout
61: [       OK ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureCompleteNoTimeout (16 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureCompleteWithTimeout
61: [       OK ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureCompleteWithTimeout (17 ms)
61: [ RUN      ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureCompleteInterrupted
61: [       OK ] TestExecutors/SingleThreadedExecutor.testSpinUntilFutureCompleteInterrupted (17 ms)
61: [----------] 9 tests from TestExecutors/SingleThreadedExecutor (159 ms total)
61: 
61: [----------] 9 tests from TestExecutors/MultiThreadedExecutor, where TypeParam = rclcpp::executors::MultiThreadedExecutor
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.detachOnDestruction
61: [       OK ] TestExecutors/MultiThreadedExecutor.detachOnDestruction (14 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.addNodeTwoExecutors
61: [       OK ] TestExecutors/MultiThreadedExecutor.addNodeTwoExecutors (14 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.spinWithTimer
61: [       OK ] TestExecutors/MultiThreadedExecutor.spinWithTimer (17 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.spinWhileAlreadySpinning
61: [       OK ] TestExecutors/MultiThreadedExecutor.spinWhileAlreadySpinning (15 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureComplete
61: [       OK ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureComplete (14 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.testSpinUntilSharedFutureComplete
61: [       OK ] TestExecutors/MultiThreadedExecutor.testSpinUntilSharedFutureComplete (14 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureCompleteNoTimeout
61: [       OK ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureCompleteNoTimeout (16 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureCompleteWithTimeout
61: [       OK ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureCompleteWithTimeout (15 ms)
61: [ RUN      ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureCompleteInterrupted
61: [       OK ] TestExecutors/MultiThreadedExecutor.testSpinUntilFutureCompleteInterrupted (15 ms)
61: [----------] 9 tests from TestExecutors/MultiThreadedExecutor (134 ms total)
61: 
61: [----------] 9 tests from TestExecutors/StaticSingleThreadedExecutor, where TypeParam = rclcpp::executors::StaticSingleThreadedExecutor
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.detachOnDestruction
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.detachOnDestruction (12 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.addNodeTwoExecutors
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.addNodeTwoExecutors (12 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.spinWithTimer
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.spinWithTimer (10 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.spinWhileAlreadySpinning
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.spinWhileAlreadySpinning (9 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureComplete
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureComplete (11 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilSharedFutureComplete
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilSharedFutureComplete (10 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureCompleteNoTimeout
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureCompleteNoTimeout (10 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureCompleteWithTimeout
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureCompleteWithTimeout (11 ms)
61: [ RUN      ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureCompleteInterrupted
61: [       OK ] TestExecutors/StaticSingleThreadedExecutor.testSpinUntilFutureCompleteInterrupted (12 ms)
61: [----------] 9 tests from TestExecutors/StaticSingleThreadedExecutor (97 ms total)
61: 
61: [----------] 3 tests from TestExecutorsStable/SingleThreadedExecutor, where TypeParam = rclcpp::executors::SingleThreadedExecutor
61: [ RUN      ] TestExecutorsStable/SingleThreadedExecutor.addTemporaryNode
61: [       OK ] TestExecutorsStable/SingleThreadedExecutor.addTemporaryNode (91 ms)
61: [ RUN      ] TestExecutorsStable/SingleThreadedExecutor.spinAll
61: [       OK ] TestExecutorsStable/SingleThreadedExecutor.spinAll (22 ms)
61: [ RUN      ] TestExecutorsStable/SingleThreadedExecutor.spinSome
61: [       OK ] TestExecutorsStable/SingleThreadedExecutor.spinSome (22 ms)
61: [----------] 3 tests from TestExecutorsStable/SingleThreadedExecutor (136 ms total)
61: 
61: [----------] 3 tests from TestExecutorsStable/MultiThreadedExecutor, where TypeParam = rclcpp::executors::MultiThreadedExecutor
61: [ RUN      ] TestExecutorsStable/MultiThreadedExecutor.addTemporaryNode
61: [       OK ] TestExecutorsStable/MultiThreadedExecutor.addTemporaryNode (90 ms)
61: [ RUN      ] TestExecutorsStable/MultiThreadedExecutor.spinAll
61: [       OK ] TestExecutorsStable/MultiThreadedExecutor.spinAll (28 ms)
61: [ RUN      ] TestExecutorsStable/MultiThreadedExecutor.spinSome
61: [       OK ] TestExecutorsStable/MultiThreadedExecutor.spinSome (24 ms)
61: [----------] 3 tests from TestExecutorsStable/MultiThreadedExecutor (142 ms total)
61: 
61: [----------] Global test environment tear-down
61: [==========] 33 tests from 5 test cases ran. (682 ms total)
61: [  PASSED  ] 33 tests.
61: [foonathan::memory] Allocator foonathan::memory::new_allocator (at (nil)) leaked 1344 bytes.
61: [foonathan::memory] Allocator foonathan::memory::heap_allocator (at (nil)) leaked 226040 bytes.
61: -- run_test.py: return code 0
61: -- run_test.py: inject classname prefix into gtest result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_executors.gtest.xml'
61: -- run_test.py: verify result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_executors.gtest.xml'
61/69 Test #61: test_executors ..............................   Passed    0.79 sec
rclcpp: test_subscription_topic_statistics
      Start 67: test_subscription_topic_statistics

67: Test command: /home/jenkins-agent/workspace/test_ci_linux/venv/bin/python3 "-u" "/home/jenkins-agent/workspace/test_ci_linux/ws/install/ament_cmake_test/share/ament_cmake_test/cmake/run_test.py" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_topic_statistics.gtest.xml" "--package-name" "rclcpp" "--output-file" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/ament_cmake_gtest/test_subscription_topic_statistics.txt" "--append-env" "LD_LIBRARY_PATH=/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test" "--command" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_subscription_topic_statistics" "--gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_topic_statistics.gtest.xml"
67: Test timeout computed to be: 60
67: -- run_test.py: extra environment variables to append:
67:  - LD_LIBRARY_PATH+=/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test
67: -- run_test.py: invoking following command in '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test':
67:  - /home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_subscription_topic_statistics --gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_topic_statistics.gtest.xml
67: Running main() from /home/jenkins-agent/workspace/test_ci_linux/ws/install/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
67: [==========] Running 4 tests from 2 test cases.
67: [----------] Global test environment set-up.
67: [----------] 1 test from TestSubscriptionTopicStatistics
67: [ RUN      ] TestSubscriptionTopicStatistics.test_invalid_publish_period
67: [       OK ] TestSubscriptionTopicStatistics.test_invalid_publish_period (46 ms)
67: [----------] 1 test from TestSubscriptionTopicStatistics (46 ms total)
67: 
67: [----------] 3 tests from TestSubscriptionTopicStatisticsFixture
67: [ RUN      ] TestSubscriptionTopicStatisticsFixture.test_manual_construction
67: [       OK ] TestSubscriptionTopicStatisticsFixture.test_manual_construction (15 ms)
67: [ RUN      ] TestSubscriptionTopicStatisticsFixture.test_receive_stats_for_message_no_header
67: [       OK ] TestSubscriptionTopicStatisticsFixture.test_receive_stats_for_message_no_header (4048 ms)
67: [ RUN      ] TestSubscriptionTopicStatisticsFixture.test_receive_stats_for_message_with_header
67: [       OK ] TestSubscriptionTopicStatisticsFixture.test_receive_stats_for_message_with_header (4059 ms)
67: [----------] 3 tests from TestSubscriptionTopicStatisticsFixture (8122 ms total)
67: 
67: [----------] Global test environment tear-down
67: [==========] 4 tests from 2 test cases ran. (8168 ms total)
67: [  PASSED  ] 4 tests.
67: [foonathan::memory] Allocator foonathan::memory::new_allocator (at (nil)) leaked 4896 bytes.
67: [foonathan::memory] Allocator foonathan::memory::heap_allocator (at (nil)) leaked 191672 bytes.
67: -- run_test.py: return code 0
67: -- run_test.py: inject classname prefix into gtest result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_topic_statistics.gtest.xml'
67: -- run_test.py: verify result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_topic_statistics.gtest.xml'
67/69 Test #67: test_subscription_topic_statistics ..........   Passed    8.28 sec
rclcpp: test_subscription_options
      Start 68: test_subscription_options

68: Test command: /home/jenkins-agent/workspace/test_ci_linux/venv/bin/python3 "-u" "/home/jenkins-agent/workspace/test_ci_linux/ws/install/ament_cmake_test/share/ament_cmake_test/cmake/run_test.py" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_options.gtest.xml" "--package-name" "rclcpp" "--output-file" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/ament_cmake_gtest/test_subscription_options.txt" "--command" "/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_subscription_options" "--gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_options.gtest.xml"
68: Test timeout computed to be: 60
68: -- run_test.py: invoking following command in '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test':
68:  - /home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test/test_subscription_options --gtest_output=xml:/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_options.gtest.xml
68: Running main() from /home/jenkins-agent/workspace/test_ci_linux/ws/install/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
68: [==========] Running 2 tests from 1 test case.
68: [----------] Global test environment set-up.
68: [----------] 2 tests from TestSubscriptionOptions
68: [ RUN      ] TestSubscriptionOptions.topic_statistics_options_default_and_set
68: [       OK ] TestSubscriptionOptions.topic_statistics_options_default_and_set (0 ms)
68: [ RUN      ] TestSubscriptionOptions.topic_statistics_options_node_default_mode
68: [WARN] [1598639585.743128834] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
68: [       OK ] TestSubscriptionOptions.topic_statistics_options_node_default_mode (40 ms)
68: [----------] 2 tests from TestSubscriptionOptions (41 ms total)
68: 
68: [----------] Global test environment tear-down
68: [==========] 2 tests from 1 test case ran. (53 ms total)
68: [  PASSED  ] 2 tests.
68: [foonathan::memory] Allocator foonathan::memory::new_allocator (at (nil)) leaked 528 bytes.
68: [foonathan::memory] Allocator foonathan::memory::heap_allocator (at (nil)) leaked 22072 bytes.
68: -- run_test.py: return code 0
68: -- run_test.py: inject classname prefix into gtest result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_options.gtest.xml'
68: -- run_test.py: verify result file '/home/jenkins-agent/workspace/test_ci_linux/ws/build/rclcpp/test_results/rclcpp/test_subscription_options.gtest.xml'
68/69 Test #68: test_subscription_options ...................   Passed    0.15 sec
tf2_ros_py: (not sure which test)
Starting >>> tf2_ros_py
�[1m============================= test session starts ==============================�[0m
platform linux -- Python 3.8.2, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
cachedir: /home/jenkins-agent/workspace/test_ci_linux/ws/build/tf2_ros_py/.pytest_cache
rootdir: /home/jenkins-agent/workspace/test_ci_linux/ws/src/ros2/geometry2/tf2_ros_py, configfile: pytest.ini
plugins: colcon-core-0.6.0, cov-2.10.1, rerunfailures-9.1, repeat-0.8.0, mock-3.3.1
�[1mcollecting ... �[0m�[1m
collected 11 items                                                             �[0m

test/test_buffer.py �[32m.�[0m�[32m.�[0m�[32m.�[0m�[32m.�[0m�[32m.�[0m�[32m.�[0m�[32m                                               [ 54%]�[0m
test/test_buffer_client.py �[32m.�[0m�[32m.�[0m�[32m                                            [ 72%]�[0m
test/test_listener_and_broadcaster.py �[32m.�[0m�[32m.�[0m�[32m.�[0m�[32m                                [100%]�[0m

- generated xml file: /home/jenkins-agent/workspace/test_ci_linux/ws/build/tf2_ros_py/pytest.xml -
�[32m============================== �[32m�[1m11 passed�[0m�[32m in 0.43s�[0m�[32m ==============================�[0m
[foonathan::memory] Allocator foonathan::memory::new_allocator (at (nil)) leaked 456 bytes.
[foonathan::memory] Allocator foonathan::memory::heap_allocator (at (nil)) leaked 71560 bytes.
--- stderr: tf2_ros_py
[foonathan::memory] Allocator foonathan::memory::new_allocator (at (nil)) leaked 456 bytes.
[foonathan::memory] Allocator foonathan::memory::heap_allocator (at (nil)) leaked 71560 bytes.
---
Finished <<< tf2_ros_py [1.19s]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants