You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by oknet <gi...@git.apache.org> on 2015/12/12 10:55:44 UTC
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
GitHub user oknet opened a pull request:
https://github.com/apache/trafficserver/pull/373
TS-4055: InactivityCop callback SM with INACTIVE_TIMEOUT before NET_EVENT_OPEN
for explain:
on a heavy load system, HttpSM create a connection to OS.
First, a TCP-SYN packet send to OS.
then, InactivityCop::check_activity callbacked before TCP-SYN/ACK send back from OS.
then, UnixNetVConnection::mainEvent(INACTIVE_TIMEOUT) is callbacked
then, HttpSM::main_handler(INACTIVE_TIMEOUT) is callbacked
...
then, HttpSM::handle_server_setup_error(INACTIVE_TIMEOUT) is callbacked
currently, the write_vio still not set, thus segment fault.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/oknet/trafficserver patch-1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/373.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #373
----
commit 37401b7eab0d030e4d4d07af63637a38c30f39db
Author: Oknet <xu...@gmail.com>
Date: 2015-12-12T09:54:05Z
TS-4055: InactivityCop callback SM with INACTIVE_TIMEOUT before NET_EVENT_OPEN
on a heavy load system, HttpSM create a connection to OS.
First, a TCP-SYN packet send to OS.
then, InactivityCop::check_activity callbacked before TCP-SYN/ACK send back from OS.
then, UnixNetVConnection::mainEvent(INACTIVE_TIMEOUT) is callbacked
then, HttpSM::main_handler(INACTIVE_TIMEOUT) is callbacked
...
then, HttpSM::handle_server_setup_error(INACTIVE_TIMEOUT) is callbacked
currently, the write_vio still not set, thus segment fault.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on the pull request:
https://github.com/apache/trafficserver/pull/373#issuecomment-166932419
The change is small enough to be reasonable defensive code. And it if got rid of your crash, that is great.
However, a better solution may be to assign the server_entry->write_vio in HttpSM::attach_server_session around line 5692
{code}
// Transfer control of the write side as well
server_session->do_io_write(this, 0, NULL);
{code}
The call to do_io_read above assigned the results to server_entry->read_vio. We should do the same thing for the server_entry->write_vio. Since the server_entry is set in this function, if we set server_entry->write_vio here too, there would be no path with an unset write_vio.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on the pull request:
https://github.com/apache/trafficserver/pull/373#issuecomment-212107082
Sorry for the long delay. It looks like the original code change in this PR got committed to master through one path or another. @oknet you can go ahead and close this PR. I'll make another PR to change the assignment to write_vio that I suggested.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by bryancall <gi...@git.apache.org>.
Github user bryancall commented on the pull request:
https://github.com/apache/trafficserver/pull/373#issuecomment-187818356
@shinrich is going to shepard this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by oknet <gi...@git.apache.org>.
Github user oknet commented on the pull request:
https://github.com/apache/trafficserver/pull/373#issuecomment-212809087
@shinrich I'm closed the PR, but github show me "but the oknet:patch-1 branch has unmerged commits".
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by oknet <gi...@git.apache.org>.
Github user oknet commented on the pull request:
https://github.com/apache/trafficserver/pull/373#issuecomment-167039829
Thanks! you are right. I got a core file that show me the write_vio is NULL in gdb. Can you revert this pull request then create a new patch to set write_vio in HttpSM::attach_server_session to get a perfectly result?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on the pull request:
https://github.com/apache/trafficserver/pull/373#issuecomment-214905902
It looks like @bcall merged it up as part of f17e7c6ddf8d771b3dc21b59360e982c55423c46 but mislabeled it for TS-4056. So it is definitely in there.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by oknet <gi...@git.apache.org>.
Github user oknet closed the pull request at:
https://github.com/apache/trafficserver/pull/373
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: TS-4055: InactivityCop callback SM wit...
Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on the pull request:
https://github.com/apache/trafficserver/pull/373#issuecomment-212108558
Ok, I see, @bcall commited this change on 12/14/15, but was off by one in the bug number, So all the commits didn't necessarily line up nicely. The commit # was f17e7c6ddf8d771b3dc21b59360e982c55423c46
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---