jekyll: Jekyll 4.2.1 : Crashes on site generation (segmentation fault)

My Environment

The jekyll doctor output:

jekyll doctor
/usr/lib/ruby/3.0.0/fileutils.rb:105: warning: already initialized constant FileUtils::VERSION
/home/john/.gem/ruby/3.0.0/gems/fileutils-1.6.0/lib/fileutils.rb:105: warning: previous definition of VERSION was here
/usr/lib/ruby/3.0.0/fileutils.rb:1284: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/home/john/.gem/ruby/3.0.0/gems/fileutils-1.6.0/lib/fileutils.rb:1269: warning: previous definition of S_IF_DOOR was here
/usr/lib/ruby/3.0.0/fileutils.rb:1577: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/home/john/.gem/ruby/3.0.0/gems/fileutils-1.6.0/lib/fileutils.rb:1557: warning: previous definition of DIRECTORY_TERM was here
/usr/lib/ruby/3.0.0/fileutils.rb:1635: warning: already initialized constant FileUtils::OPT_TABLE
/home/john/.gem/ruby/3.0.0/gems/fileutils-1.6.0/lib/fileutils.rb:1615: warning: previous definition of OPT_TABLE was here
/usr/lib/ruby/3.0.0/fileutils.rb:1694: warning: already initialized constant FileUtils::LOW_METHODS
/home/john/.gem/ruby/3.0.0/gems/fileutils-1.6.0/lib/fileutils.rb:1674: warning: previous definition of LOW_METHODS was here
/usr/lib/ruby/3.0.0/fileutils.rb:1701: warning: already initialized constant FileUtils::METHODS
/home/john/.gem/ruby/3.0.0/gems/fileutils-1.6.0/lib/fileutils.rb:1681: warning: previous definition of METHODS was here
/usr/lib/ruby/3.0.0/x86_64-linux/strscan.so: warning: already initialized constant StringScanner::Version
/usr/lib/ruby/3.0.0/x86_64-linux/strscan.so: warning: already initialized constant StringScanner::Id
Configuration file: /home/john/Projects/lyricall/_config.yml
Software Version(s)
Operating System Arch linux
jekyll 4.2.1
github-pages None(use my ownserver )

Expected Behavior

Generate static sites

Current Behavior

when I run bundle exec jekyll serve --trace --port 4000 in my jekyll project directory as usual, I get this:

First I get some information about PATHs:

/usr/lib/ruby/3.0.0/pathname.rb:20: warning: already initialized constant Pathname::TO_PATH
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:20: warning: previous definition of TO_PATH was here
/usr/lib/ruby/3.0.0/pathname.rb:22: warning: already initialized constant Pathname::SAME_PATHS
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:22: warning: previous definition of SAME_PATHS was here
/usr/lib/ruby/3.0.0/pathname.rb:34: warning: already initialized constant Pathname::SEPARATOR_LIST
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:34: warning: previous definition of SEPARATOR_LIST was here
/usr/lib/ruby/3.0.0/pathname.rb:35: warning: already initialized constant Pathname::SEPARATOR_PAT
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:35: warning: previous definition of SEPARATOR_PAT was here
/usr/lib/ruby/3.0.0/pathname.rb:41: warning: already initialized constant Pathname::ABSOLUTE_PATH
/home/john/.gem/ruby/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:41: warning: previous definition of ABSOLUTE_PATH was here

Then I get error message:

bundler: failed to load command: jekyll (/home/john/.gem/ruby/3.0.0/bin/jekyll)
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58: [BUG] Segmentation fault at 0x0000000000000008
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]

After that I get these blocks of logs:

