Skip to content

method `session_new_cb' called on hidden T_DATA object (NotImplementedError) #464

@casperisfine

Description

@casperisfine

A weird error that happened once in production.

Ruby 3.0.2 (linux)

Full backtrace:

/usr/local/ruby/lib/ruby/3.0.0/openssl/buffering.rb:205:in `sysread_nonblock': hidden object cannot have instance variables (TypeError)
    from /usr/local/ruby/lib/ruby/3.0.0/openssl/buffering.rb:205:in `read_nonblock'
    from gems/net-protocol-0.1.1/lib/net/protocol.rb:212:in `rbuf_fill'
    from gems/net-protocol-0.1.1/lib/net/protocol.rb:193:in `readuntil'
    from gems/net-protocol-0.1.1/lib/net/protocol.rb:203:in `readline'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http/response.rb:42:in `read_status_line'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http/response.rb:31:in `read_new'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http.rb:1557:in `block in transport_request'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http.rb:1548:in `catch'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http.rb:1548:in `transport_request'
...

Caused by: /usr/local/ruby/lib/ruby/3.0.0/openssl/buffering.rb:205:in `sysread_nonblock': method `session_new_cb' called on hidden T_DATA object (0x00007f17df28b0d8 flags=0xc) (NotImplementedError)
    from /usr/local/ruby/lib/ruby/3.0.0/openssl/buffering.rb:205:in `read_nonblock'
    from gems/net-protocol-0.1.1/lib/net/protocol.rb:212:in `rbuf_fill'
    from gems/net-protocol-0.1.1/lib/net/protocol.rb:193:in `readuntil'
    from gems/net-protocol-0.1.1/lib/net/protocol.rb:203:in `readline'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http/response.rb:42:in `read_status_line'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http/response.rb:31:in `read_new'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http.rb:1557:in `block in transport_request'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http.rb:1548:in `catch'
    from /usr/local/ruby/lib/ruby/3.0.0/net/http.rb:1548:in `transport_request'
...

We do call GC.compact once, so maybe there's a static VALUE reference that isn't properly declared to the GC?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions