You are not logged in.

#1 2026-01-06 09:29:26

aruncveli
Member
Registered: 2024-05-08
Posts: 12

[SOLVED] kitty segmentation fault on launch

Running i3 (x11), using nvidia-390xx-utils with NVIDIA only.

kitty 0.45.0-3 installed via pacman segfaults, with a backtrace:

#0  0x0000000000000000 in ?? ()
#1  0x00007f5c44a011e7 in ?? () from /usr/lib/libnvidia-tls.so.390.157
#2  0x00007f5c46e0da26 in start (s=<optimized out>, a=<optimized out>) at kitty/child-monitor.c:292
#3  0x00007f5c481a07c8 in method_vectorcall_NOARGS (func=0x7f5c475d8db0, args=0x7f5c486f86e0, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/descrobject.c:447
#4  0x00007f5c4816364d in _PyObject_VectorcallTstate (tstate=0x7f5c4852fdf0 <_PyRuntime+283024>, callable=0x7f5c475d8db0, args=0x7f5c486f86e0, nargsf=9223372036854775809, kwnames=0x0)
    at ./Include/internal/pycore_call.h:168
#5  PyObject_Vectorcall (callable=0x7f5c475d8db0, args=0x7f5c486f86e0, nargsf=9223372036854775809, kwnames=0x0) at Objects/call.c:327
#6  0x00007f5c48175104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#7  0x00007f5c48246b01 in _PyEval_EvalFrame (tstate=0x7f5c4852fdf0 <_PyRuntime+283024>, frame=<optimized out>, throwflag=0) at ./Include/internal/pycore_ceval.h:121
#8  _PyEval_Vector (tstate=0x7f5c4852fdf0 <_PyRuntime+283024>, func=0x7f5c45d95bc0, locals=0x0, args=0x7fff53780a80, argcount=5, kwnames=0x0) at Python/ceval.c:1820
#9  _PyFunction_Vectorcall (func=0x7f5c45d95bc0, stack=0x7fff53780a80, nargsf=<optimized out>, kwnames=0x0) at Objects/call.c:413
#10 _PyObject_VectorcallDictTstate (tstate=0x7f5c4852fdf0 <_PyRuntime+283024>, callable=0x7f5c45d95bc0, args=0x7fff53780a80, nargsf=<optimized out>, kwargs=<optimized out>)
    at Objects/call.c:135
#11 0x00007f5c4829920f in _PyObject_Call_Prepend (tstate=0x7f5c4852fdf0 <_PyRuntime+283024>, callable=0x7f5c45d95bc0, obj=0x7f5c45e8d400, args=0x7f5c45b6e070, kwargs=0x0)
    at Objects/call.c:504
#12 slot_tp_call (self=0x7f5c45e8d400, args=0x7f5c45b6e070, kwds=0x0) at Objects/typeobject.c:9577
#13 0x00007f5c481611db in _PyObject_MakeTpCall (tstate=0x7f5c4852fdf0 <_PyRuntime+283024>, callable=0x7f5c45e8d400, args=<optimized out>, nargs=<optimized out>, keywords=<optimized out>)
    at Objects/call.c:242
#14 0x00007f5c48175104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#15 0x00007f5c48248b59 in PyEval_EvalCode (co=0x7f5c47b3c330, globals=<optimized out>, locals=0x7f5c47b30580) at Python/ceval.c:604
#16 0x00007f5c48265473 in builtin_exec_impl (module=<optimized out>, source=0x7f5c47b3c330, globals=0x7f5c47b30580, locals=0x7f5c47b30580, closure=<optimized out>)
    at Python/bltinmodule.c:1142
#17 builtin_exec (module=<optimized out>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Python/clinic/bltinmodule.c.h:559
#18 0x00007f5c4818c2b6 in cfunction_vectorcall_FASTCALL_KEYWORDS (func=<optimized out>, args=0x7f5c486f8180, nargsf=<optimized out>, kwnames=0x0) at Objects/methodobject.c:440
#19 0x00007f5c4816364d in _PyObject_VectorcallTstate (tstate=0x7f5c4852fdf0 <_PyRuntime+283024>, callable=0x7f5c48649d50, args=0x7f5c486f8180, nargsf=9223372036854775810, kwnames=0x0)
    at ./Include/internal/pycore_call.h:168
#20 PyObject_Vectorcall (callable=0x7f5c48649d50, args=0x7f5c486f8180, nargsf=9223372036854775810, kwnames=0x0) at Objects/call.c:327
#21 0x00007f5c48175104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#22 0x00007f5c48281a10 in pymain_run_module (modname=modname@entry=0x7f5c483fdda8 L"__main__", set_argv0=set_argv0@entry=0) at Modules/main.c:349
#23 0x00007f5c48092b99 in pymain_run_python (exitcode=0x7fff5378110c) at Modules/main.c:693
#24 Py_RunMain () at Modules/main.c:775
#25 0x000055695d31733f in run_embedded (run_data=<synthetic pointer>) at kitty/launcher/main.c:180
#26 main (argc_=<optimized out>, argv_=<optimized out>, envp=<optimized out>) at kitty/launcher/main.c:566

whereas the upstream binary bundle works.

The backtrace seems like something is failing inside my ancient GPU when it tries to draw using OpenGL, but the upstream binary just working confuses me. An easily found difference, as far as I could see, was that the upstream binary bundles Python 3.12, and the installed system wide Python is 3.13.

Can someone shed some light? Is this a packaging issue?

Last edited by aruncveli (2026-01-11 15:56:43)

Offline

#2 2026-01-06 11:06:45

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

There's a flurry of rebuilds in https://gitlab.archlinux.org/archlinux/ … mmits/main - several against pythong 3.14 (which is currently in the testing repos)
0.45.0-3 might have been built against 3.14 and leaked into extra.
=> downgrade to 0.44 and wait until that noise has settled (you'll probably update to .45 and python 3.14 by then)

Online

#3 2026-01-06 11:45:46

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

Thanks for the suggestion.

I tried downgrading to 0.44 and 0.43, to no avail, unfortunately. I hope a restart wasn't necessary for the downgrades to take effect.

Last edited by aruncveli (2026-01-06 16:32:30)

Offline

#4 2026-01-06 16:57:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

pacman -Qikk kitty python

Do you get the exact same backtrace?
Fwwi, the nvidia TLS is known to cause troubles, https://bbs.archlinux.org/viewtopic.php?id=283327
But I'd expect the upstream build to invoke the same TLS (unless it's running in software emulation)

Online

#5 2026-01-06 18:02:39

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

But I'd expect the upstream build to invoke the same TLS (unless it's running in software emulation)

Upstream binary seems to invoke nvidia OpenGL in the logs:

./kitty --debug-gl
[0.140] Creating window with geometry: 640x480@0x0
[0.205] Creating window with geometry: 960x1038@0x0
[0.237] GL version string: '3.1.0 NVIDIA 390.157' Detected version: 3.1
[0.269] OS Window created
[0.294] Child launched
[0.346] Window moved to: 2326 42 from: 0 0
[0.375] [glfw error 65544]: Notify: Failed to get server capabilities error: org.freedesktop.DBus.Error.NoReply: Did not receive a reply.
  Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[0.375] system color-scheme changed to: dark is_initial_value: 1

The arch binary crashes after OS Window created but before Child launched is logged.

Do you get the exact same backtrace?

Will get back to you regarding this.

Last edited by aruncveli (2026-01-06 18:08:58)

Offline

#6 2026-01-06 18:11:33

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

Also test whether a fresh user is affected or this hinges on your kitty config or some kitten.

Online

#7 2026-01-06 18:19:11

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

pacman -Qikk kitty python

Name            : kitty
Version         : 0.45.0-3
Description     : A modern, hackable, featureful, OpenGL-based terminal emulator
Architecture    : x86_64
URL             : https://github.com/kovidgoyal/kitty
Licenses        : GPL-3.0-only
Groups          : None
Provides        : None
Depends On      : cairo  dbus  freetype2  fontconfig  harfbuzz  hicolor-icon-theme  lcms2  libgl  libpng  librsync  libx11  libxcursor  libxkbcommon  libxkbcommon-x11  libxi  openssl  python3  wayland
  xxhash  zlib  kitty-terminfo  kitty-shell-integration
Optional Deps   : imagemagick: viewing images with icat [installed]
                  python-pygments: syntax highlighting in kitty +kitten diff
                  libcanberra: playing "bell" sound on terminal bell [installed]
Required By     : None
Optional For    : pacsea-bin
Conflicts With  : None
Replaces        : None
Installed Size  : 59.17 MiB
Packager        : Campbell Jones <serebit@archlinux.org>
Build Date      : Mon 05 Jan 2026 02:33:36 AM CET
Install Date    : Tue 06 Jan 2026 12:49:26 PM CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

kitty: 1183 total files, 0 altered files
Name            : python
Version         : 3.13.11-1
Description     : The Python programming language
Architecture    : x86_64
URL             : https://www.python.org/
Licenses        : PSF-2.0
Groups          : None
Provides        : python3  python-externally-managed
Depends On      : bzip2  expat  gdbm  libffi  libnsl  libxcrypt  openssl  zlib  tzdata  mpdecimal
Optional Deps   : python-setuptools: for building Python packages using tooling that is usually bundled with Python
                  python-pip: for installing Python packages using tooling that is usually bundled with Python
                  python-pipx: for installing Python software not packaged on Arch Linux
                  sqlite: for a default database integration [installed]
                  xz: for lzma [installed]
                  tk: for tkinter
Required By     : fwupd  gdb  gdb-common  intel-gpu-tools  kitty  kitty-shell-integration  pdfarranger  python-cairo  python-docopt  python-gobject  python-keyutils  python-lxml  python-packaging
  python-pikepdf  python-pillow  python-six  python-wxpython  python-yaml  smbclient  udiskie  vapoursynth  vulkan-mesa-layers  yt-dlp-ejs
Optional For    : boost  cifs-utils  clang  git  gstreamer  gtest  gupnp  i2c-tools  iproute2  ki18n  ldb  libcaca  libevent  libftdi  libimobiledevice  liblc3  libplist  libxml2  libxslt  lirc  node-gyp  onetbb
  pcsclite  picom  talloc  tdb  tevent  util-linux-libs
Conflicts With  : None
Replaces        : python3  python-externally-managed
Installed Size  : 67.66 MiB
Packager        : Jelle van der Waa <jelle@archlinux.org>
Build Date      : Sun 07 Dec 2025 02:01:45 PM CET
Install Date    : Wed 10 Dec 2025 06:43:19 PM CET
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

python: 3075 total files, 0 altered files

Offline

#8 2026-01-06 18:37:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

That's not downgraded?

pacman -U 'https://archive.archlinux.org/packages/k/kitty/kitty-0.44.0-1-x86_64.pkg.tar.zst' 'https://archive.archlinux.org/packages/k/kitty-terminfo/kitty-terminfo-0.44.0-1-x86_64.pkg.tar.zst' 'https://archive.archlinux.org/packages/k/kitty-shell-integration/kitty-shell-integration-0.44.0-1-x86_64.pkg.tar.zst'

Online

#9 2026-01-06 20:54:52

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

Sorry, here it is:

Name            : kitty
Version         : 0.44.0-1
Description     : A modern, hackable, featureful, OpenGL-based terminal emulator
Architecture    : x86_64
URL             : https://github.com/kovidgoyal/kitty
Licenses        : GPL-3.0-only
Groups          : None
Provides        : None
Depends On      : cairo  dbus  freetype2  fontconfig  harfbuzz  hicolor-icon-theme  lcms2  libgl  libpng  librsync  libx11  libxcursor  libxkbcommon  libxkbcommon-x11  libxi  openssl  python3  wayland  xxhash  zlib  kitty-terminfo  kitty-shell-integration
Optional Deps   : imagemagick: viewing images with icat [installed]
                  python-pygments: syntax highlighting in kitty +kitten diff
                  libcanberra: playing "bell" sound on terminal bell [installed]
Required By     : None
Optional For    : pacsea-bin
Conflicts With  : None
Replaces        : None
Installed Size  : 59.90 MiB
Packager        : Lukas Fleischer <lfleischer@archlinux.org>
Build Date      : Mon 03 Nov 2025 06:54:53 PM CET
Install Date    : Tue 06 Jan 2026 09:49:40 PM CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

kitty: 1190 total files, 0 altered files
Name            : python
Version         : 3.13.11-1
Description     : The Python programming language
Architecture    : x86_64
URL             : https://www.python.org/
Licenses        : PSF-2.0
Groups          : None
Provides        : python3  python-externally-managed
Depends On      : bzip2  expat  gdbm  libffi  libnsl  libxcrypt  openssl  zlib  tzdata  mpdecimal
Optional Deps   : python-setuptools: for building Python packages using tooling that is usually bundled with Python
                  python-pip: for installing Python packages using tooling that is usually bundled with Python
                  python-pipx: for installing Python software not packaged on Arch Linux
                  sqlite: for a default database integration [installed]
                  xz: for lzma [installed]
                  tk: for tkinter
Required By     : fwupd  gdb  gdb-common  intel-gpu-tools  kitty  kitty-shell-integration  pdfarranger  python-cairo  python-docopt  python-gobject  python-keyutils  python-lxml  python-packaging  python-pikepdf  python-pillow  python-six  python-wxpython  python-yaml  smbclient  udiskie  vapoursynth  vulkan-mesa-layers  yt-dlp-ejs
Optional For    : boost  cifs-utils  clang  git  gstreamer  gtest  gupnp  i2c-tools  iproute2  ki18n  ldb  libcaca  libevent  libftdi  libimobiledevice  liblc3  libplist  libxml2  libxslt  lirc  node-gyp  onetbb  pcsclite  picom  talloc  tdb  tevent  util-linux-libs
Conflicts With  : None
Replaces        : python3  python-externally-managed
Installed Size  : 67.66 MiB
Packager        : Jelle van der Waa <jelle@archlinux.org>
Build Date      : Sun 07 Dec 2025 02:01:45 PM CET
Install Date    : Wed 10 Dec 2025 06:43:19 PM CET
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

python: 3075 total files, 0 altered files

And the backtrace isn't 100% identical, but it seems to end at the same place:

#0  0x0000000000000000 in ?? ()
#1  0x00007efc23a011e7 in ?? () from /usr/lib/libnvidia-tls.so.390.157
#2  0x00007efc25e0da26 in ?? () from /usr/bin/../lib/kitty/kitty/fast_data_types.so
#3  0x00007efc271a07c8 in method_vectorcall_NOARGS (func=0x7efc265d4db0, args=0x7efc2771d6e0, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/descrobject.c:447
#4  0x00007efc2716364d in _PyObject_VectorcallTstate (tstate=0x7efc2752fdf0 <_PyRuntime+283024>, callable=0x7efc265d4db0, args=0x7efc2771d6e0, nargsf=9223372036854775809,
    kwnames=0x0) at ./Include/internal/pycore_call.h:168
#5  PyObject_Vectorcall (callable=0x7efc265d4db0, args=0x7efc2771d6e0, nargsf=9223372036854775809, kwnames=0x0) at Objects/call.c:327
#6  0x00007efc27175104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#7  0x00007efc27246b01 in _PyEval_EvalFrame (tstate=0x7efc2752fdf0 <_PyRuntime+283024>, frame=<optimized out>, throwflag=0) at ./Include/internal/pycore_ceval.h:121
#8  _PyEval_Vector (tstate=0x7efc2752fdf0 <_PyRuntime+283024>, func=0x7efc24db9080, locals=0x0, args=0x7ffdf8fdee40, argcount=5, kwnames=0x0) at Python/ceval.c:1820
#9  _PyFunction_Vectorcall (func=0x7efc24db9080, stack=0x7ffdf8fdee40, nargsf=<optimized out>, kwnames=0x0) at Objects/call.c:413
#10 _PyObject_VectorcallDictTstate (tstate=0x7efc2752fdf0 <_PyRuntime+283024>, callable=0x7efc24db9080, args=0x7ffdf8fdee40, nargsf=<optimized out>, kwargs=<optimized out>)
    at Objects/call.c:135
#11 0x00007efc2729920f in _PyObject_Call_Prepend (tstate=0x7efc2752fdf0 <_PyRuntime+283024>, callable=0x7efc24db9080, obj=0x7efc24ea8ec0, args=0x7efc24bc59e0, kwargs=0x0)
    at Objects/call.c:504
#12 slot_tp_call (self=0x7efc24ea8ec0, args=0x7efc24bc59e0, kwds=0x0) at Objects/typeobject.c:9577
#13 0x00007efc271611db in _PyObject_MakeTpCall (tstate=0x7efc2752fdf0 <_PyRuntime+283024>, callable=0x7efc24ea8ec0, args=<optimized out>, nargs=<optimized out>,
    keywords=<optimized out>) at Objects/call.c:242
#14 0x00007efc27175104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#15 0x00007efc27248b59 in PyEval_EvalCode (co=0x7efc26b3c330, globals=<optimized out>, locals=0x7efc26b30540) at Python/ceval.c:604
#16 0x00007efc27265473 in builtin_exec_impl (module=<optimized out>, source=0x7efc26b3c330, globals=0x7efc26b30540, locals=0x7efc26b30540, closure=<optimized out>)
    at Python/bltinmodule.c:1142
