-
Notifications
You must be signed in to change notification settings - Fork 255
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
Data loss when using compression (ros2 bag record) #978
Comments
For context, the threading logic all happens in a C++ layer - the Python CLI is only a thin wrapper around calling the C++ core. You mention you're building from source, are you using the |
> For context, the threading logic all happens in a C++ layer - the Python CLI is only a thin wrapper around calling the C++ core. Thank you for clarification about Python CLI wrapping C++ logic. I did not know how this worked. > You mention you're building from source, are you using the Actually I am not quite sure which branch. My work is greatly based on the ros.foxy.Dockerfile from dusty-nv/jetson-containers which uses Update: So I am in fact using the foxy branch. Tried building the foxy-future branch but rosinstall_generator does only allow the base branch names (foxy, galactic, ...). |
This is a very concerning bug - data loss is a worst case scenario for a data recording tool. Has anyone tried to repro/investigate it in galactic/humble/rolling? |
I haven't investigated it myself, but looking at the Dockerfile in use, the original reporter is likely using the |
Good point. @chrmel have you tested this in Galactic? |
@amacneil I tried building from source with branch galactic but it did not succeed. I can try test it with the pre-built packages. |
@amacneil, @clalancette, @emersonknapp Ok, I tested my setup with the pre-built debian packages for distros foxy and galactic. Testing with sample dataEvery step in the data represents the time a new split bag file beeing created. foxyRecording data with Same issue as described when built from source. Everytime a new split bag file starts there is a data gap. Play bag with galactic and rollingRecording data with I was not able to reproduce the problem BECAUSE a different problem occurred. Play bag with |
Issue related to the playing only last bag from split was found before and described here #966 |
Notes:
|
Description
Recording big bags with
ros2 bag record --max-bag-size=2000000000 --compression-mode file --compression-format zstd
topics get lost during compression.Expected Behavior
When a new bag is opened and the old one gets compressed I would expect the new bag to contain all topics published (those published during time of compression as well).
Actual Behavior
During the compression of the just closed bag (due to max-bag-size) there are no topics recorded in the new bag.
To Reproduce
ros2 bag record --max-bag-size=2000000000 --compression-mode file --compression-format zstd
System
Additional Information
When recording bags without compression this issue does not occur.
Suspicion
Is it possible that the compression of the bag is run in a new thread and not a process? Because, as you probably know, in python a new thread cannot be distributed to a different CPU core only a process can. If recording and compressing are two threads running in the same process could it be that the compression thread blocks the recording thread by using all resources of this one CPU core?
Thank you!
Possibly related to #973
The text was updated successfully, but these errors were encountered: