<p dir="auto">While trying to find a solution to a behind a proxy situation, I stumbled over this <code class="notranslate">fatal: error thrown and no exception handler available.</code> followed by a crash, happening on Julia 0.6 with a three weeks old master and todays master.</p>
<p dir="auto">Reproducible by setting the environment variables <code class="notranslate">SSL_CERT_DIR</code> or <code class="notranslate">SSL_CERT_FILE</code> to a wrong destination and launching Julia:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ SSL_CERT_DIR=/tmp julia-dev
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException(&quot;error initializing LibGit2 module&quot;))
rec_backtrace at /home/mjw/src/julia-master/src/stackwalk.c:84
record_backtrace at /home/mjw/src/julia-master/src/task.c:239
jl_throw at /home/mjw/src/julia-master/src/task.c:565
__init__ at ./libgit2/libgit2.jl:800
unknown function (ip: 0x7f822f986268)
jl_call_fptr_internal at /home/mjw/src/julia-master/src/julia_internal.h:326 [inlined]
jl_call_method_internal at /home/mjw/src/julia-master/src/julia_internal.h:345 [inlined]
jl_apply_generic at /home/mjw/src/julia-master/src/gf.c:1913
jl_apply at /home/mjw/src/julia-master/src/julia.h:1416 [inlined]
jl_module_run_initializer at /home/mjw/src/julia-master/src/toplevel.c:85
_julia_init at /home/mjw/src/julia-master/src/init.c:704
julia_init at /home/mjw/src/julia-master/src/task.c:292
main at /home/mjw/src/julia-master/ui/repl.c:259
__libc_start_main at /build/glibc-9tT8Do/glibc-2.23/csu/../csu/libc-start.c:291
unknown function (ip: 0x4016b8)"><pre class="notranslate"><code class="notranslate">$ SSL_CERT_DIR=/tmp julia-dev
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException("error initializing LibGit2 module"))
rec_backtrace at /home/mjw/src/julia-master/src/stackwalk.c:84
record_backtrace at /home/mjw/src/julia-master/src/task.c:239
jl_throw at /home/mjw/src/julia-master/src/task.c:565
__init__ at ./libgit2/libgit2.jl:800
unknown function (ip: 0x7f822f986268)
jl_call_fptr_internal at /home/mjw/src/julia-master/src/julia_internal.h:326 [inlined]
jl_call_method_internal at /home/mjw/src/julia-master/src/julia_internal.h:345 [inlined]
jl_apply_generic at /home/mjw/src/julia-master/src/gf.c:1913
jl_apply at /home/mjw/src/julia-master/src/julia.h:1416 [inlined]
jl_module_run_initializer at /home/mjw/src/julia-master/src/toplevel.c:85
_julia_init at /home/mjw/src/julia-master/src/init.c:704
julia_init at /home/mjw/src/julia-master/src/task.c:292
main at /home/mjw/src/julia-master/ui/repl.c:259
__libc_start_main at /build/glibc-9tT8Do/glibc-2.23/csu/../csu/libc-start.c:291
unknown function (ip: 0x4016b8)
</code></pre></div>
<p dir="auto">Also, same issue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ SSL_CERT_FILE=/tmp julia-dev
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException(&quot;error initializing LibGit2 module&quot;))
rec_backtrace at /home/mjw/src/julia-master/src/stackwalk.c:84
record_backtrace at /home/mjw/src/julia-master/src/task.c:239
jl_throw at /home/mjw/src/julia-master/src/task.c:565
__init__ at ./libgit2/libgit2.jl:800
unknown function (ip: 0x7f81d8082268)
jl_call_fptr_internal at /home/mjw/src/julia-master/src/julia_internal.h:326 [inlined]
jl_call_method_internal at /home/mjw/src/julia-master/src/julia_internal.h:345 [inlined]
jl_apply_generic at /home/mjw/src/julia-master/src/gf.c:1913
jl_apply at /home/mjw/src/julia-master/src/julia.h:1416 [inlined]
jl_module_run_initializer at /home/mjw/src/julia-master/src/toplevel.c:85
_julia_init at /home/mjw/src/julia-master/src/init.c:704
julia_init at /home/mjw/src/julia-master/src/task.c:292
main at /home/mjw/src/julia-master/ui/repl.c:259
__libc_start_main at /build/glibc-9tT8Do/glibc-2.23/csu/../csu/libc-start.c:291
unknown function (ip: 0x4016b8)"><pre class="notranslate"><code class="notranslate">$ SSL_CERT_FILE=/tmp julia-dev
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException("error initializing LibGit2 module"))
rec_backtrace at /home/mjw/src/julia-master/src/stackwalk.c:84
record_backtrace at /home/mjw/src/julia-master/src/task.c:239
jl_throw at /home/mjw/src/julia-master/src/task.c:565
__init__ at ./libgit2/libgit2.jl:800
unknown function (ip: 0x7f81d8082268)
jl_call_fptr_internal at /home/mjw/src/julia-master/src/julia_internal.h:326 [inlined]
jl_call_method_internal at /home/mjw/src/julia-master/src/julia_internal.h:345 [inlined]
jl_apply_generic at /home/mjw/src/julia-master/src/gf.c:1913
jl_apply at /home/mjw/src/julia-master/src/julia.h:1416 [inlined]
jl_module_run_initializer at /home/mjw/src/julia-master/src/toplevel.c:85
_julia_init at /home/mjw/src/julia-master/src/init.c:704
julia_init at /home/mjw/src/julia-master/src/task.c:292
main at /home/mjw/src/julia-master/ui/repl.c:259
__libc_start_main at /build/glibc-9tT8Do/glibc-2.23/csu/../csu/libc-start.c:291
unknown function (ip: 0x4016b8)
</code></pre></div>
<p dir="auto">It appears that broken symlinks within the SSL_CERT_DIR can cause Julia to raise an exception during startup:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ mkdir /tmp/certs
$ cd /tmp/certs
$ ln -s bar foo
$ ln -s /doesnotexist bar
$ SSL_CERT_DIR=/tmp/certs julia  # Julia 0.6
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException(&quot;error initializing LibGit2 module&quot;))
rec_backtrace at /home/centos/buildbot/slave/package_tarball64/build/src/stackwalk.c:84
record_backtrace at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:239
jl_throw at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:565
__init__ at ./libgit2/libgit2.jl:669
unknown function (ip: 0x7f0b84fc7a88)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:248 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:2217
jl_apply at /home/centos/buildbot/slave/package_tarball64/build/src/julia.h:1411 [inlined]
jl_module_run_initializer at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:85
_julia_init at /home/centos/buildbot/slave/package_tarball64/build/src/init.c:704
julia_init at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:292
unknown function (ip: 0x401656)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x40170c)"><pre class="notranslate">$ mkdir /tmp/certs
$ <span class="pl-c1">cd</span> /tmp/certs
$ ln -s bar foo
$ ln -s /doesnotexist bar
$ SSL_CERT_DIR=/tmp/certs julia  <span class="pl-c"><span class="pl-c">#</span> Julia 0.6</span>
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException(<span class="pl-s"><span class="pl-pds">"</span>error initializing LibGit2 module<span class="pl-pds">"</span></span>))
rec_backtrace at /home/centos/buildbot/slave/package_tarball64/build/src/stackwalk.c:84
record_backtrace at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:239
jl_throw at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:565
__init__ at ./libgit2/libgit2.jl:669
unknown <span class="pl-k">function</span> <span class="pl-en">(ip:</span> 0x7f0b84fc7a88)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:248 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:2217
jl_apply at /home/centos/buildbot/slave/package_tarball64/build/src/julia.h:1411 [inlined]
jl_module_run_initializer at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:85
_julia_init at /home/centos/buildbot/slave/package_tarball64/build/src/init.c:704
julia_init at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:292
unknown <span class="pl-k">function</span> <span class="pl-en">(ip:</span> 0x401656)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown <span class="pl-k">function</span> <span class="pl-en">(ip:</span> 0x40170c)</pre></div>
<p dir="auto">Note that the paths in the exception above appear to be from the official build server as I encountered this in a Debian environment.</p>
<p dir="auto">versioninfo:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.6.0-dev.2499
Commit cdca71b (2017-02-01 15:33 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)"><pre class="notranslate"><code class="notranslate">Julia Version 0.6.0-dev.2499
Commit cdca71b (2017-02-01 15:33 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
</code></pre></div>