Skip to content
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

Sporadic Gradle failure: access-filter.json already exists (still exist in 0.10.4) #653

Open
ghilainm opened this issue Dec 10, 2024 · 0 comments · May be fixed by #659
Open

Sporadic Gradle failure: access-filter.json already exists (still exist in 0.10.4) #653

ghilainm opened this issue Dec 10, 2024 · 0 comments · May be fixed by #659
Assignees
Labels
bug Something isn't working

Comments

@ghilainm
Copy link

ghilainm commented Dec 10, 2024

This is a follow-up of #626.

The same issue still occurs.

Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to calculate the value of property 'agentOptions'.
	at org.gradle.api.internal.provider.AbstractProperty.finalizeNow(AbstractProperty.java:[284](https://gitlab.arhs-developments.com/BPC/acceptorpsp/acceptor-psp-transaction-engine/-/jobs/4750122#L284))
	at org.gradle.api.internal.provider.AbstractProperty.lambda$beforeRead$0(AbstractProperty.java:276)
	at org.gradle.api.internal.provider.ValueState.finalizeOnReadIfNeeded(ValueState.java:139)
	at org.gradle.api.internal.provider.AbstractProperty.beforeRead(AbstractProperty.java:276)
	at org.gradle.api.internal.provider.AbstractProperty.beforeRead(AbstractProperty.java:268)
	at org.gradle.api.internal.provider.AbstractProperty.calculateOwnValue(AbstractProperty.java:162)
	at org.gradle.api.internal.provider.AbstractMinimalProvider.getOrNull(AbstractMinimalProvider.java:105)
	at org.gradle.api.internal.provider.ProviderResolutionStrategy$1.resolve(ProviderResolutionStrategy.java:27)
	at org.gradle.util.internal.DeferredUtil.unpack(DeferredUtil.java:59)
	at org.gradle.util.internal.DeferredUtil.unpackOrNull(DeferredUtil.java:49)
	at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:38)
	at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:30)
	... 98 more
Caused by: java.lang.RuntimeException: Cannot add default access-filter.json
	at org.graalvm.buildtools.agent.AgentConfiguration.addDefaultAccessFilter(AgentConfiguration.java:180)
	at org.graalvm.buildtools.agent.AgentConfiguration.getAgentCommandLine(AgentConfiguration.java:101)
	at org.gradle.api.internal.provider.ValueSupplier$Present.transform(ValueSupplier.java:519)
	at org.gradle.api.internal.provider.TransformBackedProvider.mapValue(TransformBackedProvider.java:91)
	at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(TransformBackedProvider.java:82)
	at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:115)
	at org.gradle.api.internal.provider.Collectors$ElementsFromCollectionProvider.collectEntries(Collectors.java:280)
	at org.gradle.api.internal.provider.AbstractCollectionProperty$CollectingSupplier.calculateValue(AbstractCollectionProperty.java:500)
	at org.gradle.api.internal.provider.AbstractCollectionProperty.finalValue(AbstractCollectionProperty.java:311)
	at org.gradle.api.internal.provider.AbstractCollectionProperty.finalValue(AbstractCollectionProperty.java:79)
	at org.gradle.api.internal.provider.AbstractProperty.finalizeNow(AbstractProperty.java:281)
	... 109 more
Caused by: java.nio.file.FileAlreadyExistsException: /tmp/agent-config/access-filter_71_173383205
	at org.graalvm.buildtools.agent.AgentConfiguration.addDefaultAccessFilter(AgentConfiguration.java:169)
	... 119 more

The problem seems located at:

            long pid = ProcessHandle.current().pid();
            long time = System.currentTimeMillis();
            Path tmpAccessFilter = agentDir.resolve(ACCESS_FILTER_PREFIX + '_' + pid  + '_' + time  + '_' + ACCESS_FILTER_SUFFIX);
            Files.copy(accessFilterData, tmpAccessFilter);
@ghilainm ghilainm added the bug Something isn't working label Dec 10, 2024
ghilainm pushed a commit to ghilainm/native-build-tools that referenced this issue Dec 10, 2024
ghilainm pushed a commit to ghilainm/native-build-tools that referenced this issue Dec 10, 2024
ghilainm pushed a commit to ghilainm/native-build-tools that referenced this issue Dec 10, 2024
ghilainm added a commit to ghilainm/native-build-tools that referenced this issue Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants