Skip to content

envoy still try to create file event twice on the same fd when continue_on_listener_filters_timeout is true #16951

@soulxu

Description

@soulxu

Title: envoy still create file event twice on the same fd when continue_on_listener_filters_timeout is true

Description:
This is a regression of the issue istio/istio#18229 and it is fixed previously by #8922

#8922 clean the listener filter before create new connection. It works at the time tls inspect filter using FileEventImpl to create event directly.

But now, the tls inspect and http inspect filter are changed to use the socket's ioHandle::initializeFileEvent(). But the owning of socket isn't the filter, so the event won't be clean after the filter cleaned.

socket.ioHandle().initializeFileEvent(

After the new connection adds event to the fd, the assertion will be triggered.

ASSERT(file_event_ == nullptr, "Attempting to initialize two `file_event_` for the same "

In the production build, it should reproduce the issue istio/istio#18229, since the new FileEventImpl is created before the old one destructed.

file_event_ = dispatcher.createFileEvent(fd_, cb, trigger, events);

Repro steps:

  1. startup envoy with listener's continue_on_listener_filters_timeout set as true. also enable the tls inspect filter
  2. client connect to the envoy, but didn't set the full tls hello message in the frist write
  3. waiting the listener filter timeout

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions