Fix crash when the worker is timed-out waiting for master (#874)

This commit is contained in:
Semih Okur 2019-09-12 18:11:27 -07:00 коммит произвёл Michael Pysson
Родитель 062c12a6bf
Коммит 2e3a0df4b1
3 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -283,6 +283,7 @@ namespace BuildXL.Engine.Distribution
if ((TimestampUtilities.Timestamp - m_lastHeartbeatTimestamp) > EngineEnvironmentSettings.WorkerAttachTimeout)
{
Exit(failure: "Timed out waiting for attach request from master", isUnexpected: true);
Logger.Log.DistributionWorkerTimeoutFailure(m_appLoggingContext);
return false;
}
}

Просмотреть файл

@ -726,6 +726,15 @@ namespace BuildXL.Engine.Tracing
Message = "Failing build on worker due to failure: {failure}")]
public abstract void DistributionWorkerExitFailure(LoggingContext context, string failure);
[GeneratedEvent(
(ushort)LogEventId.DistributionWorkerTimeoutFailure,
EventGenerators = EventGenerators.LocalOnly,
EventLevel = Level.Error,
Keywords = (int)(Keywords.UserMessage | Keywords.UserError),
EventTask = (ushort)Tasks.Distribution,
Message = "Timed out waiting for attach request from master")]
public abstract void DistributionWorkerTimeoutFailure(LoggingContext context);
[GeneratedEvent(
(ushort)LogEventId.DistributionTryMaterializeInputsFailedRetry,
EventGenerators = EventGenerators.LocalOnly,

Просмотреть файл

@ -175,7 +175,7 @@ namespace BuildXL.Engine.Tracing
DistributionWorkerStatus = 7038,
DistributionExecutePipFailedNetworkFailureWarning = 7039,
// UNUSED 7040
DistributionWorkerTimeoutFailure = 7040,
DistributionBondCall = 7041,
DistributionDebugMessage = 7042,