A weird issue while adding packages (corrupted double-linked list or Segmentation)

I was just trying install FUSE with (On ubuntu 22.04 LTS)

using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
Pkg.Registry.add("General")
Pkg.add("FUSE")

I installed FUSE successfully earlier this year, but recently, I failed updating it.

So I tried to remove FUSE and julia and re-install them.

I can install julia successfully with:

curl -fsSL https://install.julialang.org | sh

or

curl -fsSL https://install.julialang.org | sh -s -- --default-channel lts

The issues is:

With julia Version 1.11.6

julia> using Pkg

julia> Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
     Cloning registry from "https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"
malloc(): invalid size (unsorted)

[1947609] signal 6 (-6): Aborted
in expression starting at REPL[2]:1
Segmentation fault (core dumped)

Then, If I rerun julia and repeat the installation:

julia> using Pkg

julia> Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
┌ Warning: attempting to remove probably stale pidfile
│   path = "/home/user1/.julia/registries/.pid"
â”” @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:278
     Cloning registry from "https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"
malloc(): invalid size (unsorted)

[21476] signal 6 (-6): Aborted
in expression starting at REPL[2]:1

With the lts Version 1.10.10

julia> using Pkg

julia> Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
     Cloning registry from "https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"
corrupted double-linked list

[1175685] signal (6.-6): Aborted
in expression starting at REPL[2]:1

Install on macos

I can install julia and then add FUSE packages successfully on MacOS.

I am not sure if there is something wrong with my system settings(Ubuntu 22.04).

Thank you for helping me with this, I’ve been stuck on this issue for some time.

This certainly shouldn’t happen and I cannot reproduce it on my Ubuntu 22.04.

To try to narrow it down, do you get the same crash from doing

using LibGit2
LibGit2.clone("https://github.com/ProjectTorreyPines/FuseRegistry.jl.git", "/tmp/fuseregistry")

Does it work to run

git clone https://github.com/ProjectTorreyPines/FuseRegistry.jl.git

in a terminal?

Thank you four your suggestions! It’s really helpful.

When using LibGIt2


julia> using LibGit2

julia> LibGit2.clone("https://github.com/ProjectTorreyPines/FuseRegistry.jl.git", "/tmp/fuseregistry")

[1595214] signal 11 (128): Segmentation fault
in expression starting at REPL[2]:1

It is followed by a blinking cursor…

Later I found that: git clone + web url doesn’t work for me.

user1@dell:Github_projects$ git clone https://github.com/ProjectTorreyPines/FuseRegistry.jl.git
^C
user1@dell:Github_projects$ git clone git@github.com:ProjectTorreyPines/FuseRegistry.jl.git
Cloning into 'FuseRegistry.jl'...
remote: Enumerating objects: 3877, done.
remote: Counting objects: 100% (231/231), done.
remote: Compressing objects: 100% (176/176), done.
remote: Total 3877 (delta 117), reused 142 (delta 52), pack-reused 3646 (from 1)
Receiving objects: 100% (3877/3877), 422.47 KiB | 577.00 KiB/s, done.
Resolving deltas: 100% (2181/2181), done.

Another way failed

julia> using Pkg

julia> pkg"registry add git@github.com:ProjectTorreyPines/FuseRegistry.jl.git"
┌ Warning: attempting to remove probably stale pidfile
│   path = "/home/user1/.julia/registries/.pid"
â”” @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:278
     Cloning registry from "git@github.com:ProjectTorreyPines/FuseRegistry.jl.git"
julia: malloc.c:4122: _int_malloc: Assertion `chunk_main_arena (fwd)' failed.

[1844776] signal 6 (-6): Aborted
in expression starting at REPL[2]:1
Segmentation fault (core dumped)

Add local repo

After cloning FuseRegistry.jl to /home/user1/Github_projects/FuseRegistry.jl

julia> using Pkg

julia> Pkg.Registry.add(RegistrySpec(path="/home/user1/Github_projects/FuseRegistry.jl"))
┌ Warning: attempting to remove probably stale pidfile
│   path = "/home/user1/.julia/registries/.pid"
â”” @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:278
     Copying registry from `~/Github_projects/FuseRegistry.jl`
      Copied registry `FuseRegistry` to `~/.julia/registries/FuseRegistry`

julia> Pkg.Registry.add("General")
       Added `General` registry to ~/.julia/registries

julia> Pkg.add("FUSE")
    Updating registry at `~/.julia/registries/FuseRegistry`
malloc(): smallbin double linked list corrupted

[2121675] signal 6 (-6): Aborted
in expression starting at REPL[4]:1

I am trying to solve the problem that git clone + web url doesn’t work.

I think that’s probably the key to the problem. But the warning when adding local repo is not clear to me.

Any comments and suggestions are welcome, and thank you again.

Update

I can clone with web URL now, but it still failed with

julia> using Pkg

julia> Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
┌ Warning: attempting to remove probably stale pidfile
│   path = "/home/user1/.julia/registries/.pid"
â”” @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:278
     Cloning registry from "https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"
julia: malloc.c:4118: _int_malloc: Assertion `chunk_main_arena (fwd)' failed.

