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

Freezing/crushing Linux-OS #10159

Closed
hichamhendy opened this issue Jan 17, 2022 · 31 comments
Closed

Freezing/crushing Linux-OS #10159

hichamhendy opened this issue Jan 17, 2022 · 31 comments
Labels

Comments

@hichamhendy
Copy link

hichamhendy commented Jan 17, 2022


Required Info
Camera Model L515
Firmware Version 01.05.08.01
Operating System & Version Linux (Ubuntu 18.04)
Kernel Version (Linux Only) Linux 5.4.0-92-generic
Platform Laptop XMG
SDK Version 2.0
Language {C++ }
Segment ROS

Issue Description

I am facing troubles with L515 while I launch its Launch-file. I tried to use the standards configuration. But I kept getting it always.

Furthermore, it crushes/freezes the my laptop at some random point of data transimssion.

Here are some Info

SUMMARY

PARAMETERS

  • /camera/realsense2_camera/accel_fps: -1
  • /camera/realsense2_camera/accel_frame_id: camera_accel_frame
  • /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
  • /camera/realsense2_camera/align_depth: True
  • /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
  • /camera/realsense2_camera/allow_no_texture_points: False
  • /camera/realsense2_camera/base_frame_id: camera_link
  • /camera/realsense2_camera/calib_odom_file:
  • /camera/realsense2_camera/clip_distance: -2.0
  • /camera/realsense2_camera/color_fps: 30
  • /camera/realsense2_camera/color_frame_id: camera_color_frame
  • /camera/realsense2_camera/color_height: 720
  • /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
  • /camera/realsense2_camera/color_width: 1280
  • /camera/realsense2_camera/confidence_fps: 30
  • /camera/realsense2_camera/confidence_height: -1
  • /camera/realsense2_camera/confidence_width: -1
  • /camera/realsense2_camera/depth_fps: 30
  • /camera/realsense2_camera/depth_frame_id: camera_depth_frame
  • /camera/realsense2_camera/depth_height: 480
  • /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
  • /camera/realsense2_camera/depth_width: 640
  • /camera/realsense2_camera/device_type: l515
  • /camera/realsense2_camera/enable_accel: True
  • /camera/realsense2_camera/enable_color: True
  • /camera/realsense2_camera/enable_confidence: False
  • /camera/realsense2_camera/enable_depth: True
  • /camera/realsense2_camera/enable_fisheye1: False
  • /camera/realsense2_camera/enable_fisheye2: False
  • /camera/realsense2_camera/enable_fisheye: False
  • /camera/realsense2_camera/enable_gyro: True
  • /camera/realsense2_camera/enable_infra1: False
  • /camera/realsense2_camera/enable_infra2: False
  • /camera/realsense2_camera/enable_infra: False
  • /camera/realsense2_camera/enable_pointcloud: True
  • /camera/realsense2_camera/enable_pose: False
  • /camera/realsense2_camera/enable_sync: True
  • /camera/realsense2_camera/filters: pointcloud
  • /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
  • /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
  • /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
  • /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
  • /camera/realsense2_camera/fisheye_fps: -1
  • /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
  • /camera/realsense2_camera/fisheye_height: -1
  • /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
  • /camera/realsense2_camera/fisheye_width: -1
  • /camera/realsense2_camera/gyro_fps: -1
  • /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
  • /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
  • /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
  • /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
  • /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
  • /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
  • /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
  • /camera/realsense2_camera/infra_fps: 30
  • /camera/realsense2_camera/infra_height: 480
  • /camera/realsense2_camera/infra_rgb: True
  • /camera/realsense2_camera/infra_width: 640
  • /camera/realsense2_camera/initial_reset: True
  • /camera/realsense2_camera/json_file_path:
  • /camera/realsense2_camera/linear_accel_cov: 0.01
  • /camera/realsense2_camera/odom_frame_id: camera_odom_frame
  • /camera/realsense2_camera/ordered_pc: True
  • /camera/realsense2_camera/pointcloud_texture_index: 0
  • /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
  • /camera/realsense2_camera/pose_frame_id: camera_pose_frame
  • /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
  • /camera/realsense2_camera/publish_odom_tf: True
  • /camera/realsense2_camera/publish_tf: True
  • /camera/realsense2_camera/reconnect_timeout: 6.0
  • /camera/realsense2_camera/rosbag_filename:
  • /camera/realsense2_camera/serial_no:
  • /camera/realsense2_camera/stereo_module/exposure/1: 7500
  • /camera/realsense2_camera/stereo_module/exposure/2: 1
  • /camera/realsense2_camera/stereo_module/gain/1: 16
  • /camera/realsense2_camera/stereo_module/gain/2: 16
  • /camera/realsense2_camera/tf_publish_rate: 20.0
  • /camera/realsense2_camera/topic_odom_in: odom_l515
  • /camera/realsense2_camera/unite_imu_method: linear_interpolation
  • /camera/realsense2_camera/usb_port_id:
  • /camera/realsense2_camera/wait_for_device_timeout: -1.0
  • /rosdistro: melodic
  • /rosversion: 1.14.12

