Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in src/iop/toneequal.c:783 #9340

Closed
darix opened this issue Jun 26, 2021 · 11 comments
Closed

Crash in src/iop/toneequal.c:783 #9340

darix opened this issue Jun 26, 2021 · 11 comments
Labels
bug: pending someone needs to start working on that bug: upstream he bug needs a fix outside of the scope of darktable, in an external lib or in a driver
Milestone

Comments

@darix
Copy link
Contributor

darix commented Jun 26, 2021

(gdb) bt
#0  0x00007f8b38075a2d in pixel_correction.avx2.6.lto_priv.0 (exposure=<optimized out>, factors=0x557721731290, sigma=<optimized out>) at /usr/src/debug/darktable-znver2-3.5.0~git2612.582b090a16-6354.1.x86_64/src/iop/toneequal.c:783
#1  0x00007f8b3804f691 in compute_lut_correction._omp_fn.0.avx2.6.lto_priv.0 () at /usr/src/debug/darktable-znver2-3.5.0~git2612.582b090a16-6354.1.x86_64/src/iop/toneequal.c:1430
#2  0x00007f8b6298fbf6 in gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:125
#3  0x00007f8b62b06259 in start_thread (arg=0x7f8a9fb03640) at pthread_create.c:481
#4  0x00007f8b62c1e2b3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) bt full
#0  0x00007f8b38075a2d in pixel_correction.avx2.6.lto_priv.0 (exposure=<optimized out>, factors=0x557721731290, sigma=<optimized out>) at /usr/src/debug/darktable-znver2-3.5.0~git2612.582b090a16-6354.1.x86_64/src/iop/toneequal.c:783
        result = 0
        gauss_denom = 3.99999976
        expo = <optimized out>
#1  0x00007f8b3804f691 in compute_lut_correction._omp_fn.0.avx2.6.lto_priv.0 () at /usr/src/debug/darktable-znver2-3.5.0~git2612.582b090a16-6354.1.x86_64/src/iop/toneequal.c:1430
        x = <optimized out>
        k = 154
        LUT = 0x5577217312d0
        scaling = <optimized out>
        offset = <optimized out>
        sigma = <optimized out>
        factors = 0x557721731290
#2  0x00007f8b6298fbf6 in gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:125
        team = 0x7f8b28026d00
        task = 0x7f8b28027e10
        data = <optimized out>
        pool = 0x7f8b28026c30
        local_fn = 0x7f8b3804f5f0 <compute_lut_correction._omp_fn.0.avx2.6.lto_priv.0>
        local_data = 0x7f8b39febdc0
#3  0x00007f8b62b06259 in start_thread (arg=0x7f8a9fb03640) at pthread_create.c:481
        ret = <optimized out>
        pd = 0x7f8a9fb03640
        unwind_buf = 
              {cancel_jmp_buf = {{jmp_buf = {140233361339968, 2404743450876744909, 140235950175118, 140235950175119, 0, 140233361339968, -2429021073623968563, -2429243339185023795}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#4  0x00007f8b62c1e2b3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Platform

  • darktable version : e.g. 3.5.0~git2612.582b090a16 this is my build with znver2 optimizations enabled:
  • OS : e.g. openSUSE Tumbleweed latest
  • Memory : 32G
  • Graphics card : RTX 2070S
  • Graphics driver : 470.42.01
@darix darix changed the title Crash in when clicking on photo in lighttable Crash in src/iop/toneequal.c:783 Jun 26, 2021
@darix
Copy link
Contributor Author

darix commented Jun 26, 2021

It seems those files have older xmp files next to them so this might be an issue with supporting older settings?

the mtime of those files is 2020-12-17 but the settings could be even older.

@johnny-bit
Copy link
Member

Duplicate of #9002 - if you have gcc11 it's likely a gcc problem.

@darix
Copy link
Contributor Author

darix commented Jun 26, 2021

it might be a duplicate of that other bug but the other bug is closed and i think this should be kept open as just saying "this is a gcc11"-bug might not be the right thing and at least it should then be escalated to the gcc team.

I mean in worst case cmake should fail/warn if gcc 11 is detected. or if we can write a small piece of code to check for this bug then that would be even better.

@johnny-bit
Copy link
Member

I think we should file a gcc bug, since this issue (and probably target_clones problem with -fno-semantic-interposition) are gcc bugs... But then i haven't beeen able to produce minimum reproductor for target_clones problem... and this for me looks as complex. Essentially it looks like it overshots factor array but it shouldn't since that array is staticaly defined as 8-item and loop has safe length declared (and look length is 8).

And checking for bugs existence would essentially amount to writting minumum reproductor ;)

@darix
Copy link
Contributor Author

darix commented Jun 27, 2021

i tried switching the package to clang but that has a lot of complaints about not properly vectorized data

@marxin
Copy link

marxin commented Jun 30, 2021

Can please anybody create a reproducer so that I can narrow down the GCC issue?

@johnny-bit
Copy link
Member

@darix & @piratenpanda - Can you share the compilation options and image +xmp (or better - steps one can take in darktable to make the crash)?

There's similar report from @pitbuster here: #8695 (comment)

According to comment from elstoc - the issue is present when building on GCC11 (eg using build.sh) with --build-type RelWithDebInfo, however the issue is not present compilling with --build-type Release

@piratenpanda
Copy link
Contributor

Can't seem to reproduce with latest git no matter what compiler options I use. Before it happened with almost every image, now not a single one.

@github-actions
Copy link

This issue did not get any activity in the past 30 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

@johnny-bit
Copy link
Member

@darix - with recent fixes to codebase can you still reproduce problem on GCC11? Do we have a reproducer on GCC11?

@johnny-bit johnny-bit added bug: pending someone needs to start working on that bug: upstream he bug needs a fix outside of the scope of darktable, in an external lib or in a driver and removed no-issue-activity labels Aug 8, 2021
@darix
Copy link
Contributor Author

darix commented Aug 8, 2021

not really.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending someone needs to start working on that bug: upstream he bug needs a fix outside of the scope of darktable, in an external lib or in a driver
Projects
None yet
Development

No branches or pull requests

4 participants