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

**URL:** <https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [July 11, 2025, 3:14am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629 "2025-07-11T03:14:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolaireZ](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SolaireZ](https://discourse.julialang.org/u/SolaireZ)\
**Post date:** [July 11, 2025, 3:14am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/1 "2025-07-11T03:14:23Z")

</div>

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

```julia-auto
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-auto
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-auto
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-auto
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.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [July 11, 2025, 7:17am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/2 "2025-07-11T07:17:02Z")

</div>

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

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

```

Does it work to run

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

```

in a terminal?

---

<div class="post-metadata">

**Author:** ![SolaireZ](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SolaireZ](https://discourse.julialang.org/u/SolaireZ)\
**Post date:** [July 11, 2025, 8:18am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/3 "2025-07-11T08:18:12Z")

</div>

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

### When using LibGIt2

```julia-auto

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.

```julia-auto
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-auto
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-auto
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-auto
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

```

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [July 11, 2025, 8:49am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/4 "2025-07-11T08:49:25Z")

</div>

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
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.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [July 11, 2025, 1:18pm UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/5 "2025-07-11T13:18:06Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![SolaireZ](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SolaireZ](https://discourse.julialang.org/u/SolaireZ)\
**Post date:** [July 12, 2025, 3:25am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/6 "2025-07-12T03:25:06Z")

</div>

> [@A weird issue while adding packages (corrupted double-linked list or Segmentation)](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/4):
>
> It seems like you have two problems, which may or may not be related. 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. Julia’s LibGit2 stdlib doesn’t work properly. This is used by default by Pkg for git operations. The crash when trying to c…

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.

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

```

or

```julia-auto
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-auto
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

```

---

<div class="post-metadata">

**Author:** ![SolaireZ](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SolaireZ](https://discourse.julialang.org/u/SolaireZ)\
**Post date:** [July 12, 2025, 3:35am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/7 "2025-07-12T03:35:30Z")

</div>

> [@nsajko](#):
>
> 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`.

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`

```julia-auto
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-auto
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.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [July 12, 2025, 3:38am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/8 "2025-07-12T03:38:13Z")

</div>

> [@SolaireZ](#):
>
> ```none
> 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/
> 
> ```

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.

---

<div class="post-metadata">

**Author:** ![SolaireZ](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SolaireZ](https://discourse.julialang.org/u/SolaireZ)\
**Post date:** [July 12, 2025, 3:59am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/9 "2025-07-12T03:59:23Z")

</div>

> [@nsajko](#):
>
> 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.

THANKS!!!

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

> **[@nsajko](https://discourse.julialang.org/u/nsajko/summary)**

> **[@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback/summary)**

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

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [July 12, 2025, 6:47am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/10 "2025-07-12T06:47:32Z")

</div>

> [@SolaireZ](#):
>
> I only set JULIA\_PKG\_USE\_CLI\_GIT = true, to test `LibGit2`

To clarify on this, the idea of setting `JULIA_PKG_USE_CLI_GIT` is to make Pkg **not** use LibGit2 for cloning and updating. I.e. this can be used as a workaround for LibGit2 problems and shortcomings but not for testing LibGit2.

---

<div class="post-metadata">

**Author:** ![SolaireZ](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SolaireZ](https://discourse.julialang.org/u/SolaireZ)\
**Post date:** [July 12, 2025, 7:38am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/11 "2025-07-12T07:38:08Z")

</div>

> [@GunnarFarneback](#):
>
> To clarify on this, the idea of setting `JULIA_PKG_USE_CLI_GIT` is to make Pkg **not** use LibGit2 for cloning and updating. I.e. this can be used as a workaround for LibGit2 problems and shortcomings but not for testing LibGit2.

OK. Thank you for clarifying this! Your explanation really helpe me understand the role of LibGit2 better.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [July 12, 2025, 9:51am UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/12 "2025-07-12T09:51:43Z")

</div>

> [@SolaireZ](#):
>
> Although I still don’t understand the internal mechanism.

The TLDR is that setting these enviroment variables changes code that is loaded. Thus it changes code that is run. Obviously that can result in anything, including a crash, happening. See the dynamic linker manual here for an authoritative reference:

- [https://man.archlinux.org/man/core/man-pages/ld.so.8.en](https://man.archlinux.org/man/core/man-pages/ld.so.8.en)

---

<div class="post-metadata">

**Author:** ![SolaireZ](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SolaireZ](https://discourse.julialang.org/u/SolaireZ)\
**Post date:** [July 12, 2025, 2:58pm UTC](https://discourse.julialang.org/t/a-weird-issue-while-adding-packages-corrupted-double-linked-list-or-segmentation/130629/13 "2025-07-12T14:58:31Z")

</div>

> [@nsajko](#):
>
> The TLDR is that setting these enviroment variables changes code that is loaded. Thus it changes code that is run. Obviously that can result in anything, including a crash, happening. See the dynamic linker manual here for a authoritative reference:

Thank you for sharing this! This is impactful for me and I think I will set these environment variables more reasonably and cautiously in the future.
