Actions
Bug #18473
openRaw data in Socket::Option#inspect on Amazon Linux 2
Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-linux-musl]
Description
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:
#<Socket::Option: INET TCP INFO state=LISTEN ca_state=Open retransmits=0 probes=0 backoff=0 options=0 rto=0.000000s ato=0.000000s snd_mss=0 rcv_mss=0 unacked=0 sacked=1024 lost=0 retrans=0 fackets=0 last_data_sent=0.000s last_ack_sent=0.000s last_data_recv=0.000s last_ack_recv=0.000s pmtu=0 rcv_ssthresh=0 rtt=0.000000s rttvar=0.000000s snd_ssthresh=0 snd_cwnd=10 advmss=0 reordering=3 rcv_rtt=0.000000s rcv_space=0 total_retrans=0 (128 bytes too long)>
The issue happens when running exactly the same docker image on AWS Fargate, where instead of expected output above, we get
"#<Socket::Option: INET TCP INFO \"\\n\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\n\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x03\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\">"
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
sudo yum install docker sudo systemctl start docker.service sudo docker run -it ruby:3.1.0-alpine3.15
- execute the attached script
Files
Actions
Like0
Like0