Open ValentinoRusconi-EH opened 1 year ago
Seeing this on macOS 13.4 (22F66). Intel. Ruby 2.7.6 and ruby 3.2.2. curl 7.88.1
Same here; macOS 13.4.1 (22F82) M1. Ruby 3.0.3.
We we're facing this segfault using chewy. Until a solution is found we patched the net adapter like so:
Chewy.settings = {
host: 'localhost:9200'
}.tap do |config|
config[:transport_options] = {
proc: ->(f) { f.adapter :net_http }
}
end
not recommended to use it in prod.
I started getting this only after updating my system to macOS 13.5 (22G74)
(from 13.4
), M1, Ruby 3.2.2
Notably it only seems to happen (or at least I've only caught it) when running our test suite.
When I disable parallelization entirely (config.active_support.test_parallelization_threshold = some_arbitrarily_high_value
) I do not encounter this crash, of course.
Same issue here. I have just migrated from an Intel Mac to an M2 and been facing this issue. Updating ethon to 0.16.0
which used to be the solution doesn't seem to be working anymore.
Ruby 2.7.6 Ventura 13.5
I'm experiencing the same crash on M2 Mac using native ARM architecture when running the code in Resque, which forks the process for every job.
-- Control frame information -----------------------------------------------
c:0077 p:---- s:0408 e:000407 CFUNC :easy_perform
c:0076 p:0062 s:0403 E:000390 METHOD /Users/timherby/.rvm/gems/ruby-2.7.7/gems/ethon-0.16.0/lib/ethon/easy/operations.rb:30
I originally thought it was due to ethon/curls/functions.rb
and ethon/curls/settings.rb
getting initialized, but I have confirmed it still happens even if I use require:false
for both Typhoeus and Ethon and they are not loaded in the parent process (also confirmed).
I've also reinstalled curl, ffi, libffi, and openssl, with no luck, it's still crashing. I've linked the thread above where I'm looking to abandon the use of Typhoeus and Ethon as it appears there is no energy behind fixing these segmentation faults that are plaguing the library on new macs: https://github.com/search?q=repo%3Atyphoeus%2Fethon+Segmentation+Fault&type=issues
I'd love to help troubleshoot if anyone wants to reach out and collaborate on this.
Not sure if this would help anyone else. I was running into segfaults in this way as well, while trying to run it from MacOS Monterey using the Apple M1 Pro chip. I discovered that if I changed my puma settings to run in standalone mode (PUMA_WORKERS=0
) the application would run without issues. Clearly, not a solution to the problem, but at least a workaround for testing and debugging purposes. In my team other people told me they have build ruby using Rosetta and that has solved the issue for them as well.
Seeing this on macOS 14.1.1 (23B81). Intel. Ruby 3.2.2, curl 8.4.0
➜ curl --version
curl 8.4.0 (x86_64-apple-darwin23.0.0) libcurl/8.4.0 (SecureTransport) OpenSSL/3.2.0 zlib/1.2.12 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libssh2/1.11.0 nghttp2/1.58.0 librtmp/2.3 OpenLDAP/2.6.6
Release-Date: 2023-10-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
Disabling Spring: DISABLE_SPRING=true
solved it for me.
I'm also seeing the issue on macOS 13.6.1 (22G313), Ruby 3.2.2 and curl 8.4.0. This is an Intel Mac, so I don't think this issue is exclusive to M1.
Same here: macOS M1 Sonoma 14.1.2, Ruby 3.2.2 and Curl 8.1.2 (x86_64-apple-darwin23.0)
My issues are on Alpine with docker rather than Mac. Try:
bundle config build.ffi --enable-libffi-alloc
gem 'ffi', github: 'ffi/ffi', submodules: true, force_ruby_platform: true
Hi Folks, Is there any work going on to fix the issue or any workaround for it? As I am also facing the same issue, for Ruby version 2.5.8 and Rails 5.0.7 with Ubuntu 22.04.3 LTS.
Seeing this in Ubuntu 24.04 with Ruby 2.7.8 and ethon 0.16.0 Not seeing any commits on this project for nearly a year and a half so I guess we're stuffed on this issue. Hopefully updating Ruby will sort it, although some of the comments above suggest it might not.
Facing same issue in Ubuntu 22.04.4 LTS (GNU/Linux x86_64) with Ruby 2.7.8 and ethon 0.16.0
ethon-0.16.0/lib/ethon/easy/operations.rb:30: [BUG] Segmentation fault at 0x00007ad7ebef3140
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0041 p:---- s:0252 e:000251 CFUNC :easy_perform
My issues are on Alpine with docker rather than Mac. Try:
bundle config build.ffi --enable-libffi-alloc
- ffi newest release with forced build:
gem 'ffi', github: 'ffi/ffi', submodules: true, force_ruby_platform: true
- the ethon branch/PR related to thread safe easy handle cleaup
This could be your solution, as it was mine. Otherwise, you can also try moving from Ruby 2.7.8 to Ruby 3.
I get the following seg fault:
Chip: Apple M2 Max OS: Ventura 13.4.1