darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.52k stars 1.12k forks source link

Segfault right after launch (solved, most likely caused by XP-Pen) #17197

Open DickerDackel opened 1 month ago

DickerDackel commented 1 month ago

Describe the bug

I'm currently migrating to darktable, and after developing 3 shoots over a week, darktable started crashing on me.

All crash.

So it could be a. a config fragment outside ~/.config/darktable that I need to remove? Or b. an issue with my system?

Steps to reproduce

Start darktable, wait a few seconds, crash.

Expected behavior

No response

Logfile | Screenshot | Screencast

darktable_bt_VBLUR2.txt

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

4.8.0

What OS are you using?

Linux

What is the version of your OS?

Fedora 40

Describe your system?

Standard F40 install, gnome + Wayland, 32GB RAM, nvidia drivers

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

GeForce RTX 3070 Ti

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

jenshannoschwalm commented 1 month ago

Don't use -d common on 4.8.0, that will likely not work as there was a bug.

Better use '-d pipe -d opencl' or upgrade to 4.8.1

DickerDackel commented 1 month ago

darktable_bt_C42SR2.txt

Log with -d pipe -d opencl attached.

Oh, wasn't aware 4.8.1 is out. I checked the homepage before opening this issue, not checking here. I'll try that now.

DickerDackel commented 1 month ago

4.8.1 crashes too. I counted while moving the mouse over the lighttable. It got unresponsive after about 10s and terminated after another 5 or so.

Log like above, but with the 4.8.1 appimage here from the github release:

@gi-man yes, drivers are from rpmfusion, followed their install page. Can I provide anything else or is all the information about the driver included in the debug log?

darktable_bt_BE2IR2.txt

DickerDackel commented 1 month ago

Oh, just noticed that the -d something outputs much more than what's written into the log.

Here's the missing console output for both 480 and 481:

pipe-opencl-481.log pipe-opencl.log

jenshannoschwalm commented 1 month ago

Interesting log as it shows that dt crashes right after compiling the opencl stuff . I guess everything works correctly if you disable opencl?

DickerDackel commented 1 month ago

Interesting log as it shows that dt crashes right after compiling the opencl stuff . I guess everything works correctly if you disable opencl?

Nope. See first bullet point in the entry post above.

Logs attached for ./darktable-4.8.1-x86_64.AppImage -d pipe -d opencl --disable-opencl | tee no-opencl-481.log

no-opencl-481.log darktable_bt_RXSPR2.txt

DickerDackel commented 1 month ago

Using 4.8.1 and no opencl, can you post the logfile from -d common and then from -d all? It doesnt appear to be an opencl issue.

-d common: 481-common.log darktable_bt_LN3FR2.txt

-d all 481-all.log darktable_bt_6A8NR2.txt

jenshannoschwalm commented 1 month ago

Have you tried on X11 ? BTW the logs still show opencl bein on :-)

DickerDackel commented 1 month ago

Have you tried on X11 ? BTW the logs still show opencl bein on :-)

You're probably looking at the latest log, which I posted on request of gi-man. Directly below your request is the "no-opencl.log", where you find this:

 0.1276 [opencl_init] opencl disabled due to explicit user request
 0.1276 [opencl_init] FINALLY: opencl PREFERENCE=ON is NOT AVAILABLE and NOT ENABLED.

Re X11: Nope. I have 2 additional displays plugged into my dock, and they don't work correctly with X11.

DickerDackel commented 1 month ago

Do you have LUA scripts? Did you recently modified a shortcut?

All tests with you guys have been done after nuking .config/darktable, to make sure it's not a corrupted database or config file. So no, no LUA even downloaded, since it's not staying up long enough.

After the remark, that it looks as if the crash happened during opencl compile, I also removed various things from .cache/

DickerDackel commented 1 month ago

@dterrahe Ok, I created a fresh user and logged into a x11 session. Crash still happens. Log created with -d all:

x11-dall.log darktable_bt_NHFSR2.txt

Also, GDK_BACKEND=wayland is not set in my normal account. No, not running Xwayland

Also: How would an undefined key press trigger a crash? I'd not consider that a wayland issue, even if it would be responsible for sending phantasy keys. Shouldn't the keyboard handling code just ignore key events that are unassigned to an action?

But doing the x11 test on a fresh user IMO also rules out that it's some weird GDK setting or some other side effect just from configuration.

jenshannoschwalm commented 1 month ago

There has been one other issue with some connected pen devices. Could you check after removing everything but mouse, keyboard, display?

DickerDackel commented 1 month ago

There has been one other issue with some connected pen devices. Could you check after removing everything but mouse, keyboard, display?

Whoa, that solved it, but in a weird way. I first pulled just the XP-Pen, still crashed. Then I did a power cycle and started without the dock and the additional displays disconnected, just the notebook on its own, and no crash. I then introduced the displays, then the USB dock back with no crash on any step. Finally I plugged the XP-Pen back in, and it still doesn't crash.

Now I did again a full power cycle with all devices back in as it was all the time, and it doesn't crash anymore.

So I guess the issue is solved, but in a pretty unsatisfactory way, because I have no idea what difference pulling all the plugs and replugging them would make, in contrast to the frequent power cycles I was doing anyways.

But at least I know what to try next time it happens (if).

There also was a kernel update this morning, so in theory this also could have made a difference, but I did a powercycle and darktable test right after that as well, and the crash still was there.

In hindsight, I should have removed the devices from the usb dock one by one, with a power cycle and test inbetween each, to safely narrow it down.

It's now running, even with my old config folder and database. Thanks all for your time. If anybody still wants to analyze anything because there still might be an issue in dt, I'm happy to try things and provide logs.

jenshannoschwalm commented 1 month ago

Good to hear you can use dt again :-)

@dterrahe i am absolutely sure i saw you commenting here but can't find that any more ???

@DickerDackel you might want to change title and initial description for others to spot this issue...

BTW #17004 was the issue i remembered as a cross-reference

jenshannoschwalm commented 1 month ago

Or maybe dbus?

DickerDackel commented 1 month ago

Dug through journalctl, XP-Pen (or PenDev) was only mentioned during boot and without an error.

No idea about dbus, where (and if) it logs, ...