#17 builtin_exec (module=<optimized out>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Python/clinic/bltinmodule.c.h:559
#18 0x00007efc2718c2b6 in cfunction_vectorcall_FASTCALL_KEYWORDS (func=<optimized out>, args=0x7efc2771d180, nargsf=<optimized out>, kwnames=0x0)
    at Objects/methodobject.c:440
#19 0x00007efc2716364d in _PyObject_VectorcallTstate (tstate=0x7efc2752fdf0 <_PyRuntime+283024>, callable=0x7efc26f9dd50, args=0x7efc2771d180, nargsf=9223372036854775810,
    kwnames=0x0) at ./Include/internal/pycore_call.h:168
#20 PyObject_Vectorcall (callable=0x7efc26f9dd50, args=0x7efc2771d180, nargsf=9223372036854775810, kwnames=0x0) at Objects/call.c:327
#21 0x00007efc27175104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#22 0x00007efc27281a10 in pymain_run_module (modname=modname@entry=0x7efc273fdda8 L"__main__", set_argv0=set_argv0@entry=0) at Modules/main.c:349
#23 0x00007efc27092b99 in pymain_run_python (exitcode=0x7ffdf8fdf4cc) at Modules/main.c:693
#24 Py_RunMain () at Modules/main.c:775
#25 0x000055c99b49733f in main ()

Offline

#10 2026-01-06 22:16:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

seth wrote:

Also test whether a fresh user is affected or this hinges on your kitty config or some kitten.

Tbc,

kitty 0.45.0-3 installed via pacman segfaults

This is a regression, the system *has* worked before?
Also (next to the fresh user) just move your kitty config away, you might have faced some update issue, then tried the upstream version and that generated an incompatible config.

Does

__GL_THREADED_OPTIMIZATIONS=0 kitty

work?
Does

__GL_THREADED_OPTIMIZATIONS=1 kitty

?

Online

#11 2026-01-07 21:54:51

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

No difference with new user/no user config. For

__GL_THREADED_OPTIMIZATIONS=1 kitty

the backtrace was different.

#0  0x0000000000000000 in ?? ()
#1  0x00007f8db0801281 in ?? () from /usr/lib/libnvidia-tls.so.390.157
#2  0x00007f8db0cb1b82 in ?? () from /usr/lib/libGLX_nvidia.so.0
#3  0x00007f8daf5ab972 in ?? () from /usr/lib/libnvidia-glcore.so.390.157
#4  0x00007f8daf85ea4b in ?? () from /usr/lib/libnvidia-glcore.so.390.157
#5  0x00007f8db0c890ff in ?? () from /usr/lib/libGLX_nvidia.so.0
#6  0x00007f8db0c4e757 in ?? () from /usr/lib/libGLX_nvidia.so.0
#7  0x00007f8db4537260 in call_init (l=0x55778913bf90, argc=1, argv=0x7fff7182d9e8, env=0x7fff7182d9f8) at dl-init.c:60
#8  call_init (l=0x55778913bf90, argc=1, argv=0x7fff7182d9e8, env=0x7fff7182d9f8) at dl-init.c:26
#9  0x00007f8db453737d in _dl_init (main_map=0x55778913bf90, argc=1, argv=0x7fff7182d9e8, env=0x7fff7182d9f8) at dl-init.c:121
#10 0x00007f8db45334f5 in __GI__dl_catch_exception (exception=exception@entry=0x0, operate=operate@entry=0x7f8db453e340 <call_dl_init>, args=args@entry=0x7fff718276f0)
    at dl-catch.c:215
#11 0x00007f8db453e2a9 in dl_open_worker (a=a@entry=0x7fff718276f0) at dl-open.c:799
#12 0x00007f8db4533456 in __GI__dl_catch_exception (exception=exception@entry=0x7fff71827740, operate=operate@entry=0x7f8db453e1e0 <dl_open_worker>,
    args=args@entry=0x7fff718276f0) at dl-catch.c:241
#13 0x00007f8db453e75a in _dl_open (file=0x557789155650 "libGLX_nvidia.so.0", mode=<optimized out>, caller_dlopen=0x7f8db0fe8689 <__glXLookupVendorByName+1273>, nsid=-2,
    argc=1, argv=0x7fff7182d9e8, env=0x7fff7182d9f8) at dl-open.c:900
