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

Binary incompatibility between v3 generated classes and v4 runtime #18635

Closed
wendigo opened this issue Oct 7, 2024 · 1 comment
Closed

Binary incompatibility between v3 generated classes and v4 runtime #18635

wendigo opened this issue Oct 7, 2024 · 1 comment
Assignees
Labels

Comments

@wendigo
Copy link

wendigo commented Oct 7, 2024

What version of protobuf and what language are you using?

Version: 4.28.2
Language: Java

What operating system (Linux, Windows, ...) and version?

MacOS/Linux

What runtime / compiler are you using (e.g., python version or gcc version)

Compiler: 3.x, runtime: latest 4.28.2

What did you do?

Run Kafka tests in the trinodb/trino#23697

What did you expect to see

No frame mismatch

What did you see instead?

2024-10-07T09:31:58.8171529Z java.lang.VerifyError: 
2024-10-07T09:31:58.8172581Z Bad type on operand stack
2024-10-07T09:31:58.8173406Z Exception Details:
2024-10-07T09:31:58.8173954Z   Location:
2024-10-07T09:31:58.8176699Z     io/confluent/kafka/schemaregistry/protobuf/ProtobufSchema.toField(Lcom/google/protobuf/DescriptorProtos$FileDescriptorProto;Lcom/google/protobuf/DescriptorProtos$FieldDescriptorProto;Z)Lcom/squareup/wire/schema/internal/parser/FieldElement; @248: invokestatic
2024-10-07T09:31:58.8179274Z   Reason:
2024-10-07T09:31:58.8181030Z     Type 'com/google/protobuf/DescriptorProtos$FieldOptions' (current frame, stack[1]) is not assignable to 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage'
2024-10-07T09:31:58.8182845Z   Current Frame:
2024-10-07T09:31:58.8183580Z     bci: @248
2024-10-07T09:31:58.8184081Z     flags: { }
2024-10-07T09:31:58.8186272Z     locals: { 'com/google/protobuf/DescriptorProtos$FileDescriptorProto', 'com/google/protobuf/DescriptorProtos$FieldDescriptorProto', integer, 'java/lang/String', 'com/google/common/collect/ImmutableList$Builder' }
2024-10-07T09:31:58.8189051Z     stack: { 'com/google/common/collect/ImmutableList$Builder', 'com/google/protobuf/DescriptorProtos$FieldOptions' }
2024-10-07T09:31:58.8190311Z   Bytecode:
2024-10-07T09:31:58.8190930Z     0000000: 2bb6 018a 4eb2 001e 1301 8b2d b901 0e03
2024-10-07T09:31:58.8192070Z     0000010: 00b8 0063 3a04 2bb6 018c b601 8d99 0022
2024-10-07T09:31:58.8192917Z     0000020: bb00 7959 1301 8eb2 008e 2bb6 018c b601
2024-10-07T09:31:58.8193756Z     0000030: 8f03 b700 7d3a 0519 0419 05b6 0067 572b
2024-10-07T09:31:58.8194589Z     0000040: b601 8cb6 0190 9900 25bb 0079 5913 0191
2024-10-07T09:31:58.8195403Z     0000050: b200 832b b601 8cb6 0192 b800 8503 b700
2024-10-07T09:31:58.8196243Z     0000060: 7d3a 0519 0419 05b6 0067 572b b601 8cb6
2024-10-07T09:31:58.8197069Z     0000070: 0193 9900 22bb 0079 5913 0194 b200 8e2b
2024-10-07T09:31:58.8197891Z     0000080: b601 8cb6 0195 03b7 007d 3a05 1904 1905
2024-10-07T09:31:58.8198708Z     0000090: b600 6757 2bb6 018c b601 9699 0024 bb00
2024-10-07T09:31:58.8199532Z     00000a0: 7959 12a0 b200 832b b601 8cb6 0197 b800
2024-10-07T09:31:58.8200354Z     00000b0: 8503 b700 7d3a 0519 0419 05b6 0067 572b
2024-10-07T09:31:58.8201175Z     00000c0: b601 8cb2 0198 b601 9999 0029 2bb6 018c
2024-10-07T09:31:58.8202298Z     00000d0: b201 98b6 019a c000 bd3a 0513 019b 1905
2024-10-07T09:31:58.8203130Z     00000e0: b800 bf3a 0619 06c6 000b 1904 1906 b600
2024-10-07T09:31:58.8203962Z     00000f0: 6757 1904 2bb6 018c b800 c0b6 00c1 572b
2024-10-07T09:31:58.8204798Z     0000100: b601 9c99 000a 2bb6 019d a700 0401 3a05
2024-10-07T09:31:58.8205612Z     0000110: 1260 2ab6 005d b600 5c9a 0011 2bb6 019e
2024-10-07T09:31:58.8206456Z     0000120: 9900 0a2b b601 9fa7 0004 013a 06bb 01a0
2024-10-07T09:31:58.8207366Z     0000130: 59b2 0043 1c99 0007 01a7 0008 2a2b b801
2024-10-07T09:31:58.8208179Z     0000140: a12b b801 a22d 1906 1905 2bb6 01a3 125b
2024-10-07T09:31:58.8208991Z     0000150: 1904 b600 c5b7 01a4 b0                 
2024-10-07T09:31:58.8209714Z   Stackmap Table:
2024-10-07T09:31:58.8210357Z     append_frame(@63,Object[#1098],Object[#1211])
2024-10-07T09:31:58.8211087Z     same_frame(@107)
2024-10-07T09:31:58.8211798Z     same_frame(@148)
2024-10-07T09:31:58.8212407Z     same_frame(@191)
2024-10-07T09:31:58.8212976Z     same_frame(@242)
2024-10-07T09:31:58.8213529Z     same_frame(@269)
2024-10-07T09:31:58.8214190Z     same_locals_1_stack_item_frame(@270,Object[#1098])
2024-10-07T09:31:58.8214987Z     append_frame(@298,Object[#1098])
2024-10-07T09:31:58.8215765Z     same_locals_1_stack_item_frame(@299,Object[#1098])
2024-10-07T09:31:58.8217399Z     full_frame(@316,{Object[#1212],Object[#1299],Integer,Object[#1098],Object[#1211],Object[#1098],Object[#1098]},{Uninitialized[#301],Uninitialized[#301],Object[#1354]})
2024-10-07T09:31:58.8219826Z     full_frame(@321,{Object[#1212],Object[#1299],Integer,Object[#1098],Object[#1211],Object[#1098],Object[#1098]},{Uninitialized[#301],Uninitialized[#301],Object[#1354],Object[#1355]})

Anything else we should know about your project / environment

@wendigo wendigo added the untriaged auto added to all issues by default when created. label Oct 7, 2024
@JasonLunn JasonLunn added the java label Oct 7, 2024
@JasonLunn JasonLunn added java and removed java untriaged auto added to all issues by default when created. labels Oct 7, 2024
@zhangskz
Copy link
Member

zhangskz commented Oct 7, 2024

I think this is the same root problem as #18636, due to DescriptorProtos.FieldOptions actually getting v4.28.2 gencode from the Java runtime when code in trino's dep actually expects v3.x.x gencode.

Closing as duplicate in favor of the other issue, but please reopen if this is actually a distinct issue.

@zhangskz zhangskz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants