Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread 0 Crashes on M1 chip (MacOS Big Sur 13.1) #646

Closed
jamogriff opened this issue Jul 2, 2021 · 5 comments
Closed

Thread 0 Crashes on M1 chip (MacOS Big Sur 13.1) #646

jamogriff opened this issue Jul 2, 2021 · 5 comments

Comments

@jamogriff
Copy link

Issue: After running bundle exec htmlproofer ./_site using Ruby 2.7.2 on a Jekyll build the program crashes:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x0000000185134e78 __pthread_kill + 8
1   libsystem_pthread.dylib       	0x0000000185166b98 pthread_kill + 292
2   libsystem_c.dylib             	0x00000001850af460 abort + 104
3   libruby.2.7.dylib             	0x0000000104c9499c die + 12
4   libruby.2.7.dylib             	0x0000000104c94b78 rb_bug_for_fatal_signal + 476
5   libruby.2.7.dylib             	0x0000000104da5904 sigsegv + 96
6   libsystem_platform.dylib      	0x00000001851b1c44 _sigtramp + 56
7   libsystem_c.dylib             	0x000000018508be84 strdup + 28
8   libcurl.4.dylib               	0x00000001971a3be0 Curl_setstropt + 76
9   libcurl.4.dylib               	0x00000001971a59d8 curl_easy_setopt + 7584
10  libffi.dylib                  	0x0000000191ff8050 ffi_call_SYSV + 80
11  libffi.dylib                  	0x00000001920009e4 ffi_call_int + 948
12  ffi_c.bundle                  	0x0000000106c1ef08 rbffi_CallFunction + 252 (Call.c:401)
13  ffi_c.bundle                  	0x0000000106c225c0 attached_method_invoke + 44 (MethodHandle.c:174)
14  libffi.dylib                  	0x0000000192000e20 ffi_closure_SYSV_inner + 804
15  libffi.dylib                  	0x0000000191ff81e8 ffi_closure_SYSV + 56
16  libruby.2.7.dylib             	0x0000000104e2678c vm_call_cfunc + 264
17  libruby.2.7.dylib             	0x0000000104e2733c vm_call_opt_send + 656
18  libruby.2.7.dylib             	0x0000000104e0ee6c vm_exec_core + 12656
19  libruby.2.7.dylib             	0x0000000104e21fc0 rb_vm_exec + 2392
20  libruby.2.7.dylib             	0x0000000104e1b548 rb_yield + 184
21  libruby.2.7.dylib             	0x0000000104c0fde8 rb_ary_each + 48
22  libruby.2.7.dylib             	0x0000000104e2678c vm_call_cfunc + 264
23  libruby.2.7.dylib             	0x0000000104e0ed24 vm_exec_core + 12328
24  libruby.2.7.dylib             	0x0000000104e21fc0 rb_vm_exec + 2392
25  libruby.2.7.dylib             	0x0000000104cf2b60 load_iseq_eval + 200
26  libruby.2.7.dylib             	0x0000000104cf20c8 rb_f_load + 280
27  libruby.2.7.dylib             	0x0000000104e2678c vm_call_cfunc + 264
28  libruby.2.7.dylib             	0x0000000104e0ee6c vm_exec_core + 12656
29  libruby.2.7.dylib             	0x0000000104e21fc0 rb_vm_exec + 2392
30  libruby.2.7.dylib             	0x0000000104cf2b60 load_iseq_eval + 200
31  libruby.2.7.dylib             	0x0000000104cf20c8 rb_f_load + 280
32  libruby.2.7.dylib             	0x0000000104e2678c vm_call_cfunc + 264
33  libruby.2.7.dylib             	0x0000000104e0ee6c vm_exec_core + 12656
34  libruby.2.7.dylib             	0x0000000104e21fc0 rb_vm_exec + 2392
35  libruby.2.7.dylib             	0x0000000104cf2b60 load_iseq_eval + 200
36  libruby.2.7.dylib             	0x0000000104cf20c8 rb_f_load + 280
37  libruby.2.7.dylib             	0x0000000104e2678c vm_call_cfunc + 264
38  libruby.2.7.dylib             	0x0000000104e0ee6c vm_exec_core + 12656
39  libruby.2.7.dylib             	0x0000000104e21fc0 rb_vm_exec + 2392
40  libruby.2.7.dylib             	0x0000000104c9f668 rb_ec_exec_node + 164
41  libruby.2.7.dylib             	0x0000000104c9f564 ruby_run_node + 100
42  ruby                          	0x00000001049d3ecc main + 92
43  libdyld.dylib                 	0x0000000185184420 start + 4

