adrien
Posts: 12
Joined: Thu Apr 18, 2013 2:02 pm

bcm_host_init : deadlock

Wed Jun 12, 2013 10:05 am

Hey,

I have an issue with one of my application,after few restarts, the application seems to be lock.

This is the two stack trace :

Thread 0 :
#0 0xb6c7edfc in ioctl () from /lib/arm-linux-gnueabihf/libc.so.6
#1 0xb6f38908 in create_service.constprop.4 () from /opt/vc/lib/libvchiq_arm.so
#2 0xb6f3b05c in vchi_service_open () from /opt/vc/lib/libvchiq_arm.so
#3 0xb6f10c84 in vc_vchi_gencmd_init () from /opt/vc/lib/libbcm_host.so
#4 0xb6f0f56c in bcm_host_init () from /opt/vc/lib/libbcm_host.so
#5 0xb6438a4c in ?? () from /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgsteglglessink.so

Thread 1 :
#0 0xb6c7edfc in ioctl () from /lib/arm-linux-gnueabihf/libc.so.6
#1 0xb6f38c50 in completion_thread () from /opt/vc/lib/libvchiq_arm.so
#2 0xb6f27de0 in vcos_thread_entry (arg=0xb6f44228) at /home/dc4/userland/interface/vcos/pthreads/vcos_pthreads.c:117
#3 0xb6dbebfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#4 0xb6c86758 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#5 0xb6c86758 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6

As you may notice, I use gstreamer-1.0 with the eglglesink object.

I really need a hand on this case, if someone have some ideas, it will be very welcome.

I tried to call bcm_host_deinit() before the application end, but it doesn't help.

Note : My board is update to date.

Test command :
gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/; gst-launch-1.0 playbin uri=file:///path/to/video/file/;

Symptoms :
After few executions, the pipeline stay block in preroll.
Gdb indicates that the VHCIQ completion thread is block in ioctl (as the upper).
After this state, every call to bcm_host_init wil block, and it is necessary to reboot the device to come back in a normal state.

System :
uname -a
Linux rpi-adrien 3.6.11+ #464 PREEMPT Thu Jun 6 18:17:55 BST 2013 armv6l GNU/Linux

vcgencmd version
Jun 6 2013 18:33:28
Copyright (c) 2012 Broadcom
version e6f0abde032163069972925f175c4a3a5617d46d (clean) (release)

adrien
Posts: 12
Joined: Thu Apr 18, 2013 2:02 pm

Re: bcm_host_init : deadlock

Thu Jun 13, 2013 2:29 am

It seems to be a known issue : https://github.com/raspberrypi/firmware/issues/185.

Looking forward to a new driver version.

Return to “OpenMAX”