-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Remove all kernel32.dll references and debug breakpoints #108647
Conversation
Tagging subscribers to this area: @dotnet/gc |
is the test hang just an artifact of the reporting, ie, if a test runs for a long time RF considers it hung? and is this only during the last phase where RF is trying to exit? |
Yes. If there are tests uncompleted after the time limit reached, |
@@ -79,7 +79,6 @@ private void LogWorker() | |||
} | |||
catch (IOException e) | |||
{ | |||
ReliabilityFramework.MyDebugBreak(String.Format("LogWorker IOException:{0}", e.ToString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's throw the exception here so that we can take a dump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the debugger break is set to true, we should set a debug break point here and if not, log and throw an exception.
@@ -12,7 +12,7 @@ | |||
minimumTests="0" | |||
minMaxTestUseCPUCount="true" | |||
suppressConsoleOutputFromTests="true" | |||
debugBreakOnTestHang="true"> | |||
debugBreakOnTestHang="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove as the default is false. (Same for the other configurations)
@@ -882,20 +839,17 @@ private void TestSetShutdown(int totalTestsToRun) | |||
|
|||
if (_curTestSet.DebugBreakOnTestHang) | |||
{ | |||
TestIsHungDebugBreak(); | |||
Console.WriteLine("Test hang."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be via the logger and so should be the case below.
@@ -120,7 +120,6 @@ private void LogWorker() | |||
} | |||
catch (IOException e) | |||
{ | |||
ReliabilityFramework.MyDebugBreak(String.Format("LogWorker IOException:{0}", e.ToString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to throw an exception here still after logging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: if debugger is present => break else, log and throw an exception.
} | ||
catch (OutOfMemoryException) | ||
{ | ||
// hang and let someone debug if we can't even break in... | ||
Thread.CurrentThread.Join(); | ||
_logger.WriteToInstrumentationLog(_curTestSet, LoggingLevels.Tests, "Out of memory"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we throw here to pick up the dump on the scripts?
} | ||
catch (OutOfMemoryException) | ||
{ | ||
// hang and let someone debug if we can't even break in... | ||
Thread.CurrentThread.Join(); | ||
_logger.WriteToInstrumentationLog(_curTestSet, LoggingLevels.Tests, "Out of memory"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same logic here - if debugger present => break.
@@ -780,7 +743,7 @@ private void TestStarter() | |||
Thread.Sleep(250); // give the CPU a bit of a rest if we don't need to start a new test. | |||
if (_curTestSet.DebugBreakOnMissingTest && DateTime.Now.Subtract(_startTime) > minTimeToStartTest) | |||
{ | |||
NewTestsNotStartingDebugBreak(); | |||
_logger.WriteToInstrumentationLog(_curTestSet, LoggingLevels.TestStarter, String.Format("New tests not starting")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add debug break conditional functionality.
//Disk may be full so simply stop logging | ||
if (ReliabilityFramework._debugBreakOnTestHang) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe moving this to it's own method parameterized with its own method e.g., void DebugBreakOrThrowException(string message)
.
@@ -79,6 +79,23 @@ public interface ISingleReliabilityTest | |||
bool Run(); // returns true on success, false on failure. | |||
} | |||
|
|||
public class MissingTestException : Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mark this as a sealed class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request aims at:
debugBreakOnTestHang
to false for all configurations