#14 0x00007f8db3a92cc4 in dlopen_doit (a=a@entry=0x7fff71827a00) at dlopen.c:56
#15 0x00007f8db4533456 in __GI__dl_catch_exception (exception=exception@entry=0x7fff71827940, operate=0x7f8db3a92c60 <dlopen_doit>, args=0x7fff71827a00) at dl-catch.c:241
#16 0x00007f8db45335a9 in _dl_catch_error (objname=0x7fff718279a8, errstring=0x7fff718279b0, mallocedp=0x7fff718279a7, operate=<optimized out>, args=<optimized out>)
    at dl-catch.c:260
#17 0x00007f8db3a927b3 in _dlerror_run (operate=operate@entry=0x7f8db3a92c60 <dlopen_doit>, args=args@entry=0x7fff71827a00) at dlerror.c:138
#18 0x00007f8db3a92d7b in dlopen_implementation (file=<optimized out>, mode=<optimized out>, dl_caller=<optimized out>) at dlopen.c:71
#19 ___dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:81
#20 0x00007f8db0fe8689 in __glXLookupVendorByName (vendorName=<optimized out>) at ../libglvnd-v1.7.0/src/GLX/libglxmapping.c:428
#21 0x00007f8db0fe9545 in __glXLookupVendorByScreen (dpy=dpy@entry=0x55778900c9e0, screen=screen@entry=0) at ../libglvnd-v1.7.0/src/GLX/libglxmapping.c:572
#22 0x00007f8db0fea457 in __glXGetDynDispatch (dpy=0x55778900c9e0, screen=0) at ../libglvnd-v1.7.0/src/GLX/libglxmapping.c:606
#23 glXQueryExtensionsString (dpy=0x55778900c9e0, screen=0) at ../libglvnd-v1.7.0/src/GLX/libglx.c:1473
#24 0x00007f8db1933a4f in glfwCreateWindow () from /usr/lib/kitty/kitty/glfw-x11.so
#25 0x00007f8db2c65e6e in ?? () from /usr/bin/../lib/kitty/kitty/fast_data_types.so
#26 0x00007f8db3f94c9d in cfunction_call (func=0x7f8db33fc3b0, args=0x7f8db1b2b160, kwargs=0x7f8db1a3ca40) at Objects/methodobject.c:539
#27 0x00007f8db3f611db in _PyObject_MakeTpCall (tstate=0x7f8db432fdf0 <_PyRuntime+283024>, callable=0x7f8db33fc3b0, args=<optimized out>, nargs=<optimized out>,
    keywords=<optimized out>) at Objects/call.c:242
#28 0x00007f8db3f7b769 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:1509
#29 0x00007f8db4046b01 in _PyEval_EvalFrame (tstate=0x7f8db432fdf0 <_PyRuntime+283024>, frame=<optimized out>, throwflag=0) at ./Include/internal/pycore_ceval.h:121
#30 _PyEval_Vector (tstate=0x7f8db432fdf0 <_PyRuntime+283024>, func=0x7f8db1bbd080, locals=0x0, args=0x7fff71828cf0, argcount=5, kwnames=0x0) at Python/ceval.c:1820
#31 _PyFunction_Vectorcall (func=0x7f8db1bbd080, stack=0x7fff71828cf0, nargsf=<optimized out>, kwnames=0x0) at Objects/call.c:413
#32 _PyObject_VectorcallDictTstate (tstate=0x7f8db432fdf0 <_PyRuntime+283024>, callable=0x7f8db1bbd080, args=0x7fff71828cf0, nargsf=<optimized out>, kwargs=<optimized out>)
    at Objects/call.c:135
#33 0x00007f8db409920f in _PyObject_Call_Prepend (tstate=0x7f8db432fdf0 <_PyRuntime+283024>, callable=0x7f8db1bbd080, obj=0x7f8db1cb0ec0, args=0x7f8db1999940, kwargs=0x0)
    at Objects/call.c:504
#34 slot_tp_call (self=0x7f8db1cb0ec0, args=0x7f8db1999940, kwds=0x0) at Objects/typeobject.c:9577
#35 0x00007f8db3f611db in _PyObject_MakeTpCall (tstate=0x7f8db432fdf0 <_PyRuntime+283024>, callable=0x7f8db1cb0ec0, args=<optimized out>, nargs=<optimized out>,
--Type <RET> for more, q to quit, c to continue without paging--
    keywords=<optimized out>) at Objects/call.c:242
#36 0x00007f8db3f75104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#37 0x00007f8db4048b59 in PyEval_EvalCode (co=0x7f8db393c330, globals=<optimized out>, locals=0x7f8db3930580) at Python/ceval.c:604
#38 0x00007f8db4065473 in builtin_exec_impl (module=<optimized out>, source=0x7f8db393c330, globals=0x7f8db3930580, locals=0x7f8db3930580, closure=<optimized out>)
    at Python/bltinmodule.c:1142
#39 builtin_exec (module=<optimized out>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Python/clinic/bltinmodule.c.h:559
#40 0x00007f8db3f8c2b6 in cfunction_vectorcall_FASTCALL_KEYWORDS (func=<optimized out>, args=0x7f8db4523180, nargsf=<optimized out>, kwnames=0x0)
    at Objects/methodobject.c:440
#41 0x00007f8db3f6364d in _PyObject_VectorcallTstate (tstate=0x7f8db432fdf0 <_PyRuntime+283024>, callable=0x7f8db3d9dd50, args=0x7f8db4523180, nargsf=9223372036854775810,
    kwnames=0x0) at ./Include/internal/pycore_call.h:168
#42 PyObject_Vectorcall (callable=0x7f8db3d9dd50, args=0x7f8db4523180, nargsf=9223372036854775810, kwnames=0x0) at Objects/call.c:327
#43 0x00007f8db3f75104 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at Python/generated_cases.c.h:813
#44 0x00007f8db4081a10 in pymain_run_module (modname=modname@entry=0x7f8db41fdda8 L"__main__", set_argv0=set_argv0@entry=0) at Modules/main.c:349
#45 0x00007f8db3e92b99 in pymain_run_python (exitcode=0x7fff7182937c) at Modules/main.c:693
#46 Py_RunMain () at Modules/main.c:775
#47 0x00005577869a433f in main ()

Although my motivation to solve this problem has diminished, I'm open to exploring it further if you remain curious.

Discussing this challenge with you has been valuable. Thank you for your time and effort.

Offline

#12 2026-01-07 22:47:02

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

You're running into the same crash but through dlopen.

