Skip to content

Conversation

@oknet
Copy link
Member

@oknet oknet commented Jun 29, 2016

No description provided.

}
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this makes a bit more sense. As far as I can tell the handle_event variable is only used for a Debug statement, so the change isn't crucial one way or another.

@zwoop
Copy link
Contributor

zwoop commented Jun 29, 2016

[approve ci]

@zwoop zwoop added the Network label Jun 29, 2016
@zwoop zwoop added this to the 7.0.0 milestone Jun 29, 2016
@atsci
Copy link

atsci commented Jun 29, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/385/ for details.

@atsci
Copy link

atsci commented Jun 29, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/281/ for details.

#endif
e->schedule_in(HRTIME_MSECONDS(net_retry_delay));
#endif
return EVENT_CONT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be the more critical fix. It looks like a standard reschedule if you don't get the lock. But it appears that we only do this if the event is an active timeout (if INACTIVITY_TIMEOUT is set). It seems that we are not currently building with INACTIVITY_TIMEOUT defined (at least I'm not). So this change would cause the reschedule to never happen. So if you don't get the lock the first time, you will never process the event.

I'm not following the description in the JIRA. Is the concern that we are double freeing an event object?

Copy link
Member Author

@oknet oknet Jul 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, currently default build ats without INACTIVITY_TIMEOUT defined.
that's means the UnixNetVConnection::mainEvent(int event, Event *e) is callbacked from InactivityCop::check_inactivity(int event, Event *e) and/or NetHandler::_close_vc().

The Event *e is InactivityCop's Event when it is callbacked from InactivityCop::check_inactivity(int event, Event *e). and the Event is a perorid Event.
thus we don't need to do e->schedule_in() for it.

The Event *e is a dummy Event when it is callbacked from NetHandler::_close_vc(). To schedule a dummy Event will lead memory leak and ATS crash.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The e->schedule_in() makes InactivityCop stop running if the e is InactivityCop's callback Event.
because schedule_in() set period to 0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, the change makes sense now.

@oknet
Copy link
Member Author

oknet commented Jul 18, 2016

This is a InactivityCop minor issue. @bryancall

@zwoop
Copy link
Contributor

zwoop commented Jul 23, 2016

@shinrich Should we land this? Also, is this a back port candidate?

@shinrich
Copy link
Member

Yes, I'll go ahead and merge this up. Might consider backporting. Stopping the period on the inactivty cop seems like a bad thing.

@asfgit asfgit closed this in 0024323 Jul 25, 2016
maskit pushed a commit to maskit/trafficserver that referenced this pull request Feb 2, 2017
* asf/master: (44 commits)
  TS-4614: avoid e->schedule_in for dummy event.  This closes apache#766.
  Use devtoolset-3 for ATS 7 and later, when available
  Updated some build instructions
  TS-4311 Removes support for SPDY completely
  TS-4683 Adds better error handling on config problems
  Add TSQA tests for https SRV records
  TS-4615 set SRV scheme based on next_hop_scheme
  Add some initial SRV tsqa tests
  TS-4622 use port from SRV response for origin connections
  Revert "TS-4622 Use port from SRV response when connecting to origin (apache#773)"
  TS-4622 Use port from SRV response when connecting to origin (apache#773)
  TS-4688 handle DNS compression labels in SRV responses (apache#812)
  cachekey/pattern.h: clang format
  TS-4667 Uses the WKS in the gzip plugin
  TS-4653: esi plugin - disable HTTP_COOKIE variable by default and implement a whitelist mechanism to allow the specified cookies for it Original code and idea contributed by Chris Rohlf
  TS-4680: thread safe initialization in TS*DirGet() functions
  TS-4652 Fixes log field initialization, previously crippled
  TS-4595: TSRuntimeDirGet
  TS-4689 Assert if Machine UUID init fails
  TS-4674: Remove useless assert statement (apache#809)
  ...
@zwoop zwoop modified the milestone: 7.0.0 May 4, 2017
JosiahWI pushed a commit to JosiahWI/trafficserver that referenced this pull request Jul 19, 2023
* Adds Au test bad_server_crash.test.py
* set cause_of_death_errno only if it's the default value)

Co-authored-by: Walt Karas <wkaras@yahooinc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants