USB Camera freezes system

Now and then I get a system freeze when opening a USB (UVC) Camera using standard open("/dev/video0"). Ubuntu 16.04 doesn’t reboot it just hangs freezes.

When cycling the power it is sometimes possible to open the camera correctly or again sometimes the problem persist or the camera has very low FPS.

  1. What could be the root cause of this?
  2. What tools in Linux (Ubuntu 16.04) can be used to trace the problem?

You can check with ‘v4l2-ctl’ first to see if the camera is working properly.
Please refer to
https://devtalk.nvidia.com/default/topic/1026128/jetson-tx2/tegra-multimedia-apis-could-get-raw-image-via-v4l2-only-at-15fps/post/5223050/#5223050

I really would like to find the root cause of the problem not just to know if it is working, it would just be a very temporary band aid.

What tools can be used to see why the system freezes?

You may run tegrastats to check if HW elements are alive.

There might be existing linux tools for this. Other users may share their experience.

You should probably also run a serial console with logging enabled. See if there is any kind of kernel OOPS or other interesting message on failure.