[Libva] vainfo crashes with "Program received signal SIGFPE, Arithmetic exception." Need help to troubleshoot.
dar8757 at eml.cc
dar8757 at eml.cc
Mon Feb 25 13:01:31 PST 2013
turning on debug flags
export CFLAGS="-O0 -ggdb"
export CXXFLAGS="-O0 -ggdb"
using the following reproducible procedure
bzr co lp:libvdpau
git clone git://anongit.freedesktop.org/git/libva
git clone git://anongit.freedesktop.org/vaapi/vdpau-driver
cd ./libvdpau
./autogen.sh
./configure \
--libdir=/usr/local/lib64
make
make install
ldconfig
cd ../libva
./autogen.sh
./configure --libdir=/usr/local/lib64 \
--with-drivers-path=/usr/local/lib64/dri \
--enable-dummy-driver \
--enable-glx \
--enable-egl \
--disable-wayland
make
make install
ldconfig
cd ../vdpau-driver
./autogen.sh
./configure \
--libdir=/usr/local/lib64 \
--enable-glx \
--enable-tracer \
--with-sysroot=/usr/local/${LIBDIR}
make
make install
ldconfig
GDB session returns
gdb vainfo
(gdb) run
Starting program: /usr/local/bin/vainfo
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib64/libthread_db.so.1".
libva info: VA-API version 0.33.0
libva info: va_getDriverName() returns 0
libva info: Trying to open
/usr/local/lib64/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_33
Program received signal SIGFPE, Arithmetic exception.
0x00007ffff5e4c87c in object_heap_destroy
(heap=0x619c30) at object_heap.c:275
!! 275 for (i = 0; i < heap->heap_size /
heap->heap_increment; i++) {
(gdb) bt
#0 0x00007ffff5e4c87c in object_heap_destroy
(heap=0x619c30) at object_heap.c:275
#1 0x00007ffff5e50455 in destroy_heap
(name=0x7ffff5e5f174 "buffer", heap=0x619c30,
destroy_func=0x7ffff5e50337 <destroy_buffer_cb>,
user_data=0x619ae0) at vdpau_driver.c:138
#2 0x00007ffff5e50488 in vdpau_common_Terminate
(driver_data=0x619ae0) at vdpau_driver.c:159
#3 0x00007ffff5e51a75 in vdpau_Terminate_Current
(ctx=0x612d30) at vdpau_driver_template.h:537
#4 0x00007ffff5e51b22 in vdpau_Initialize_Current
(ctx=0x612d30) at vdpau_driver_template.h:563
#5 0x00007ffff5e51f04 in __vaDriverInit_0_33
(ctx=0x612d30) at vdpau_driver.c:317
#6 0x00007ffff7bc494e in va_openDriver (dpy=0x605500,
driver_name=0x6133c0 "nvidia") at va.c:273
#7 0x00007ffff7bc543b in vaInitialize (dpy=0x605500,
major_version=0x7fffffffd96c,
minor_version=0x7fffffffd968)
at va.c:446
#8 0x000000000040119f in main (argc=1,
argv=0x7fffffffda88) at vainfo.c:98
(gdb)
identifying a problem in object_heap.c
vi /usr/local/src/vdpau-driver/src/object_heap.c
...
261 object_heap_destroy(object_heap_p heap)
262 {
263 object_base_p obj;
264 int bucket_index, obj_index, i;
265
266 /* Check if heap is empty */
267 for (i = 0; i < heap->heap_size; i++) {
268 /* Check if object is not still
allocated */
269 bucket_index = i / heap->heap_increment;
270 obj_index = i % heap->heap_increment;
271 obj =
(object_base_p)(heap->bucket[bucket_index] + obj_index *
heap->object_size);
272 ASSERT(obj->next_free != ALLOCATED);
273 }
274
!!! 275 for (i = 0; i < heap->heap_size /
heap->heap_increment; i++) {
276 free(heap->bucket[i]);
277 }
278
279 pthread_mutex_destroy(&heap->mutex);
280
281 free(heap->bucket);
282 heap->bucket = NULL;
283 heap->heap_size = 0;
284 heap->next_free = LAST_FREE;
285 }
which, i think (?), appeared in
http://cgit.freedesktop.org/vaapi/intel-driver/commit/?id=ef5efefaec8b3a4eafde2347b98a973f73745421
More information about the Libva
mailing list