Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrity of conn->msg_queue may be compromised #184

Closed
keshonok opened this issue Aug 12, 2015 · 1 comment
Closed

Integrity of conn->msg_queue may be compromised #184

keshonok opened this issue Aug 12, 2015 · 1 comment
Assignees

Comments

@keshonok
Copy link
Contributor

For caching purposes, HTTP requests that are sent out to a back end server are kept in a list until a matching response comes. The list conn->msg_queue is maintained for each connection to back end servers.

These requests may come on different CPU, yet they may be scheduled to go out on the same connection. That means these requests may be inserted into the list in parallel. As responses are received, matching requests are removed from the list, also in parallel with possible inserts.

Right now access to the list is not serialized, and so the integrity of the list can be compromised. All access to the list must be serialized.

@keshonok keshonok self-assigned this Aug 12, 2015
@keshonok keshonok added this to the 0.4.0 Web Server milestone Aug 12, 2015
@keshonok keshonok changed the title Integirty of conn->msg_queue may be compromised Integrity of conn->msg_queue may be compromised Aug 13, 2015
@krizhanovsky krizhanovsky assigned avbelov23 and unassigned keshonok Aug 13, 2015
keshonok added a commit that referenced this issue Sep 1, 2015
conn->msg_queue is used for keeping requests until paired responses
are received. Requests are inserted into it as frequently as they
are removed from it, so a plain spinlock is used. Also, special care
is taken to not insert requests into a queue on a connection that is
no longer active.
@krizhanovsky krizhanovsky assigned keshonok and unassigned avbelov23 Sep 4, 2015
keshonok added a commit that referenced this issue Sep 7, 2015
conn->msg_queue is used for keeping requests until paired responses
are received. Requests are inserted into it as frequently as they
are removed from it, so a plain spinlock is used.
keshonok added a commit that referenced this issue Sep 8, 2015
conn->msg_queue is used for keeping requests until paired responses
are received. Requests are inserted into it as frequently as they
are removed from it, so a plain spinlock is used.
keshonok added a commit that referenced this issue Sep 8, 2015
conn->msg_queue is used for keeping requests until paired responses
are received. Requests are inserted into it as frequently as they
are removed from it, so a plain spinlock is used.
keshonok added a commit that referenced this issue Sep 8, 2015
Synchronize access to conn->msg_queue. (#184)
@keshonok
Copy link
Contributor Author

keshonok commented Sep 8, 2015

Fixed via 7047279.

@keshonok keshonok closed this as completed Sep 8, 2015
keshonok added a commit that referenced this issue Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants