Skip to content

Sporadic Gradle failure: access-filter.json already exists #626

@jeanbisutti

Description

@jeanbisutti

The Native Build Tools Gradle plugin is used in the OpenTelemetry Java instrumentation Github repository.

Sometimes the plugin fails. A failure report example: https://ge.opentelemetry.io/s/2rq2vt7d7bsng/failure?expanded-stacktrace=WyIwLTEtMi0zLTQiXQ#1

The root case:

Caused by: java.nio.file.FileAlreadyExistsException: /tmp/agent-config
at org.graalvm.buildtools.agent.AgentConfiguration.addDefaultAccessFilter(AgentConfiguration.java:156)	
at org.graalvm.buildtools.agent.AgentConfiguration.getAgentCommandLine(AgentConfiguration.java:99)	
at org.gradle.api.internal.provider.ValueSupplier$Present.transform(ValueSupplier.java:519) 

The problem seems to come from the recent changes in the AgentConfiguration class, and released in 0.10.3.

The native agent is not enabled from our build.gradle.kts file or a command line (./gradlew -Pagent). Perhaps some code related to the agent could only be executed if the agent is enabled.

Would you have any workaround to recommend?

Thanks.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions