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

Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. #40100

Closed
yanxuehe opened this issue Apr 16, 2024 · 5 comments · Fixed by #40698
Closed

Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. #40100

yanxuehe opened this issue Apr 16, 2024 · 5 comments · Fixed by #40698
Labels
Milestone

Comments

@yanxuehe
Copy link

yanxuehe commented Apr 16, 2024

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 yanxuehe added the kind/bug Something isn't working label Apr 16, 2024
@geoand
Copy link
Contributor

geoand commented Apr 16, 2024

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 geoand added area/native-image triage/needs-feedback We are waiting for feedback. labels Apr 16, 2024
@yanxuehe
Copy link
Author

yanxuehe commented Apr 16, 2024

@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.

@geoand geoand added area/hibernate-orm Hibernate ORM area/kafka and removed triage/needs-feedback We are waiting for feedback. labels Apr 16, 2024
@ThoSap
Copy link

ThoSap commented Apr 23, 2024

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

@ThoSap
Copy link

ThoSap commented May 16, 2024

Same with Quarkus 3.10.1

@geoand
Copy link
Contributor

geoand commented May 17, 2024

cc @zakkak

zakkak added a commit to zakkak/quarkus that referenced this issue May 17, 2024
Duplicate of the substitution in `GrpcSubstitutions` of the unshaded
class.

Fixes: quarkusio#40100
zakkak added a commit to zakkak/quarkus that referenced this issue May 17, 2024
Adaptation of quarkusio#36642 for the
shaded `com.google.protobuf.UnsafeUtil` class in kafka-clients.

Fixes: quarkusio#40100
@quarkus-bot quarkus-bot bot added this to the 3.12 - main milestone May 20, 2024
@gsmet gsmet modified the milestones: 3.12 - main, 3.10.2 May 21, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue May 21, 2024
Adaptation of quarkusio#36642 for the
shaded `com.google.protobuf.UnsafeUtil` class in kafka-clients.

Fixes: quarkusio#40100
(cherry picked from commit dcb3411)
gsmet pushed a commit to gsmet/quarkus that referenced this issue May 21, 2024
Adaptation of quarkusio#36642 for the
shaded `com.google.protobuf.UnsafeUtil` class in kafka-clients.

Fixes: quarkusio#40100
(cherry picked from commit dcb3411)
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Jul 31, 2024
Adaptation of quarkusio#36642 for the
shaded `com.google.protobuf.UnsafeUtil` class in kafka-clients.

Fixes: quarkusio#40100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants