GT crashes on loading a package with Metacello
GT crashes when I execute the following code in Lepiter:
Metacello new
baseline: 'CBOR';
repository: 'github://svenvc/CBOR:main';
load.
Terminal output:
free(): invalid next size (fast)
zsh: abort (core dumped) GlamorousToolkit --image gt.image
GDB backtrace:
#0 0x00007ffff7a9cf3c in __pthread_kill_implementation () from /nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib/libc.so.6
#1 0x00007ffff7a4190e in raise () from /nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib/libc.so.6
#2 0x00007ffff7a28942 in abort () from /nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib/libc.so.6
#3 0x00007ffff7a299c3 in __libc_message_impl.cold () from /nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib/libc.so.6
#4 0x00007ffff7aa79e5 in malloc_printerr () from /nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib/libc.so.6
#5 0x00007ffff7aa9f51 in _int_free () from /nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib/libc.so.6
#6 0x00007ffff7aac86e in free () from /nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib/libc.so.6
#7 0x00007ffff7ec1e28 in primitiveFFIFree () at /home/ubuntu/jenkins/workspace/feenkcom_gtoolkit-vm_main/target/release/build/vm-bindings-a3cd36d5257a46ac/out/generated/64/vm/src/cointerp.c:84963
#8 0x0000000320001288 in ?? ()
#9 0x0000000300003fb0 in ?? ()
#10 0x0000000300003fb0 in ?? ()
#11 0x00007ffff79fe9c0 in ?? ()
#12 0x00007ffff7eba969 in interpret () at /home/ubuntu/jenkins/workspace/feenkcom_gtoolkit-vm_main/target/release/build/vm-bindings-a3cd36d5257a46ac/out/generated/64/vm/src/cointerp.c:3080
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Switching to libgit-cli solves the problem.
Hi @suhr , Can you provide OS info?
- system:
"x86_64-linux" - host os:
Linux 6.15.3, NixOS, 25.11 (Xantusia), 25.11.20250624.83685a4 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.24.14 - channels(root):
"nixos" - channels(suhr):
"" - nixpkgs:
/nix/store/y7pc4b96py5mlxs4q7akqr4n8ml743d3-source
Thanks. I'm able to reproduce the issue with the nix packaged GlamorousToolkit-cli. If I use the downloaded GT VM with a fhs environment:
nix develop github:/akgrant43/gt4nix#gt-fhs --recreate-lock-file --no-write-lock-file
and then
bin/GlamorousToolkit-cli --interactive --enable-wayland --beacon ERROR GlamorousToolkit.image
I don't get the error. The difference is the version of libgit2 being used. The fhs environment is using libgit2 shipped with GT. The nix package is using the system version of libgit2, which is due to your PR https://github.com/NixOS/nixpkgs/pull/280018 :-)
We could try and build a version of libgit2 that doesn't have either issue, however we are moving away from libgit2 and towards using the git cli, so I'm not convinced this is worth the effort at the moment.