-- Control frame information -----------------------------------------------
c:0014 p:---- s:0068 e:000067 CFUNC  :pwd
c:0013 p:0012 s:0064 e:000063 BLOCK  /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58 [FINISH]
c:0012 p:---- s:0061 e:000060 CFUNC  :synchronize
c:0011 p:0016 s:0057 e:000056 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57
c:0010 p:0023 s:0053 e:000051 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:253
c:0009 p:0006 s:0044 e:000043 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:144
c:0008 p:0015 s:0038 e:000037 RESCUE /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26
c:0007 p:0024 s:0034 e:000032 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26
c:0006 p:0109 s:0028 e:000027 BLOCK  /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:49
c:0005 p:0014 s:0022 e:000021 METHOD /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/friendly_errors.rb:128
c:0004 p:0162 s:0017 E:000eb8 TOP    /home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:37 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC  :load
c:0002 p:0112 s:0008 E:0004b0 EVAL   /home/john/.gem/ruby/3.0.0/bin/bundle:23 [FINISH]
c:0001 p:0000 s:0003 E:002070 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/home/john/.gem/ruby/3.0.0/bin/bundle:23:in `<main>'
/home/john/.gem/ruby/3.0.0/bin/bundle:23:in `load'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:37:in `<top (required)>'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/exe/bundle:49:in `block in <top (required)>'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26:in `start'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/cli.rb:26:in `ensure in start'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:144:in `print_major_deprecations!'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:253:in `search_up'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57:in `pwd'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:57:in `synchronize'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58:in `block in pwd'
/home/john/.gem/ruby/3.0.0/gems/bundler-2.2.22/lib/bundler/shared_helpers.rb:58:in `pwd'

-- Machine register context ------------------------------------------------
 RIP: 0x00007f364880b478 RBP: 0x00005571417f9b78 RSP: 0x00007fff0c21e780
 RAX: 0x0000000000000001 RBX: 0x0000000000000000 RCX: 0x0000000000000000
 RDX: 0x0000000000000000 RDI: 0x0000000000000000 RSI: 0x0000000000000000
  R8: 0x000000000000000f  R9: 0x00007fff0c21e7a0 R10: 0x0000000055550083
 R11: 0x0000000000000000 R12: 0x00005571418b9ab0 R13: 0x00007fff0c21e7a0
 R14: 0x0000000000000000 R15: 0x0000000000000000 EFL: 0x0000000000010202

-- C level backtrace information -------------------------------------------
/usr/lib/libruby.so.3.0(0x7f36488297c4) [0x7f36488297c4]
/usr/lib/libruby.so.3.0(0x7f364867c5f2) [0x7f364867c5f2]
/usr/lib/libruby.so.3.0(0x7f364879e7da) [0x7f364879e7da]
/usr/lib/libc.so.6(__restore_rt+0x0) [0x7f3648447da0]
/usr/lib/libruby.so.3.0(0x7f364880b478) [0x7f364880b478]
/usr/lib/libruby.so.3.0(0x7f364880ba3a) [0x7f364880ba3a]
/usr/lib/libruby.so.3.0(rb_funcallv+0x20b) [0x7f364882112b]
/usr/lib/ruby/3.0.0/x86_64-linux/pathname.so(0x7f36489772f4) [0x7f36489772f4]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813bd4) [0x7f3648813bd4]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(rb_yield_values2+0x64) [0x7f364881cee4]
/usr/lib/libruby.so.3.0(rb_ensure+0x113) [0x7f3648683c23]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813c31) [0x7f3648813c31]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(0x7f36486ceef6) [0x7f36486ceef6]
/usr/lib/libruby.so.3.0(0x7f36486cff17) [0x7f36486cff17]
/usr/lib/libruby.so.3.0(0x7f36488080cf) [0x7f36488080cf]
/usr/lib/libruby.so.3.0(0x7f3648810f96) [0x7f3648810f96]
/usr/lib/libruby.so.3.0(0x7f3648813bd4) [0x7f3648813bd4]
/usr/lib/libruby.so.3.0(rb_vm_exec+0x1e2) [0x7f3648818da2]
/usr/lib/libruby.so.3.0(0x7f3648682422) [0x7f3648682422]
/usr/lib/libruby.so.3.0(ruby_run_node+0x58) [0x7f3648685e08]
/home/john/.gem/ruby/3.0.0/bin/jekyll serve --trace --port 4000(0x55713f865081) [0x55713f865081]
/usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f3648432b25]
/home/john/.gem/ruby/3.0.0/bin/jekyll serve --trace --port 4000(_start+0x2e) [0x55713f8650ce]

After this there is gigantic list of libraries and modules ruby uses (snipped because it is over 300 lines):

-- Other runtime information -----------------------------------------------

* Loaded script: /home/john/.gem/ruby/3.0.0/bin/jekyll

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 ruby2_keywords.rb
    5 /usr/lib/ruby/3.0.0/x86_64-linux/enc/encdb.so
    6 /usr/lib/ruby/3.0.0/x86_64-linux/enc/trans/transdb.so
    7 /usr/lib/ruby/3.0.0/x86_64-linux/rbconfig.rb
    8 /usr/lib/ruby/3.0.0/rubygems/compatibility.rb
    9 /usr/lib/ruby/3.0.0/rubygems/defaults.rb
   10 /usr/lib/ruby/3.0.0/rubygems/deprecate.rb
   11 /usr/lib/ruby/3.0.0/rubygems/errors.rb

...

as a last thing I get Memory map (snipped too):

* Process memory map:

55713f864000-55713f865000 r--p 00000000 103:04 15469920                  /usr/bin/ruby
55713f865000-55713f866000 r-xp 00001000 103:04 15469920                  /usr/bin/ruby
55713f866000-55713f867000 r--p 00002000 103:04 15469920                  /usr/bin/ruby
55713f867000-55713f868000 r--p 00002000 103:04 15469920                  /usr/bin/ruby
55713f868000-55713f869000 rw-p 00003000 103:04 15469920                  /usr/bin/ruby
557141771000-557142b5f000 rw-p 00000000 00:00 0                          [heap]
7f3643ff2000-7f3644200000 r--s 00000000 103:04 15469989                  /usr/lib/libc-2.33.so
7f3644200000-7f364456e000 r--s 00000000 103:04 15469941                  /usr/lib/libruby.so.3.0.2
7f364456e000-7f3644570000 r--p 00000000 103:04 15496948                  /usr/lib/libyaml-0.so.2.0.9
7f3644570000-7f364458a000 r-xp 00002000 103:04 15496948                  /usr/lib/libyaml-0.so.2.0.9
7f364458a000-7f364458e000 r--p 0001c000 103:04 15496948                  /usr/lib/libyaml-0.so.2.0.9
7f364458e000-7f364458f000 r--p 0001f000 103:04 15496948                  /usr/lib/libyaml-0.so.2.0.9
...

last line is termination information:

fish: Job 1, 'bundle exec jekyll serve --trac…' terminated by signal SIGABRT (Abort)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 33 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@Souravgoswami @ashmaroli @kmoschcau The issue is reopened. Sorry for inconvenience.

If this occurs on every invocation of Jekyll commands, you may have to install an older version of Ruby (preferably Ruby 2.7.x). Otherwise, if it was a one-time occurrence that happens on rare occasions, continue with current Ruby installation. The reason being, the provided error report is inconclusive as to what is causing the crash.

Just want to mention: This solved the problem in my case.

rvm install ruby-2.7
rvm use 2.7.2 --default
gem update
gem install bundler jekyll
bundle install
bundle exec jekyll serve

Bundler is now able to resolve it, but it still core dumps with pathname 0.2.0 and gives the same error without it.

I don’t remember a version clash resulting in seg faults before, but I can try that tomorrow.