[78668] signal 6 (-6): Aborted
in expression starting at REPL[2]:1


It seems like you have two problems, which may or may not be related.

  1. git clone doesn’t work with https URLs. This could possibly be explained by the existence of a firewall or something being wrong with certificates on your computer. This is outside my competence so I can’t do much more than speculate about it. It definitely doesn’t have anything to do with Julia though.
  2. Julia’s LibGit2 stdlib doesn’t work properly. This is used by default by Pkg for git operations. The crash when trying to clone https could be a rare bug that is triggered by problem 1, but not very likely since it crashes with a git URL too.

For speculative diagnostics, does

julia> filter(x -> contains(first(x), "LD_"), ENV)

return any entries? Never mind, run versioninfo() instead.

You can probably work around problem 2 by setting the environment variable JULIA_PKG_USE_CLI_GIT to true. This will make Pkg use an external git call instead of LibGit2 for some git operations. You will still run into problem 1 though unless you change to a git URL. It’s also somewhat likely that it will again fail to install packages from the local registry due to the https issue. There are workarounds for that too but let’s get back to that if it does turn out to be a problem.

1 Like

What does versioninfo() show? In particular, it will show relevant environment variables. It’s somewhat common to see misuse of dynamic linker-related environment variables like LD_PRELOAD.

1 Like

Thanks for your suggestions!

I have changed my system proxy settings before. After I used git config --global to set up http.proxy and https.proxy.git clone + web url is OK for me now.

git config --global http.proxy Listening IP address : http port
git config --global https.proxy Listening IP address : http port

or

git config --global http.proxy socks5://Listening IP address : SOCKS port
git config --global https.proxy socks5://Listening IP address :SOCKS port

But the strange thing is that I successfully installed it for the first time in the same environment.

After git clone + https URL sucessfully

There are still some problems in Julia, which I don’t quite understand. My understanding is that there are also related settings in Julia that need to be modified. Is this not the case?

After set JULIA_PKG_USE_CLI_GIT = true

LibGit2.clone("https://github.com/ProjectTorreyPines/FuseRegistry.jl.git", "/tmp/fuseregistry") failed.

julia> versioninfo()
Julia Version 1.11.6
Commit 9615af0f269 (2025-07-09 12:58 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 112 Ă— Intel(R) Xeon(R) Gold 6258R CPU @ 2.70GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, cascadelake)
Threads: 1 default, 0 interactive, 1 GC (on 112 virtual cores)
Environment:
  JULIA_PKG_USE_CLI_GIT = true
  LD_LIBRARY_PATH = /home/user1/added_libs:/usr/lib:/lib:/usr/lib/x86_64-linux-gnu/gtk-3.0/modules:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/HDF_Group/HDF5/1.14.4.2/lib:/usr/local/lib:/usr/local/mdsplus/lib:/home/user1/Github_projects/mambaforge/envs/omfit/lib:/home/user1/Github_projects/julia/usr/bin/../lib/

julia> using LibGit2

julia> LibGit2.clone("https://github.com/ProjectTorreyPines/FuseRegistry.jl.git", "/tmp/fuseregistry")
malloc(): smallbin double linked list corrupted

[2167377] signal 6 (-6): Aborted
in expression starting at REPL[3]:1

Thanks for your help!

I just install julia following the tutorial

curl -fsSL https://install.julialang.org | sh

or

curl -fsSL https://install.julialang.org | sh -s -- --default-channel lts

Then, adding packages for FUSE

using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
Pkg.Registry.add("General")
Pkg.add("FUSE")

Outputs for versioninfo()

julia> versioninfo()
Julia Version 1.11.6
Commit 9615af0f269 (2025-07-09 12:58 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 112 Ă— Intel(R) Xeon(R) Gold 6258R CPU @ 2.70GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, cascadelake)
Threads: 1 default, 0 interactive, 1 GC (on 112 virtual cores)
Environment:
  JULIA_PKG_USE_CLI_GIT = true
  LD_LIBRARY_PATH = /home/user1/added_libs:/usr/lib:/lib:/usr/lib/x86_64-linux-gnu/gtk-3.0/modules:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/HDF_Group/HDF5/1.14.4.2/lib:/usr/local/lib:/usr/local/mdsplus/lib:/home/user1/Github_projects/mambaforge/envs/omfit/lib:/home/user1/Github_projects/julia/usr/bin/../lib/

julia> using LibGit2

julia> LibGit2.clone("https://github.com/ProjectTorreyPines/FuseRegistry.jl.git", "/tmp/fuseregistry")
malloc(): smallbin double linked list corrupted

[2167377] signal 6 (-6): Aborted
in expression starting at REPL[3]:1

I only set JULIA_PKG_USE_CLI_GIT = true, to test LibGit2.

Now, my thought is that maybe it has something to do with my proxy settings, see the reply above. I wonder if there is a relevant setting inside julia.

This is the “misuse of dynamic linker-related environment variables”. Just unset that variable and things should work fine. The proper fix is not to set something like that system-wide.

1 Like

THANKS!!!

Although I still don’t understand the internal mechanism. But everything is OK now!

Thank you very much, this problem has stuck a newbie for a while!!