quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Warning: RecomputeFieldValue.FieldOffset automatic substitution failed.

Open yanxuehe opened this issue 10 months ago • 3 comments

Describe the bug

Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to sun.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of org.apache.kafka.shaded.com.google.protobuf.UnsafeUtil. Detailed failure reason(s): The argument of sun.misc.Unsafe.objectFieldOffset(java.lang.reflect.Field) is not a constant value or a field load that can be constant-folded., Could not determine the field where the value produced by the call to sun.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.

Expected behavior

no warnings

Actual behavior

warning while building native

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

21

Quarkus version or git rev

3.9.3

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

yanxuehe avatar Apr 16 '24 09:04 yanxuehe

Thanks for reporting.

Please provide more information about how to reproduce the issue and ideally a sample application that we can run in order to see the problem in action.

geoand avatar Apr 16 '24 10:04 geoand

@geoand

40100-reproducer.tar.gz

java -version
openjdk version "21.0.1" 2023-10-17
OpenJDK Runtime Environment GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)
./mvnw clean package -Dmaven.test.skip=true -Dquarkus.native.additional-build-args=-J--enable-preview -Pnative
Build resources:
 - 24.18GB of memory (75.6% of 32.00GB system memory, determined at start)
 - 8 thread(s) (100.0% of 8 available processor(s), determined at start)
[2/8] Performing analysis...  [19:44:32,767 WARN  [org.hib.orm.deprecation] HHH90000025: DB2Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to sun.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of org.apache.kafka.shaded.com.google.protobuf.UnsafeUtil. Detailed failure reason(s): The argument of sun.misc.Unsafe.objectFieldOffset(java.lang.reflect.Field) is not a constant value or a field load that can be constant-folded., Could not determine the field where the value produced by the call to sun.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.

yanxuehe avatar Apr 16 '24 11:04 yanxuehe

I have the same issue using Quarkus 3.9.4 with io.quarkus:quarkus-messaging-kafka.

ThoSap avatar Apr 23 '24 09:04 ThoSap

Same with Quarkus 3.10.1

ThoSap avatar May 16 '24 14:05 ThoSap

cc @zakkak

geoand avatar May 17 '24 11:05 geoand