Skip to content

Assert if operations on keep_alive_queue and active_queue are not thread-safe#4787

Merged
zwoop merged 1 commit intoapache:7.1.xfrom
oknet:i4379-7.1.x
Jan 11, 2019
Merged

Assert if operations on keep_alive_queue and active_queue are not thread-safe#4787
zwoop merged 1 commit intoapache:7.1.xfrom
oknet:i4379-7.1.x

Conversation

@oknet
Copy link
Copy Markdown
Member

@oknet oknet commented Jan 11, 2019

The vc->add_to_keep_alive_queue() is called by:

  • Http1ClientSession::release()
  • Http2ClientSession::cleanup_streams()
  • Http2ClientSession::release_stream()

And the NetHandler::remove_from_active_queue() is called by
vc->add_to_keep_alive_queue().

The NetHandler::keep_alive_queue and NetHandler::active_queue are
internal queue of NetHandler. We must have acquired the NetHandler's
lock before doing anything with them.

When reenable a HttpSM from plugin, the HttpSM would be run into ethread
that different from client_vc lives because TSHttpSMCallback is
scheduled by eventProcessor.schedule_imm().

(cherry picked from commit c929ed6)

…ead-safe

The `vc->add_to_keep_alive_queue()` is called by:
  - Http1ClientSession::release()
  - Http2ClientSession::cleanup_streams()
  - Http2ClientSession::release_stream()

And the `NetHandler::remove_from_active_queue()` is called by
`vc->add_to_keep_alive_queue()`.

The NetHandler::keep_alive_queue and NetHandler::active_queue are
internal queue of NetHandler. We must have acquired the NetHandler's
lock before doing anything with them.

When reenable a HttpSM from plugin, the HttpSM would be run into ethread
that different from client_vc lives because TSHttpSMCallback is
scheduled by `eventProcessor.schedule_imm()`.

(cherry picked from commit c929ed6)
@oknet oknet added this to the 7.1.6 milestone Jan 11, 2019
@oknet oknet self-assigned this Jan 11, 2019
@oknet oknet requested a review from zwoop January 11, 2019 06:29
@oknet
Copy link
Copy Markdown
Member Author

oknet commented Jan 11, 2019

@zwoop backport #4379 for 7.1.x.

@zwoop zwoop merged commit 3599e5e into apache:7.1.x Jan 11, 2019
@zwoop zwoop added the Backport Marked for backport for an LTS patch release label Jan 30, 2019
@zwoop
Copy link
Copy Markdown
Contributor

zwoop commented Mar 14, 2019

hmmm this is causing issues on the 7.1.x branch, and unclear what it fixes honestly. I'm thinking we should revert this for now. @ezelkow1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport Marked for backport for an LTS patch release HTTP HTTP/2 Network

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants