-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
libusb seg faults when using realsense devices concurrently on Ubuntu 20 #12280
Comments
Hi @danielkoohmarey-bc Which JetPack version are you using, please? JetPack 4 is for Ubuntu 18.04, whilst JetPack 5 is the first to be compatible with Ubuntu 20.04. The librealsense SDK officially supports JetPack 5.0.2 from SDK version 2.54.1 onwards. Which librealsense SDK version are you currently using? In regard to multiple cameras, you can either use ctx.query_devices to automatically build a list of all attached cameras and their serial numbers (as rs-multicam does), or instead manually define each individual camera and its serial number. If the same cameras will not always be attached to the computer then automatically building a device list with ctx will be the best approach. Usually there will only be one rs2::context. You can though create multiple pipelines and assign a different camera to each. The rs-multicam example creates multiple pipelines automatically, one for each attached device. |
Hello Marty, thanks for following up. We are using JetPack version 5.1.2. Can you clarify how I can identify the SDK version? I see 8d31b4f
on the branch we are using, does this mean we need to upgrade from 2.41 to 2.54.1+? |
Yes, ideally you should upgrade to 2.54.1 or newer to use JetPack 5 and Ubuntu 20.04. If you build librealsense again from packages then it should automatically be the latest version (currently 2.54.2). If your build librealsense from source code then you can select the version that you want to use from the Releases page, and download the source code as a zipped folder from the Assets list at the bottom of each version's information listing. |
Hi @danielkoohmarey-bc Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
Issue Description
We recently migrated from Ubuntu 18 to Ubuntu 20, and are seeing some seg faults using this branch of librealsense: https://github.com/IntelRealSense/librealsense/tree/4f37f2ef0874c1716bce223b20e46d00532ffb04
We are accessing 2 realsense cameras concurrently in C++ in two separate threads. Each thread has its own
rs2::context
object. When the threads access frames concurrently, we receive a seg fault:Additional separate backtrace, with libusb logs:
We note we didn't observe this behavior on Ubuntu 18. Is this a known issue? Would upgrading librealsense versions mitigate this?
I also note in looking at the reference multicam example, I see a single
rs2::context
used to access data from multiple devices. Is this the recommended approach for data access from multiple realsense? Are there any known issues/limitation to instantiating multiplers2::context
within the same process and running them in a thread?We fetch frames by registering a callback with the
rs2::sensor
:Any insight into improper usage resulting in the seg fault or how to avoid is appreciated, thanks!
The text was updated successfully, but these errors were encountered: