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

storage_factory_test is leaking memory #23

Closed
Karsten1987 opened this issue Aug 21, 2018 · 2 comments
Closed

storage_factory_test is leaking memory #23

Karsten1987 opened this issue Aug 21, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@Karsten1987
Copy link
Collaborator

When running the tests with valgrind, we can see that there is quite some memory leaked. It increases with every library loaded.

Some of the memory not being freed is due to the rcutils_loggig_macros.
I believe the rest of it is due to Pluginlib or Poco.

@Karsten1987 Karsten1987 added the bug Something isn't working label Aug 21, 2018
@Martin-Idel-SI
Copy link
Contributor

Yes, there are leaks from the pluginlib.

Here is a minimal pluginlib example: https://github.com/bsinno/rosbag2/tree/pluginlib_leak_example
It exhibits the same error I can see when running the test through valgrind:

==11631== 152 bytes in 1 blocks are indirectly lost in loss record 6 of 8
==11631== at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11631== by 0x528F670: class_loader::impl::AbstractMetaObjectBase::AbstractMetaObjectBase(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (meta_object.cpp:56)
==11631== by 0x791766A: ???
==11631== by 0x79172FE: ???
==11631== by 0x791710A: ???
==11631== by 0x7916E49: ???
==11631== by 0x7916F33: ???
==11631== by 0x7916F49: ???
==11631== by 0x40106B9: call_init.part.0 (dl-init.c:72)
==11631== by 0x40107CA: call_init (dl-init.c:30)
==11631== by 0x40107CA: _dl_init (dl-init.c:120)
==11631== by 0x40158E1: dl_open_worker (dl-open.c:575)
==11631== by 0x4010563: _dl_catch_error (dl-error.c:187)
==11631==
==11631== 267 (16 direct, 251 indirect) bytes in 1 blocks are definitely lost in loss record 7 of 8
==11631== at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11631== by 0x79170F4: ???
==11631== by 0x7916E49: ???
==11631== by 0x7916F33: ???
==11631== by 0x7916F49: ???
==11631== by 0x40106B9: call_init.part.0 (dl-init.c:72)
==11631== by 0x40107CA: call_init (dl-init.c:30)
==11631== by 0x40107CA: _dl_init (dl-init.c:120)
==11631== by 0x40158E1: dl_open_worker (dl-open.c:575)
==11631== by 0x4010563: _dl_catch_error (dl-error.c:187)
==11631== by 0x4014DA8: _dl_open (dl-open.c:660)
==11631== by 0x6C78F08: dlopen_doit (dlopen.c:66)
==11631== by 0x4010563: _dl_catch_error (dl-error.c:187)

Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Aug 31, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
Martin-Idel-SI added a commit to bosch-io/rosbag2 that referenced this issue Sep 4, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi pushed a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
anhosi added a commit to bosch-io/rosbag2 that referenced this issue Sep 5, 2018
Karsten1987 pushed a commit that referenced this issue Sep 11, 2018
* GH-23 Get all topics from node and sanitize

* GH-23 Move methods to node for better interface

* GH-23 Use rmw_serialized_message_t consistently

* GH-23 Improve santization of topics

* GH-65 Introduce and use better logging macros

* GH-23 Use publisher to serialized message directly

* GH-23 Improve readability of sanitizing topics and types

* GH-23 Allow to write all available topics

* GH-23 Add test for record all

* GH-23 Cleanup: add missing const ref to record interface

* Cleanup for doxygen

* Improve topic sanitization

- correctly expand topic names using rcl
- do not check type correctness (supposed to be done internally)

* Pass topic_name by reference
@Karsten1987
Copy link
Collaborator Author

closing this as it's more related to poco and pluginlib than to rosbag2 as-is.

james-rms pushed a commit to james-rms/rosbag2 that referenced this issue Nov 17, 2022
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
james-rms pushed a commit to james-rms/rosbag2 that referenced this issue Nov 17, 2022
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: James Smith <james@foxglove.dev>
emersonknapp added a commit that referenced this issue May 14, 2024
…23)

Add `--append-files` option to `ros2 bag record`, and update `SequentialWriter` to allow adding files to an existing recording directory. Very useful for persistent "circular buffer" recording, especially in combination with `--max-bagfile-splits`

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
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