How to reproduce the bug ? Use the latest git code, run 1. ./autogen.sh --disable-gl --enable-glesv2 --enable-directfb --enable-vg --disable-drm --disable-cogl --enable-test-surfaces --enable-xlib-xcb 2. make test What will we see ? TESTING self-copy self-copy.test-base.argb32 [0]: PASS self-copy.test-base.rgb24 [0]: PASS self-copy.test-fallback.argb32 [0]: PASS self-copy.test-fallback.rgb24 [0]: PASS self-copy.test-mask.argb32 [0]: PASS self-copy.test-mask.rgb24 [0]: PASS self-copy.test-traps.argb32 [0]: PASS self-copy.test-traps.rgb24 [0]: PASS self-copy.test-spans.argb32 [0]: PASS self-copy.test-spans.rgb24 [0]: PASS self-copy.no-fallback.argb32 [0]: UNTESTED self-copy.no-traps.argb32 [0]: UNTESTED self-copy.no-spans.argb32 [0]: UNTESTED self-copy.test-paginated.argb32 [0]: (test case self-copy.test-paginated.argb32 do not terminate) What should be the correct output ? Test case self-copy.test-paginated.argb32 terminates within finite time period.
The bug occurs with all the paginated surfaces. It looks like a snapshot bug. (gdb) bt #0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:132 #1 0x00007ffff787f065 in _L_lock_858 () from /lib/x86_64-linux-gnu/libpthread.so.0 #2 0x00007ffff787eeba in __pthread_mutex_lock (mutex=0x77a980) at pthread_mutex_lock.c:61 #3 0x00007ffff7b1d27c in _cairo_surface_snapshot_get_target (surface=0x77a840) at cairo-surface-snapshot-inline.h:54 #4 0x00007ffff7b1d4de in _cairo_surface_snapshot_get_extents (abstract_surface=0x77a840, extents=0x7fffffffc480) at cairo-surface-snapshot.c:138 #5 0x00007ffff7b16780 in _cairo_surface_get_extents (surface=0x77a840, extents=0x7fffffffc480) at cairo-surface.c:2296 #6 0x00007ffff7af4f3c in _surface_is_clear (pattern=0x77a718) at cairo-pattern.c:3207 #7 0x00007ffff7af52df in _cairo_pattern_is_clear (abstract_pattern=0x77a718) at cairo-pattern.c:3317 #8 0x00007ffff7b15e76 in nothing_to_do (surface=0x77a9f0, op=CAIRO_OPERATOR_OVER, source=0x77a718) at cairo-surface.c:1935 #9 0x00007ffff7b15f54 in _cairo_surface_paint (surface=0x77a9f0, op=CAIRO_OPERATOR_OVER, source=0x77a718, clip=0x77a050) at cairo-surface.c:1971 #10 0x00007ffff7b1f021 in _cairo_surface_wrapper_paint (wrapper=0x7fffffffc740, op=CAIRO_OPERATOR_OVER, source=0x77a718, clip=0x77a660) at cairo-surface-wrapper.c:165 #11 0x00007ffff7b02f41 in _cairo_recording_surface_replay_internal (surface=0x7797b0, surface_extents=0x0, surface_transform=0x0, target=0x77a9f0, target_clip=0x0, type=CAIRO_RECORDING_REPLAY, region=CAIRO_RECORDING_REGION_ALL) at cairo-recording-surface.c:1358 #12 0x00007ffff7b03790 in _cairo_recording_surface_replay (surface=0x7797b0, target=0x77a9f0) at cairo-recording-surface.c:1581 #13 0x00007ffff7b028f1 in _cairo_recording_surface_snapshot (abstract_other=0x7797b0) at cairo-recording-surface.c:1134 #14 0x00007ffff7adf95f in _cairo_paginated_surface_snapshot (abstract_other=0x779640) at cairo-paginated-surface.c:667 #15 0x00007ffff7b1d568 in _cairo_surface_snapshot_copy_on_write (surface=0x77a840) at cairo-surface-snapshot.c:190 #16 0x00007ffff7b13df3 in _cairo_surface_detach_snapshot (snapshot=0x77a840) at cairo-surface.c:347 #17 0x00007ffff7b13d61 in _cairo_surface_detach_snapshots (surface=0x779640) at cairo-surface.c:332 #18 0x00007ffff7b13ffd in _cairo_surface_begin_modification (surface=0x779640) at cairo-surface.c:395 #19 0x00007ffff7b1591b in INT_cairo_surface_set_device_offset (surface=0x779640, x_offset=0, y_offset=0) at cairo-surface.c:1675 #20 0x0000000000471d90 in _cairo_boilerplate_pdf_finish_surface (surface=0x779640) at cairo-boilerplate-pdf.c:131 #21 0x000000000040bd02 in cairo_test_for_target (ctx=0x7fffffffcde0, target=0x7649e0, dev_offset=0, similar=0) at cairo-test.c:988 #22 0x000000000040d00a in _cairo_test_context_run_for_target (ctx=0x7fffffffcde0, target=0x7649e0, similar=0, dev_offset=0) at cairo-test.c:1526 #23 0x000000000040ddf0 in _cairo_test_runner_draw (runner=0x7fffffffcce0, ctx=0x7fffffffcde0, target=0x7649e0, similar=0, device_offset=0) at cairo-test-runner.c:254 #24 0x000000000040f59e in main (argc=1, argv=0x7fffffffe028) at cairo-test-runner.c:918 (gdb)
commit 8020e0bc8cbd3e5ac188eb305b74ae1c1f362a31 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Oct 3 17:01:41 2012 +0100 recording: Perform an explicit during snapshot In order to avoid recursing upon our source mutex when doing a snapshot, we can perform an explicit copy of the command array. This should also be faster than performing a replay as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50443 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.