OpenSlide segmentation faults in Windows

Agelos Pappas agelos at smartcode.gr
Fri Nov 16 18:23:53 EST 2012


OK I forgot to send you the backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6284.0xec4]
sse2_composite_src_x888_8888 (imp=0x1a2f90, info=0xe5e8fc) at 
pixman-sse2.c:2860
         in pixman-sse2.c
(gdb) 2860      pixman-sse2.c: No such file or directory.
#0  sse2_composite_src_x888_8888 (imp=0x1a2f90, info=0xe5e8fc) at 
pixman-sse2.c:2860
#1  0x6a352543 in pixman_image_composite32 (op=<value optimized out>, 
src=0xe7c6c0, mask=0x0, dest=0xe79188, src_x=28, src_y=56, mask_x=56, 
mask_y=113, dest_x=56, dest_y=113, width=24, height=18) at pixman.c:712
#2  0x6a6c05b6 in composite_boxes (_dst=0xe71928, 
op=CAIRO_OPERATOR_SATURATE, abstract_src=0xe7a1c8, abstract_mask=0x0, 
src_x=-28, src_y=-57, mask_x=0, mask_y=0, dst_x=0, dst_y=0, 
boxes=0xe5f260, extents=0xe5f500) at cairo-image-compositor.c:523
#3  0x6a6f4322 in composite_aligned_boxes (compositor=<value optimized 
out>, extents=0xe5f4c8, boxes=0xe5f260) at cairo-spans-compositor.c:665
#4  clip_and_composite_boxes (compositor=<value optimized out>, 
extents=0xe5f4c8, boxes=0xe5f260) at cairo-spans-compositor.c:859
#5  0x6a6f4a1b in clip_and_composite_boxes (compositor=0x6a75c260, 
extents=0xe5f4c8, boxes=0xe5f260) at cairo-spans-compositor.c:821
#6  0x6a6f4b20 in _cairo_spans_compositor_paint (_compositor=0x6a75c260, 
extents=0xe5f4c8) at cairo-spans-compositor.c:960
#7  0x6a6b5190 in _cairo_compositor_paint (compositor=0x6a75c260, 
surface=0xe71928, op=CAIRO_OPERATOR_SATURATE, source=0xe5f810, clip=0x0) 
at cairo-compositor.c:65
#8  0x6a6c6b51 in _cairo_image_surface_paint (abstract_surface=0xe71928, 
op=CAIRO_OPERATOR_SATURATE, source=0xe5f810, clip=0x0) at 
cairo-image-surface.c:918
#9  0x6a6f7b14 in _cairo_surface_paint (surface=0xe71928, 
op=CAIRO_OPERATOR_SATURATE, source=0xe5f810, clip=0x0) at 
cairo-surface.c:2006
#10 _cairo_surface_paint (surface=0xe71928, op=CAIRO_OPERATOR_SATURATE, 
source=0xe5f810, clip=0x0) at cairo-surface.c:1981
#11 0x6a6bd724 in _cairo_gstate_paint (gstate=0xe74080) at 
cairo-gstate.c:1067
#12 0x6a6af88b in cairo_paint (cr=0xe73f00) at cairo.c:1999
#13 0x6ea16e68 in read_tile (osr=0xe61000, cr=0xe73f00, level=6, 
tile_x=29, tile_y=97, translate_x=57.125, translate_y=114.375, 
cache=0xe664c8, arg=0x0) at src/openslide-ops-jpeg.c:728
#14 0x6ea13690 in _openslide_read_tiles (cr=0xe73f00, level=6, 
start_tile_x=26, start_tile_y=89, end_tile_x=40, end_tile_y=107, 
offset_x=1.75, offset_y=0.625, advance_x=19.625, advance_y=14.375, 
osr=0xe61000, cache=0xe664c8, arg=0x0, read_tile=0x6ea16bc0 <read_tile>) 
at src/openslide-tilehelper.c:74
#15 0x6ea14a7a in paint_region (osr=0xe61000, cr=0xe73f00, x=32768, 
y=81920, level=6, w=256, h=256) at src/openslide-ops-jpeg.c:797
#16 0x6ea11e35 in read_region (osr=0xe61000, cr=0xe73f00, x=32768, 
y=81920, level=6, w=256, h=256) at src/openslide.c:542
#17 0x6ea1245f in openslide_read_region (osr=0xe61000, dest=0xfe00e8, 
x=32768, y=81920, level=6, w=256, h=256) at src/openslide.c:627
#18 0x010b1704 in ?? ()
#19 0x751f33aa in KERNEL32!BaseCleanupAppcompatCacheSupport () from 
C:\Windows\syswow64\kernel32.dll
#20 0x00e5ffa0 in ?? ()
#21 0x775b9ef2 in ntdll!RtlpNtSetValueKey () from 
C:\Windows\system32\ntdll.dll
#22 0x00000000 in ?? ()
(gdb)

Hope it helps!

On 17/11/2012 12:05 ??, Agelos Pappas wrote:
> Hi,
>
> as I've reported in another message OpenSlide crashes reporting 
> segmentation faults when running in a windows multi-threaded 
> application. The problem occurs with any slide format, but is easier 
> to reproduce with MIRAX files. I have been able to reproduce the 
> problem in both x86 and x64 versions of OpenSlide by writing an 
> application that spawns N threads which read AxA tiles starting from 
> the top level and walking to the bottom. The application doesn't 
> always crash and when it does, it is not at the same point.
>
> The following (C++) function, if spawned in multiple threads (4 seem 
> to be enough for me) will make the application crash reporting access 
> violation:
>
> DWORD WINAPI SlideWalk(LPVOID lpParam)
> {
>     const int TileSize = 256;
>     __int64 w, h;
>
>     int *osr = openslide_open(PATH_TO_SLIDE);
>     int numLevels = openslide_get_level_count(osr);
>
>     for (int i = numLevels - 1; i >= 0; i--)
>     {
>         openslide_get_level_dimensions(osr, i, &w, &h);
>         double d = openslide_get_level_downsample(osr, i);
>
>         for (int y = 0; y < h; y += TileSize)
>         {
>             for (int x = 0; x < w; x += TileSize)
>             {
>                 unsigned int *buffer = new unsigned int[TileSize * 
> TileSize];
>                 openslide_read_region(osr, buffer, floorl(x * d), 
> floorl(y * d), i, TileSize, TileSize);
>                 delete []buffer;
>             }
>         }
>     }
>     openslide_close(osr);
>     return 0;
> }
>
> The above is just a quick test compiled under windows. I ran it using 
> gdb in Cygwin and I got errors like these:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 7396.0x1e00]
> sse2_composite_src_x888_8888 (imp=0x563c08, info=0xbbe22c) at 
> pixman-sse2.c:2860
>         in pixman-sse2.c
>
> In all my tests the segmentation fault happens in libpixman, but not 
> always at the same line.
> I've written a similar program in Linux but it doesn't seem to crash, 
> even though valgrind reported some errors in libpixman too.
>
> Can someone test the attached C program in Linux using a public MRXS 
> slide to see if they get any seg faults?
>
> Regards
> Pappas Agelos
>
>
>
> _______________________________________________
> openslide-users mailing list
> openslide-users at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2221 / Virus Database: 2629/5398 - Release Date: 11/16/12

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20121117/fd7ad84e/attachment.html 


More information about the openslide-users mailing list