https://github.com/kovidgoyal/kitty/issues/5662
Do "gdb kitty" or "strace kitty > /dev/null 2>&1" crash?
(You'll have to type "run" in gdb to actually start the process)

seth wrote:

This is a regression, the system *has* worked before?

Online

#13 2026-01-08 09:21:05

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

Do "gdb kitty" or "strace kitty > /dev/null 2>&1" crash?

No. They both work.

This is a regression, the system *has* worked before?

I'm going with a maybe, since I have a faint memory of it opening once/twice before this issue started. I'd just (re)installed kitty after a long time. But I don't think I have any logs for that.

Assuming that (at least) an upgrade happened afterwards, I am not sure why can't I reproduce that either.

Offline

#14 2026-01-08 10:01:50

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

Either this is a stack corruption that gets covered by the debug padding or a multi-threading issue that gets covered by the synchronizing fences of strace/gdb.
The critical difference of the upstream build could be some compiler flags rather than any of the (several) bundled libraries.

In case kitty just forgets XInitThreads:

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <X11/Xlib.h>

__attribute__((__constructor__))
void _early_XInitThreads (void)
{
    if (!XInitThreads())
        abort ();
    dprintf(STDERR_FILENO, "preloaded XInitThreads\n");
}
gcc -shared -lX11 -o /tmp/xinitthreads.so /tmp/xinitthreads.c
LD_PRELOAD=/tmp/xinitthreads.so kitty

Online

#15 2026-01-10 11:01:13

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

LD_PRELOAD=/tmp/xinitthreads.so kitty

produces the same backtrace as before.

Last edited by aruncveli (2026-01-10 11:01:48)

Offline

#16 2026-01-10 16:02:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

So that's not it.
Does

taskset -a -c 0 kitty

work?
(The results will unfortunately be inconclusive since this limits kitty to one core, preventing parallel execution, but not threading itself)

Online

#17 2026-01-10 20:19:32

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

No change, unfortunately.

Last edited by aruncveli (2026-01-10 21:25:07)

Offline

#18 2026-01-10 21:47:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

Ftr. https://github.com/kovidgoyal/kitty/blo … tor.c#L292
Effectively the same, what makes threading less and a stack corruption more likely.

They're also all https://github.com/kovidgoyal/kitty/iss … 1312631086

suprisingly, I was able to just build kitty from source(not in debug mode), and now the built binary runs fine without any segmentation faults

If you want to try: https://wiki.archlinux.org/title/Arch_build_system
You might want to dump "lddtree /usr/bin/kitty" and compare the two builds hmm

Online

#19 2026-01-10 23:07:13

aruncveli
Member
Registered: 2024-05-08
Posts: 12

Re: [SOLVED] kitty segmentation fault on launch

I'm not too into building from source since the upstream binary works. The author appears to provide a script for installing/upgrading that binary as well.

Offline

#20 2026-01-10 23:31:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

Minor caveat being that the upstream binary links and ships a decent amount of alternative system libraries.
Since we don't really know what causes this you might run into the problem when those get updated.

Last two things I can tell you is

LD_PRELOAD=/usr/lib/libnvidia-tls.so.390.157 kitty # in case there's some conflict between the linkes libs and libglvnd

and that valgrind might have a better idea who's to blame here (ie. where the corruption occurs)

Online

#21 2026-01-11 00:05:42

captin_crunch
Member
Registered: 2026-01-10
Posts: 6

Re: [SOLVED] kitty segmentation fault on launch

Facing the same issue on debian trixie with nvidia 390xx. Came across this post after hours of searching. smile

# lddtree output of source built binary [version: kitty 0.45.0]
./kitty/launcher/kitty (interpreter => /lib64/ld-linux-x86-64.so.2)
    libpython3.12.so.1.0 => ${HOME}/programming/probe/kitty/dependencies/linux-amd64/lib/libpython3.12.so.1.0
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6

# lddtree output on distribution shipped binary [version: kitty 0.41.1]
/usr/bin/kitty (interpreter => /lib64/ld-linux-x86-64.so.2)
    libpython3.13.so.1.0 => /lib/x86_64-linux-gnu/libpython3.13.so.1.0
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6

I have another system with debian trixie and nvidia 340xx. Kitty runs flawlessly.

# from the system with 340xx [version: kitty 0.41.1]
/usr/bin/kitty (interpreter => /lib64/ld-linux-x86-64.so.2)
    libpython3.13.so.1.0 => /lib/x86_64-linux-gnu/libpython3.13.so.1.0
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6

It appears to be libnvidia-tls issue in 390xx driver.

Last edited by captin_crunch (2026-01-11 00:08:59)

Offline

#22 2026-01-11 00:12:41

captin_crunch
Member
Registered: 2026-01-10
Posts: 6

Re: [SOLVED] kitty segmentation fault on launch

Also found this thread, talking about libnvidia-tls https://bbs.archlinux.org/viewtopic.php?id=283327&p=2

Offline

#23 2026-01-11 00:24:31

captin_crunch
Member
Registered: 2026-01-10
Posts: 6

Re: [SOLVED] kitty segmentation fault on launch

seth wrote:

Minor caveat being that the upstream binary links and ships a decent amount of alternative system libraries.
Since we don't really know what causes this you might run into the problem when those get updated.

Last two things I can tell you is

LD_PRELOAD=/usr/lib/libnvidia-tls.so.390.157 kitty # in case there's some conflict between the linkes libs and libglvnd

and that valgrind might have a better idea who's to blame here (ie. where the corruption occurs)

When you launch kitty with gdb, strace or valgrind, it launches normally. sad

ps; total linux newbie, never used valgrind.

Last edited by captin_crunch (2026-01-11 00:25:52)

Offline

#24 2026-01-11 01:00:40

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,058

Re: [SOLVED] kitty segmentation fault on launch

When you launch kitty with gdb, strace or valgrind, it launches normally.

Yes, we know - valgrind might still point out various corruptions.
The other thread is about a different libnvidia-tls (the driver used to ship two different builds, to older one was preferred but caused problems and was ultimately removed - at least by the AUR package, https://aur.archlinux.org/cgit/aur.git/ … utils#n224 )

The upstream python build links /lib/x86_64-linux-gnu/libpthread.so.0 - you could try to

LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 kitty

that

Online

#25 2026-01-11 01:05:10

captin_crunch
Member
Registered: 2026-01-10
Posts: 6

Re: [SOLVED] kitty segmentation fault on launch

The upstream python build links /lib/x86_64-linux-gnu/libpthread.so.0 - you could try to

LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 kitty

This worked big_smile

Offline

Board footer

Powered by FluxBB