Comments (11)
Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).
- Edited issue description
from gz-sim.
Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).
- Edited issue description
from gz-sim.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
I can confirm that this is a problem.
from gz-sim.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
I don't see a memory leak when running just the server during log playback.
from gz-sim.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
- set assignee_account_id to "557058:65740f22-cc56-4418-9608-7e17d0ed47b7"
- set assignee to "carromj (Bitbucket: carromj, GitHub: mjcarroll)"
from gz-sim.
Original comment by Michael Carroll (Bitbucket: Michael Carroll, GitHub: mjcarroll).
I believe that I have tracked the leaks down to some of the move constructors and move assignment operators in sdformat
. At a minimum, I believe that Geometry
, Material
, Collision
, and Box
are impacted, but it may be that these result in the largest leaks.
Running an sdformat
unit test under valgrind
seems to agree in an isolated case:
(blueprint)➜ sdformat8 valgrind --tool=memcheck --leak-check=full ./src/UNIT_Material_TEST
==19839== Memcheck, a memory error detector
==19839== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==19839== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==19839== Command: ./src/UNIT_Material_TEST
==19839==
Running main() from gtest_main.cc
[==========] Running 8 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 7 tests from DOMMaterial
[ RUN ] DOMMaterial.Construction
[ OK ] DOMMaterial.Construction (10 ms)
[ RUN ] DOMMaterial.MoveConstructor
[ OK ] DOMMaterial.MoveConstructor (6 ms)
[ RUN ] DOMMaterial.CopyConstructor
[ OK ] DOMMaterial.CopyConstructor (5 ms)
[ RUN ] DOMMaterial.AssignmentOperator
[ OK ] DOMMaterial.AssignmentOperator (4 ms)
[ RUN ] DOMMaterial.MoveAssignmentOperator
[ OK ] DOMMaterial.MoveAssignmentOperator (5 ms)
[ RUN ] DOMMaterial.Set
[ OK ] DOMMaterial.Set (16 ms)
[ RUN ] DOMMaterial.InvalidSdf
[ OK ] DOMMaterial.InvalidSdf (6 ms)
[----------] 7 tests from DOMMaterial (56 ms total)
[----------] 1 test from DOMAtmosphere
[ RUN ] DOMAtmosphere.CopyAssignmentAfterMove
[ OK ] DOMAtmosphere.CopyAssignmentAfterMove (2 ms)
[----------] 1 test from DOMAtmosphere (3 ms total)
[----------] Global test environment tear-down
[==========] 8 tests from 2 test cases ran. (74 ms total)
[ PASSED ] 8 tests.
==19839==
==19839== HEAP SUMMARY:
==19839== in use at exit: 232 bytes in 1 blocks
==19839== total heap usage: 3,564 allocs, 3,563 frees, 3,916,665 bytes allocated
==19839==
==19839== 232 bytes in 1 blocks are definitely lost in loss record 1 of 1
==19839== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19839== by 0x4EC5EDA: sdf::v8::Material::Material() (Material.cc:66)
==19839== by 0x11D0FA: DOMMaterial_MoveAssignmentOperator_Test::TestBody() (Material_TEST.cc:143)
==19839== by 0x14D029: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2421)
==19839== by 0x14D029: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2457)
==19839== by 0x142E29: Run (gtest.cc:2495)
==19839== by 0x142E29: testing::Test::Run() (gtest.cc:2486)
==19839== by 0x142F77: Run (gtest.cc:2671)
==19839== by 0x142F77: testing::TestInfo::Run() (gtest.cc:2645)
==19839== by 0x143054: Run (gtest.cc:2789)
==19839== by 0x143054: testing::TestCase::Run() (gtest.cc:2774)
==19839== by 0x14357B: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:5051)
==19839== by 0x14D539: HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (gtest.cc:2421)
==19839== by 0x14D539: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2457)
==19839== by 0x1436AB: testing::UnitTest::Run() (gtest.cc:4667)
==19839== by 0x1194A8: RUN_ALL_TESTS (gtest.h:2329)
==19839== by 0x1194A8: main (gtest_main.cc:37)
==19839==
==19839== LEAK SUMMARY:
==19839== definitely lost: 232 bytes in 1 blocks
==19839== indirectly lost: 0 bytes in 0 blocks
==19839== possibly lost: 0 bytes in 0 blocks
==19839== still reachable: 0 bytes in 0 blocks
==19839== suppressed: 0 bytes in 0 blocks
==19839==
==19839== For counts of detected and suppressed errors, rerun with: -v
==19839== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
from gz-sim.
Original comment by Michael Carroll (Bitbucket: Michael Carroll, GitHub: mjcarroll).
Fixing the ones mentioned above changes the heap allocation profile.
There is still some growth, which could mean we have other sdformat
classes that have the same issue, I’m going to audit the rest of the tests under valgrind and see what turns up.
from gz-sim.
Original comment by Michael Carroll (Bitbucket: Michael Carroll, GitHub: mjcarroll).
https://bitbucket.org/osrf/sdformat/pull-requests/641/fix-move-assignment-constructor-leaks
from gz-sim.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
This issue is almost resolved. I believe @mjcarroll has one more leak based on this comment.
from gz-sim.
Original comment by Michael Carroll (Bitbucket: Michael Carroll, GitHub: mjcarroll).
This was the follow-up, all should be addressed now: https://bitbucket.org/osrf/sdformat/pull-requests/644
from gz-sim.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
- changed state from "new" to "resolved"
from gz-sim.
Related Issues (20)
- Boundingbox on Link API HOT 1
- Crash on opening world with Plasma Wayland session HOT 1
- Inconsistency between custom sensor system example and internal sensor systems
- Make child model and link configurable in DetachableJoint System
- ../src/intel/isl/isl.c:2105: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available. HOT 3
- Gazebo Fortress - Loading Models Problem with Ogre2.2 HOT 11
- Wrong URI for Worlds in StartupGUI HOT 3
- RFC: Sensor Systems: Vulnerability testing, advanced noise models, raw sensor data callbacks, decoupling transport HOT 2
- Cannot Read Actors World Positions from the gz Topics
- :farmer: Integation NetworkHandshake and ServerBroadcasterTest failing consistently in gz-sim-main HOT 2
- DiffDrive publish_odom_tf parameter HOT 2
- gz sim specific.sdf - run random world if present more than 1 HOT 4
- Calling service for getting Actor poses HOT 5
- [Proposal] Drive to point/configuration controller plugin for wheeled vehicles HOT 2
- Docs: Add tutorial on how to start/pause simulator from CLI HOT 3
- :farmer: sim6 windows CI: 13 warnings
- Use wheel normal force from joints instead of static parameter in WheelSlip plugin HOT 1
- Binary installation on Ubuntu 24.04 doesn't seem to work HOT 5
- Write measured sensor values to ECM for deterministic closed-loop control HOT 2
- Run `gz sim` on Windows HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gz-sim.