Skip to content

Conversation

@raych1
Copy link
Member

@raych1 raych1 commented Dec 11, 2025

Fixed the following race condition issue while creating the sub-folders under the default temp directory.

Caused by: java.lang.IllegalArgumentException: Unable to create directory: /tmp/cloudtest/applicationinsights/telemetry
	at com.azure.monitor.opentelemetry.autoconfigure@1.5.0-beta.1/com.azure.monitor.opentelemetry.autoconfigure.implementation.utils.TempDirs.getSubDir(TempDirs.java:54)
	at com.azure.monitor.opentelemetry.autoconfigure@1.5.0-beta.1/com.azure.monitor.opentelemetry.autoconfigure.implementation.utils.AzureMonitorHelper.createTelemetryItemExporter(AzureMonitorHelper.java:35)

Repro Pipeline Run

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a race condition that occurs when multiple parallel test executions attempt to create subdirectories under the default system temp directory (/tmp) by overriding the Java temp directory to use the Azure Pipelines agent-specific temp directory.

  • Adds -Djava.io.tmpdir=$(Agent.TempDirectory) to all Maven test execution commands
  • Applies the fix to both federated auth and non-federated auth test paths
  • Covers both "From Source" and standard test runs

@raych1
Copy link
Member Author

raych1 commented Dec 11, 2025

The test run looks fine for the change, and the failures are known errors in previous runs.

@raych1 raych1 moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys ❄️🎄🎁🎅✨ Dec 11, 2025
@raych1
Copy link
Member Author

raych1 commented Dec 11, 2025

The test run looks fine for the change, and the failures are known errors in previous runs.

Interesting, this issue happens again in the new test run.
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5661559&view=logs&j=a2085e1e-7099-51de-3f58-341a3a74a909&t=bb035b95-555e-59e0-9f5f-6f62a0fa0084

It appears that the root cause of the issue is in the service test code. I'll hold off this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

5 participants