NODES
/camera/
realsense2_camera (nodelet/nodelet)
realsense2_camera_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [3138]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to d35e61d4-77a5-11ec-a2b7-709cd1531f15
process[rosout-1]: started with pid [3168]
started core service [/rosout]
process[camera/realsense2_camera_manager-2]: started with pid [3175]
process[camera/realsense2_camera-3]: started with pid [3176]
[ INFO] [1642431465.402929222]: Initializing nodelet with 20 worker threads.
[ INFO] [1642431465.557676337]: RealSense ROS v2.3.2
[ INFO] [1642431465.557700902]: Built with LibRealSense v2.50.0
[ INFO] [1642431465.557711531]: Running with LibRealSense v2.50.0
[ INFO] [1642431465.581580647]:
17/01 15:57:45,868 WARNING [140592753608448] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Success, number: 0
17/01 15:57:46,037 WARNING [140592753608448] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Success, number: 0
17/01 15:57:46,091 WARNING [140592753608448] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Success, number: 0
17/01 15:57:46,143 WARNING [140592753608448] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Success, number: 0
[ INFO] [1642431466.218002596]: Device with serial number f1272491 was found.

[ INFO] [1642431466.218030373]: Device with physical ID 2-4-2 was found.
[ INFO] [1642431466.218037753]: Device with name Intel RealSense L515 was found.
[ INFO] [1642431466.218332449]: Device with port number 2-4 was found.
[ INFO] [1642431466.218357349]: Device USB type: 3.2
[ INFO] [1642431466.218371192]: Resetting device...
[ INFO] [1642431472.316309714]:
17/01 15:57:52,608 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Success, number: 0
17/01 15:57:52,756 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:52,810 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:52,864 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
[ INFO] [1642431472.944054836]: Device with serial number f1272491 was found.