Information pertaining specifically to ARM thread state at crash:

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000507   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x000000016b42db10
    x8: 0x262c1b7f891616cc   x9: 0x262c1b7e8dadeb8c  x10: 0x0000000000003ffe  x11: 0x00000001fbddd702
   x12: 0x00000001fbddd702  x13: 0x000000000000001e  x14: 0x0000000000000881  x15: 0x000000008000001f
   x16: 0x0000000000000148  x17: 0x00000001f3916e90  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000104bbfd40  x21: 0x0000000000000103  x22: 0x0000000104bbfe20  x23: 0x0000000104ed89a1
   x24: 0x00000001510d8bf0  x25: 0x0000000000000068  x26: 0x0000000000000003  x27: 0x0000000000000003
   x28: 0x000000016b42daf0   fp: 0x00000001510d8b70   lr: 0x0000000185166b98
    sp: 0x00000001510d8b50   pc: 0x0000000185134e78 cpsr: 0x40000000
   far: 0x0000000150264000  esr: 0x56000080

I'll use a different testing framework at this time, but wanted to post this bug report just to document this issue.

@gjtorikian
Copy link
Owner

Is this reproducible/consistent, or just happens every so often?

@jamogriff
Copy link
Author

Happens every time when the htmlproofer command is run. Here's what pops up after running the command; it might help because it references a dependent gem (Ethon):

Running ["LinkCheck", "ImageCheck", "ScriptCheck"] on ["./_site"] on *.html...

Checking 14 external links...
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/options.rb:103: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [arm64-darwin20]

@jamogriff
Copy link
Author

Here's the full Ruby backtrace as well:

-- Ruby level backtrace information ----------------------------------------
/Users/***/.rbenv/versions/2.7.2/bin/bundle:23:in `<main>'
/Users/***/.rbenv/versions/2.7.2/bin/bundle:23:in `load'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/exe/bundle:37:in `<top (required)>'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/exe/bundle:49:in `block in <top (required)>'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:24:in `start'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:30:in `dispatch'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli.rb:494:in `exec'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:28:in `run'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Users/***/.gem/ruby/2.7.0/gems/bundler-2.2.5/lib/bundler/cli/exec.rb:63:in `load'
/Users/***/.rbenv/versions/2.7.2/bin/htmlproofer:23:in `<top (required)>'
/Users/***/.rbenv/versions/2.7.2/bin/htmlproofer:23:in `load'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/html-proofer-3.19.2/bin/htmlproofer:11:in `<top (required)>'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/html-proofer-3.19.2/bin/htmlproofer:111:in `block (2 levels) in <top (required)>'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/html-proofer-3.19.2/lib/html-proofer/runner.rb:48:in `run'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/html-proofer-3.19.2/lib/html-proofer/runner.rb:88:in `check_files'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/html-proofer-3.19.2/lib/html-proofer/runner.rb:143:in `validate_external_urls'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/html-proofer-3.19.2/lib/html-proofer/url_validator.rb:33:in `run'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/html-proofer-3.19.2/lib/html-proofer/url_validator.rb:99:in `external_link_checker'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/memoizable.rb:51:in `run'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/runnable.rb:14:in `run'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/queueable.rb:77:in `dequeue_many'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/before.rb:27:in `add'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/stubbable.rb:23:in `add'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/block_connection.rb:30:in `add'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/cacheable.rb:10:in `add'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/memoizable.rb:41:in `add'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/addable.rb:19:in `add'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/easy_factory.rb:81:in `get'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/easy/http.rb:39:in `http_request'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/easy/http/head.rb:17:in `setup'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/easy/http/actionable.rb:104:in `setup'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/easy/options.rb:11:in `url='
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/options.rb:103:in `set_option'
/Users/***/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/options.rb:103:in `easy_setopt_string'

@gjtorikian
Copy link
Owner

Try running bundle update ethon—it seems this issue was fixed in v0.13.0. Let me know if that solves it.

@jamogriff
Copy link
Author

Nice! Updating ethon worked perfectly. Thanks for debugging that outside of the scope of your gem; I appreciate it. Feel free to close this issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants