Skip to content

Commit d66bc17

Browse files
authored
Disable profiling in smoke tests (#6548)
## Summary of changes Disables profiling in the crash smoke tests ## Reason for change There's a freeze we sometimes hit in the smoke tests. It was similar to an issue we saw in some integration tests. Disabling the profiler in those tests (in #6497) resolved the issue, so we think it will resolve it here. We'll investigate the freeze separately, this is just trying to reduce flake. ## Implementation details Explicitly set `DD_PROFILING_ENABLED=0` ## Test coverage This is the test
1 parent b79a2db commit d66bc17

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.azure-pipelines/steps/run-snapshot-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ steps:
151151
do
152152
echo "$line" # Output the log line to stdout in real-time
153153
LOGS+="$line"$'\n' # Capture each line into LOGS variable
154-
done < <(${{ parameters.dockerComposePath }} -f $(COMPOSE_PATH) -p ddtrace_$(Build.BuildNumber) run -e dockerTag=$(dockerTag) -e CRASH_APP_ON_STARTUP=1 -e COMPlus_DbgEnableMiniDump=0 ${{ parameters.target }})
154+
# Profiling is disabled using DD_PROFILING_ENABLED=0 because there is a flaky freeze we are working around
155+
# Once we figure out the freeze, we can re-enable
156+
done < <(${{ parameters.dockerComposePath }} -f $(COMPOSE_PATH) -p ddtrace_$(Build.BuildNumber) run -e dockerTag=$(dockerTag) -e DD_PROFILING_ENABLED=0 -e CRASH_APP_ON_STARTUP=1 -e COMPlus_DbgEnableMiniDump=0 ${{ parameters.target }})
155157
156158
# check logs for evidence of crash detection in the output
157159
expected="The crash may have been caused by automatic instrumentation"

tracer/build/_build/Build.Steps.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,11 +2255,13 @@ string NormalizedPath(AbsolutePath ap)
22552255
{
22562256
// Profiler is not yet supported on Arm64
22572257
knownPatterns.Add(new(@".*Profiler is deactivated because it runs on an unsupported architecture", RegexOptions.Compiled));
2258-
knownPatterns.Add(new(@".*Error getting IClassFactory from: .*/Datadog\.Profiler\.Native\.so", RegexOptions.Compiled));
2259-
knownPatterns.Add(new(@".*DynamicDispatcherImpl::LoadClassFactory: Error trying to load continuous profiler class factory.*", RegexOptions.Compiled));
2260-
knownPatterns.Add(new(@".*Error loading all cor profiler class factories\.", RegexOptions.Compiled));
22612258
}
22622259

2260+
// We disable the profiler in crash tests, so we expect these logs
2261+
knownPatterns.Add(new(@".*Error getting IClassFactory from: .*/Datadog\.Profiler\.Native\.so", RegexOptions.Compiled));
2262+
knownPatterns.Add(new(@".*DynamicDispatcherImpl::LoadClassFactory: Error trying to load continuous profiler class factory.*", RegexOptions.Compiled));
2263+
knownPatterns.Add(new(@".*Error loading all cor profiler class factories\.", RegexOptions.Compiled));
2264+
22632265
// profiler occasionally throws this if shutting down
22642266
knownPatterns.Add(new(@".*LinuxStackFramesCollector::CollectStackSampleImplementation: Unable to send signal .*Error code: No such process", RegexOptions.Compiled));
22652267
// profiler throws this on .NET 7 - currently allowed

0 commit comments

Comments
 (0)