[ INFO] [1642431472.944090778]: Device with physical ID 2-4-3 was found.
[ INFO] [1642431472.944102424]: Device with name Intel RealSense L515 was found.
[ INFO] [1642431472.944328451]: Device with port number 2-4 was found.
[ INFO] [1642431472.944350187]: Device USB type: 3.2
[ INFO] [1642431472.945635233]: getParameters...
[ INFO] [1642431472.946228795]: Infrared RGB stream enabled
[ INFO] [1642431472.975791559]: setupDevice...
[ INFO] [1642431472.975808610]: JSON file is not provided
[ INFO] [1642431472.975816923]: ROS Node Namespace: camera
[ INFO] [1642431472.975825606]: Device Name: Intel RealSense L515
[ INFO] [1642431472.975835870]: Device Serial No: f1272491
[ INFO] [1642431472.975844987]: Device physical port: 2-4-3
[ INFO] [1642431472.975853810]: Device FW version: 01.05.08.01
[ INFO] [1642431472.975860653]: Device Product ID: 0x0B64
[ INFO] [1642431472.975869307]: Enable PointCloud: On
[ INFO] [1642431472.975879568]: Align Depth: On
[ INFO] [1642431472.975887259]: Sync Mode: On
[ INFO] [1642431472.975921724]: Device Sensors:
[ INFO] [1642431473.054717785]: L500 Depth Sensor was found.
[ INFO] [1642431473.061874791]: RGB Camera was found.
[ INFO] [1642431473.062017176]: Motion Module was found.
[ INFO] [1642431473.062282591]: Add Filter: pointcloud
[ INFO] [1642431473.062688887]: num_filters: 2
[ INFO] [1642431473.062707297]: Setting Dynamic reconfig parameters.
[ INFO] [1642431474.364551295]: Done Setting Dynamic reconfig parameters.
[ INFO] [1642431474.371581789]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16
[ INFO] [1642431474.372313548]: color stream is enabled - width: 1280, height: 720, fps: 30, Format: RGB8
[ INFO] [1642431474.372940371]: gyro stream is enabled - fps: 200
[ INFO] [1642431474.372962401]: accel stream is enabled - fps: 200
[ INFO] [1642431474.372982794]: setupPublishers...
[ INFO] [1642431474.375173558]: Expected frequency for depth = 30.00000
[ INFO] [1642431474.394132739]: Expected frequency for color = 30.00000
[ INFO] [1642431474.403370723]: Expected frequency for aligned_depth_to_color = 30.00000
[ INFO] [1642431474.412913384]: Start publisher IMU
[ INFO] [1642431474.413414860]: setupStreams...
17/01 15:57:54,719 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:54,769 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:54,820 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:54,872 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:54,927 WARNING [140592778786560] (ds5-motion.cpp:473) IMU Calibration is not available, default intrinsic and extrinsic will be used.
[ WARN] [1642431474.945089136]:
[ WARN] [1642431474.945223538]: frame's time domain is HARDWARE_CLOCK. Timestamps may reset periodically.
[ INFO] [1642431474.970517233]: SELECTED BASE:Depth, 0
17/01 15:57:54,970 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
[ WARN] [1642431475.021540778]: Publishing dynamic camera transforms (/tf) at 20 Hz
[ INFO] [1642431475.023347132]: RealSense Node Is Up!
17/01 15:57:55,630 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:55,771 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:57,023 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:58,274 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:57:59,526 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:58:00,777 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:58:02,029 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:58:03,280 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Success, number: 0
17/01 15:58:04,532 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
17/01 15:58:05,783 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
17/01 15:58:07,034 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
17/01 15:58:08,285 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
17/01 15:58:09,536 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
17/01 15:58:10,788 WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11

I suspect that this error is related to freezing/crashing the Laptop I reported before without success in solving

Crash report for insight

linux-image-5.4.0-94-generic.256950.txt

@hichamhendy
Copy link
Author

@ #8020

@MartyG-RealSense
Copy link
Collaborator

Hi @hichamhendy If the control_transfer returned warning is generating continuously in the log then this can indicate that there is a serious communication problem with the device.

Could you try adding the instruction initial_reset:=true to the end of your roslaunch instruction to see whether it improves stability by resetting the camera at launch, please? For example:

roslaunch realsense2_camera rs_camera.launch initial_reset:=true

@hichamhendy
Copy link
Author

Hey, I saw a similar suggestion and turned it on already in this trial, yet nothing changed

I did some trials to narrow down the possibilities of reproduction this unpleasant freeze and I can tell when exactly that happens, namely when you get to change any argument in the configuration in .launch file and relaunch it once again or launch then shutdown then rs-enumerate-devices then relaunch, otherwise It properly works.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 17, 2022

Are you closing down the rs-enumerate-devices program before performing the next launch in order to eliminate the possibility that the rs-enumerate-devices program is still holding onto a claim on the camera's access and so preventing a roslaunch from accessing it?

Under the multi-streaming-model rules of librealsense, once a program claims access to a particular stream such as depth then another program cannot access that particular stream on the same camera afterwards until the first program releases its lock on the stream (for example, by closing that program).

@hichamhendy
Copy link
Author

hichamhendy commented Jan 17, 2022

As I said, the rs-enumerate-devices program is one of two cases that sent me into freezing. However, I execute the command on a terminal and expect and that it gets automatically killed, after it shows the results!

What I if I shut down (ctl + c) the node, what is the going on in that case? However, reinitiating the node doesn't reproduce the freezing. Yet, changing any argument in the configurations leads to the freezing/crashing.

@MartyG-RealSense
Copy link
Collaborator

Rather than editing the launch file contents, have you tried setting the changes to parameters as a custom configuration in the roslaunch instruction instead so that the launch file does not need to be edited? For example, to configure both depth and color at 640x480 and 30 FPS:

roslaunch realsense2_camera rs_camera.launch depth_width:=640 depth_height:=480 depth_fps:=30 color_width:=640 color_height:=480 color_fps:=30

From ROS wrapper 2.2.22 onwards, a custom stream configuration must include three factors for each stream type used in order for the launch to consider it to be valid: width, height and FPS.

On the L515 model, firmware 1.5.8.1 is required for RGB to support 640x480 color, though you already have this firmware installed and so should be able to use this resolution.

@caoluming
Copy link

Mine is in a similar situation. Have you solved it

@hichamhendy
Copy link
Author

hichamhendy commented Jan 19, 2022

@MartyG-RealSense by the way I get the same error message by the way when I call realsense-viewer. So I wouldn't suggest that the problem is related to ROS.
I already set theses parameters in the launch file as attached

rs_camera (copy).txt

@caoluming I still get the error! and the freezing Problem !!! The freezing problem crashed yesterday the whole OS and I needed to reinstall a new Ubuntu 18.04. And I tried it now and it crashes the OS!!!

Till then, my main issue stays by messenger-libusb. It's a warning yet it's not understandable.

@hichamhendy
Copy link
Author

@MartyG-RealSense I attached a crash report maybe that can help
linux-image-5.4.0-94-generic.256950.txt

@MartyG-RealSense
Copy link
Collaborator

@hichamhendy I was just looking at your case when you updated. What method did you use to install the librealsense SDK, please (packages or build from source code).

If you built with source code, did you use the RSUSB backend installation method? If it is a kernel related issue as your new log suggests then building with the RSUSB method could help with stability, as it is not dependent on Linux versions or kernel versions and does not require patching.

@hichamhendy
Copy link
Author

hichamhendy commented Jan 19, 2022

I installed as indicated here from the readme

Install the libraries (see section below if upgrading packages):
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
The above two lines will deploy librealsense2 udev rules, build and activate kernel modules, runtime library and executable demos and tools.

https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md

By the way, I thought that the problem is due to kernal hence I switched the kernel and the problem still exits

@MartyG-RealSense
Copy link
Collaborator

A package build will still be making use of the kernel, so if there is still a kernel related conflict even after switching kernels then a package build will not correct that. Building from source with the RSUSB backend method is necessary if one wants to bypass the kernel and help to avoid such conflicts. Having said that, the 5.4 kernel that you were originally using at the start of this case is officially supported by librealsense, so it is strange that you would be having problems with it.

Reading the case again from the beginning, I note that align_depth is set to True. Do the control_transfer returned messages reduce if align_depth is False?

@hichamhendy
Copy link
Author

@MartyG-RealSense
Copy link
Collaborator

The instructions in the quoted link are for a non-RSUSB build that will require kernel patching. Instructions for an RSUSB source-code build that is independent of the kernel can be found at #9931 (comment)

@hichamhendy
Copy link
Author

hichamhendy commented Jan 20, 2022

I followed the instructions indicated here (#9931 (comment)) but nothing changed

By the way, I get the error on realsense viewer

image

@MartyG-RealSense
Copy link
Collaborator

The multiple udev rules message can appear if librealsense was built from both packages and source code on the same computer. Deleting the rule at etc/udev/rules.d should make the error disappear.

@hichamhendy
Copy link
Author

hichamhendy commented Jan 23, 2022

I tried the camera on different Laptop with same Ubuntu version and kernel, and it worked fine. I even tried it on Jetson Xavier Tegra and it went well, besides I had troubles with rtabmap but this is not the issue here. There was no freezing. I doubted that that might be a problem with ubuntu but as I said the frequent crushing leaded me to new installations of Ubuntu. Yet, I still suffer from the same issue. The only thing I can think of is the driver compatibility with hardware of my Laptop.

Could anyone from support tell my if XMG (https://bestware.com/de/xmg-pro-17.html) is not compatible with L515?!
I imagine the issue is somehow in the peripherals' compatibility with the built driver?
I would be grateful for help!

@hichamhendy hichamhendy changed the title WARNING [140592482850560] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 Freezing/crushing Linux-OS Jan 23, 2022
@MartyG-RealSense
Copy link
Collaborator

I cannot see anything in the XMG specification on the provided web-page that would obviously cause an Ubuntu freeze / crash. I would recommend running the RealSense SDK's rs-hello-realsense example program to see whether it is a graphics related problem, as rs-hello-realsense does not use graphics and has a text output. If Ubuntu still freezes when rs-hello-realsense is used then this would suggest that it is not a graphics related problem.

If the SDK examples were built when you installed librealsense on Ubuntu then a pre-built executable version of rs-hello-realsense should be at the folder location usr/local/bin

@hichamhendy
Copy link
Author

Regarding the first suggestion, I concluded that the issue is related to graphics because the rs-hello-realsense script doesn't reproduce the issue. Where is the relevance with the graphics here? haw can it be fixed?

All scripts are there:
image

@MartyG-RealSense
Copy link
Collaborator

The RealSense SDK makes use of OpenGL graphics. If there are problems when running graphical RealSense programs then updating the graphics drivers on your PC may help. This is because the drivers for popular-brand video chips such as Nvidia include OpenGL support.

@hichamhendy
Copy link
Author

I just figured out the OS freezed after while even though I've already plugged out the camera and stopped operating on it. I haven't noticed this behavior before. I think the USB-peripheral clams the process power that don't get released every time you finish the operation and maybe expands!

@hichamhendy
Copy link
Author

hichamhendy commented Jan 24, 2022

I just found out that the issue can be reproduced on another Labtop/tablet with Ubuntu 1804

Processor: Intel® Core™ i5-7300U CPU @ 2.60GHz × 4
Graphics: Intel® HD Graphics 620 (KBL GT2)

Details

Name Version
ubuntu: Description: Ubuntu 18.04.6 LTS
architecture: 64-bit
gcc: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
git: git version 2.17.1
cmake: cmake version 3.10.2 CMake suite maintained and supported by Kitware (kitware.com/cmake).
boost: Version: 1.65.1.0ubuntu1
eigen3: Version: 3.3.4-4

otherwise I installed everything the same way.

@MartyG-RealSense
Copy link
Collaborator

Does the crash still occur if you unplug the micro-sized end of the USB cable from the base of the L515, reverse the connector's orientation and plug it back into the camera, please (USB-C cables are two-way insertion at the micro-sized end).

@hichamhendy
Copy link
Author

No that doesn't free the freeze/lock

@MartyG-RealSense
Copy link
Collaborator

Does it freeze if you boot the computer without the camera plugged in and then launch the RealSense Viewer without the camera inserted?

@hichamhendy
Copy link
Author

It doesn't freeze. I therefore presume a connection with the camera causes this behavior

@MartyG-RealSense
Copy link
Collaborator

The next test that you could try is to enable the camera streaming in the Viewer with the camera plugged in and run an Ubuntu system monitoring tool such as htop. If you monitor memory usage then you could see whether the available memory of the computer is being consumed over time (a 'memory leak') until it crashes.

@hichamhendy
Copy link
Author

hichamhendy commented Jan 25, 2022

I finally became able to specify the problem. The connection with the L515 camera manages some how to double the process /usr/lib/xorg/Xorg which uses GPU Memory in Ubuntu 18 Server

Normal case:
normal

Note: I closed later teams.

I opened realsense viewer
realsensecamera

I closed the viewer
realsensecameraclosed

I even closed the terminal which shouldn't really change alot
realsensecameraterminalclosed

The developed process is connected to the parent. That means if I try to kill, it kills the parent also

@MartyG-RealSense
Copy link
Collaborator

As your L515 camera was able to work normally with another PC and with a Jetson, it does sound like an issue with Ubuntu Server on the affected machines rather than a problem with the camera hardware, its firmware or its USB cable.

Googling for the term ubuntu memory leak /usr/lib/xorg/Xorg shows that there is a high number of reports of memory leaks related to Xorg.

Disabling Xorg does not seem to be a viable option due to the amount of other systems in Ubuntu that it is connected to and stops if Xorg is killed, as you mentioned. A popular suggestion is to instead edit the file /etc/X11/xorg.conf in some way.

@hichamhendy
Copy link
Author

I finally found the solution!

The problem is that only installation from source described here (https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md) worls for me as you suggested from the beginning. However when you catkin-build realsense from source some dependencies are missed like openCV which is necessary but also ros-melodic-librealsense2 gets installed and here is the problem for my laptop. I needed to purge it!
Suggested would be
dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge

@MartyG-RealSense
Copy link
Collaborator

That's excellent news that you found a solution. Congratulations, and thanks so much for sharing your method with the RealSense community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants