Project

General

Profile

Bug #12461

segmentation fault at high zoom level and the equalizer module

Added by Heiko Bauke about 1 month ago. Updated about 1 month ago.

Status:
Fixed
Priority:
Medium
Assignee:
Category:
Darkroom
Target version:
Start date:
12/12/2018
Due date:
% Done:

100%

Affected Version:
git master branch
System:
Ubuntu
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Working in the darkroom tab I get always a segmentation fault when the following two conditions are met:

  • zoom level is at 400% or above,
  • at least one instance of the equalizer module is active.

Associated revisions

Revision 0a33be3c
Added by Heiko Bauke about 1 month ago

equalizer: fix bug #12461 and fix radius in tiling_callback

Revision 3f9f754d
Added by Pascal Obry about 1 month ago

Merge pull request #1902 from rabauke/my_atrous

equalizer: fix bug #12461 and fix radius in tiling_callback

History

#1 Updated by Heiko Bauke about 1 month ago

I created a debug build and attached a debugger to darktable. The segmentation fault comes from the function weight_sse2 in the file atrours.c. The pointer argument c1 points to an invalid address, this means that the variable px, which is passed as c1 to the function weight_sse2, is invalid. The root cause for this issue is somewhat difficult to debug due to the many source manipulating macros.

#2 Updated by Heiko Bauke about 1 month ago

I think cases where 2*mult>=height or 2*mult>=width are not treated correctly in the functions eaw_decompose and eaw_decompose_sse2, which causes the segmentation fault.

#3 Updated by Pascal Obry about 1 month ago

I can't reproduce. Is that with out without OpenCL.

#4 Updated by Aurélien PIERRE about 1 month ago

It should be without OpenCL, since the SSE2 function are affected.

#5 Updated by Pascal Obry about 1 month ago

Indeed, I missed this in the comment. I'll try again.

#6 Updated by Pascal Obry about 1 month ago

  • Priority changed from Low to Medium

I can reproduce for zoom level > 400%, it is immediate as soon as I pass the zoom to 800%.

This will probably take someone knowing well this part of the code and SSE2.

#7 Updated by Pascal Obry about 1 month ago

Same issue in non SS2 path:

(gdb) bt
#0  0x00007fffdc073f5c in weight
    (weight=<synthetic pointer>, sharpen=<optimized out>, c2=0x7fff71bee040, c1=0x7fff71bdfc70)
    at /home/obry/dev/builds/darktable/build/src/src/iop/atrous.c:168
#1  0x00007fffdc073f5c in eaw_decompose._omp_fn
    (out=<optimized out>, in=<optimized out>, detail=<optimized out>, scale=<optimized out>, sharpen=<optimized out>, width=<optimized out>, height=<optimized out>) at /home/obry/dev/builds/darktable/build/src/src/iop/atrous.c:420
#2  0x00007ffff792a73e in  () at /usr/lib/x86_64-linux-gnu/libgomp.so.1
#3  0x00007ffff7acffa3 in start_thread (arg=<optimized out>)
    at pthread_create.c:486
#4  0x00007ffff7be288f in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

This may be easier to debug. It is in the same part of the code but for standard CPU path.

#8 Updated by Heiko Bauke about 1 month ago

I opened a pull request to fix this issue.

#9 Updated by Pascal Obry about 1 month ago

  • % Done changed from 0 to 100
  • Status changed from New to Fixed
  • Assignee set to Pascal Obry

Thanks, this is now integrated.

Also available in: Atom PDF