Skip to content

Possible unpacking issue on current 9.3.0.0 with arm64 arch #6821

@KazkiMatz

Description

@KazkiMatz

Environment Information

Provide at least:

# ruby -v
jruby 9.3.0.0-SNAPSHOT (2.6.8) 2021-09-08 1420b569ca OpenJDK 64-Bit Server VM 25.292-b10 on 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10 +jit [linux-aarch64]
# uname -a
Linux 230774719ef0 5.10.47-linuxkit #1 SMP PREEMPT Sat Jul 3 21:50:16 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Other relevant info you may wish to add:

  • Running on Docker Desktop on M1 Mac

Expected Behavior

Puma serves request with minimum Sinatra setup.
Edit:
BasicSocket#getsockopt should return a Socket::Option instance with non-empty byte string inside

Actual Behavior

Puma crashes while handing requests.

* Listening on http://0.0.0.0:4567
Use Ctrl-C to stop
2021-09-10 15:16:57 +0000 Read: #<NoMethodError: undefined method `>=' for nil:NilClass>

Edit:
BasicSocket#getsockopt returns a Socket::Option instance with zero-length byte string inside

The gist below describes steps to reproduce the Puma error caused by this issue:
https://gist.github.com/KazkiMatz/6f33aeb1b803a77fd246716c1985338b

https://github.com/puma/puma/blob/master/lib/puma/server.rb#L183
on L183, tcp_info.unpack(UNPACK_TCP_STATE_FROM_TCP_INFO) returns [nil] that makes state as nil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions