Bug 79421 - [llvmpipe] SIGSEGV src/gallium/drivers/llvmpipe/lp_rast_priv.h:218
Summary: [llvmpipe] SIGSEGV src/gallium/drivers/llvmpipe/lp_rast_priv.h:218
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
Keywords: have-backtrace
Depends on:
Reported: 2014-05-29 17:04 UTC by Vinson Lee
Modified: 2014-05-31 20:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2014-05-29 17:04:10 UTC
mesa: c0bd206a148b8fcda253359efe8c95871f89bd05 (master 10.3.0-devel)

Run piglit test fbo-drawbuffers-none glBlendFunci on llvmpipe.

$ ./bin/fbo-drawbuffers-none glBlendFunci -auto
Testing glBlendFunci.
Segmentation fault (core dumped)

(gdb) bt
#0  0x00007f49681c56a7 in lp_rast_get_unswizzled_color_block_pointer (task=0x1e27838, buf=0, x=0, y=0, layer=0)
    at src/gallium/drivers/llvmpipe/lp_rast_priv.h:218
#1  0x00007f49681c6328 in lp_rast_shade_tile (task=0x1e27838, arg=...) at src/gallium/drivers/llvmpipe/lp_rast.c:316
#2  0x00007f49681c6d5b in do_rasterize_bin (task=0x1e27838, bin=0x7f496b95b1e8, x=0, y=0)
    at src/gallium/drivers/llvmpipe/lp_rast.c:589
#3  0x00007f49681c6dc8 in rasterize_bin (task=0x1e27838, bin=0x7f496b95b1e8, x=0, y=0)
    at src/gallium/drivers/llvmpipe/lp_rast.c:608
#4  0x00007f49681c6ed8 in rasterize_scene (task=0x1e27838, scene=0x7f496b95b010)
    at src/gallium/drivers/llvmpipe/lp_rast.c:657
#5  0x00007f49681c71a4 in thread_function (init_data=0x1e27838) at src/gallium/drivers/llvmpipe/lp_rast.c:778
#6  0x00007f49681c4ce9 in impl_thrd_routine (p=0x1e18c40) at include/c11/threads_posix.h:87
#7  0x00007f496716c182 in start_thread (arg=0x7f4966b0f700) at pthread_create.c:312
#8  0x00007f496afb330d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) frame 0
#0  0x00007f49681c56a7 in lp_rast_get_unswizzled_color_block_pointer (task=0x1e27838, buf=0, x=0, y=0, layer=0)
    at src/gallium/drivers/llvmpipe/lp_rast_priv.h:218
218	   format_bytes = util_format_get_blocksize(task->scene->fb.cbufs[buf]->format);
(gdb) print task->scene->fb.cbufs[buf]
$1 = (struct pipe_surface *) 0x0
Comment 1 Roland Scheidegger 2014-05-29 22:14:24 UTC
I can't reproduce this, and valgrind didn't show anything suspicious neither.
Is this a regression?
I see the problem though, we're missing a test for non-zero cbuf in lp_rast_shade_tile (which we already do in lp_rast_shade_quads_mask).
For some reason though when I run the test it never touches lp_rast_shade_tile just lp_rast_shade_quads_mask which certainly explains why it doesn't crash - from a quick glance with the geometry I get lp_rast_shade_tile should be impossible. In any case I increased the FB_SIZE in the piglit test which made it crash indeed. I'm going to post a fix...
Comment 2 Roland Scheidegger 2014-05-31 20:50:28 UTC
I still have no idea why this could happen with the fb size used by this piglit test but fixed with 576868140bbb1abd177e7fd122720883d773137e.

bug/show.html.tmpl processed on Mar 26, 2017 at 13:02:30.
(provided by the Example extension).