From: "wanabe (_ wanabe) via ruby-core" Date: 2026-09-06T12:20:50+00:00 Subject: [ruby-core:126583] [Ruby Bug#18473] Raw data in Socket::Option#inspect on Amazon Linux 2 Issue #18473 has been updated by wanabe (_ wanabe). Status changed from Open to Third Party's Issue I was able to reproduce the issue using Vagrant, VirtualBox, `bento/ubuntu-18.04`, and Docker. This issue appears to occur with specific combinations of linux kernel versions and Alpine Linux. Therefore, I believe this is a third-party's issue. Alpine on 4.15.0-206: NG ``` $ vagrant ssh -c 'uname -a; printf "require \"socket\"; tcp_server = TCPServer.new(\"127.0.0.1\", 9000); tcp_server.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true); tcp_server.listen 1024; puts tcp_server.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO).inspect; tcp_server.close" > a.rb; sudo docker run --rm -it -v.:/work ruby:3.1.0-alpine3.15 ruby /work/a.rb' Linux vagrant 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux # ``` Debian (bullseye) on 4.15.0-206: OK ``` $ vagrant ssh -c 'uname -a; printf "require \"socket\"; tcp_server = TCPServer.new(\"127.0.0.1\", 9000); tcp_server.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true); tcp_server.listen 1024; puts tcp_server.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO).inspect; tcp_server.close" > a.rb; sudo docker run --rm -it -v.:/work ruby:3.1.0-bullseye ruby /work/a.rb' Linux vagrant 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux # ``` Alpine on 5.4.0-37: OK ``` $ vagrant ssh -c 'uname -a; printf "require \"socket\"; tcp_server = TCPServer.new(\"127.0.0.1\", 9000); tcp_server.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true); tcp_server.listen 1024; puts tcp_server.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO).inspect; tcp_server.close" > a.rb; sudo docker run --rm -it -v.:/work ruby:3.1.0-alpine3.15 ruby /work/a.rb' Linux vagrant 5.4.0-37-generic #41~18.04.1-Ubuntu SMP Mon Jun 8 13:37:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux # ``` Alpine on 5.3.0-76: NG ``` $ vagrant ssh -c 'printf "system \"uname -a\"; require \"socket\"; tcp_server = TCPServer.new(\"127.0.0.1\", 9000); tcp_server.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true); tcp_server.listen 1024; puts tcp_server.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO).inspect; tcp_server.close" > a.rb; sudo docker run --rm -it -v.:/work ruby:3.1.0-alpine3.15 ruby /work/a.rb' Linux d1e29cb69509 5.3.0-76-generic #72-Ubuntu SMP Thu Jul 15 10:51:23 UTC 2021 x86_64 Linux # ``` ---------------------------------------- Bug #18473: Raw data in Socket::Option#inspect on Amazon Linux 2 https://bugs.ruby-lang.org/issues/18473#change-118793 * Author: driv3r (Leszek Zalewski) * Status: Third Party's Issue * ruby -v: ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-linux-musl] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Hello, I found a weird issue when running attached script. Locally on Ubuntu running kernel 5.11, on CI (GitHub Actions) and through docker image (ruby:3.1.0-alpine3.15), the response is as it should be with all data parsed correctly: ``` ruby # ``` The issue happens when running exactly the same docker image on AWS Fargate, where instead of expected output above, we get ```ruby "#" ``` After further testing even simple EC2 with Amazon Linux 2 @4.14 kernel gives same output, 5.10 works fine. Steps to reproduce: - boot up EC2 instance with Amazon Linux v2 @ kernel 4.14 (no idea how to run it locally, I might assist if needed) - install docker ```bash sudo yum install docker sudo systemctl start docker.service sudo docker run -it ruby:3.1.0-alpine3.15 ``` - execute the attached script ---Files-------------------------------- test.rb (246 Bytes) -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/