Open
Description
Hi,
I'm using libfreenect2 which is using libva for hardware encoding/decoding AFAIK, and I've opened an issue there as well.
System is Ubuntu 16.04 amd64, and I've got libva installed from apt-get, version 1.7.0-1.
I keep getting random segmentation faults:
[New Thread 0x7fffd178a700 (LWP 23148)]
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 8 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:5 with serial 001680660547
[Info] [Freenect2Impl] found 1 devices
Thread 1 "mario_node" received signal SIGSEGV, Segmentation fault.
0x00007fffeeda3347 in vaDisplayIsValid () from /usr/lib/x86_64-linux-gnu/libva.so.1
(gdb) bt
#0 0x00007fffeeda3347 in vaDisplayIsValid () from /usr/lib/x86_64-linux-gnu/libva.so.1
#1 0x00007ffff576a5c7 in libfreenect2::VaapiRgbPacketProcessorImpl::initializeVaapi() () from /home/mario/freenect2/lib/libfreenect2.so.0.2
#2 0x00007ffff5769408 in libfreenect2::VaapiRgbPacketProcessor::VaapiRgbPacketProcessor() () from /home/mario/freenect2/lib/libfreenect2.so.0.2
#3 0x00007ffff5756ee5 in libfreenect2::CpuPacketPipeline::CpuPacketPipeline() () from /home/mario/freenect2/lib/libfreenect2.so.0.2
#4 0x0000000000413e60 in freenect2::freenect2() ()
I took a look into their code, and the offending code appear to be:
bool initializeVaapi()
{
/* Open display */
static const char *drm_devices[] = {
"/dev/dri/renderD128",
"/dev/dri/card0",
NULL,
};
for (int i = 0; drm_devices[i]; i++) {
drm_fd = open(drm_devices[i], O_RDWR);
if (drm_fd < 0)
continue;
display = vaGetDisplayDRM(drm_fd);
if (vaDisplayIsValid(display))
break;
close(drm_fd);
drm_fd = -1;
display = NULL;
}
CHECK_COND(vaDisplayIsValid(display));
Please bear in mind the code (library) is executing under ssh
but there is a gdm running, drivers are loaded, and the /dev/dri/*
do exist.
Activity