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

[ADBC][FlightSQL][Java] 'Encountered end-of-stream mid-frame' upgrading from Arrow 17 -> 18 #42

Closed
jarohen opened this issue Nov 4, 2024 · 6 comments
Labels
Type: bug Something isn't working

Comments

@jarohen
Copy link
Contributor

jarohen commented Nov 4, 2024

Describe the bug, including details regarding any error messages, version, and platform.

Hey folks - I seem to have a regression upgrading to Arrow 18 in an E2E ADBC (via FlightSQL) test:

AdbcException{message=Encountered end-of-stream mid-frame, status=INTERNAL, sqlState='null', vendorCode=0, cause=null, details=0}
	at org.apache.arrow.adbc.driver.flightsql.FlightSqlDriverUtil.fromFlightException(FlightSqlDriverUtil.java:109)
	at org.apache.arrow.adbc.driver.flightsql.FlightSqlStatement.execute(FlightSqlStatement.java:210)
	at org.apache.arrow.adbc.driver.flightsql.FlightSqlStatement.executeFlightInfo(FlightSqlStatement.java:221)
	at org.apache.arrow.adbc.driver.flightsql.FlightSqlStatement.executeQuery(FlightSqlStatement.java:248)
	at xtdb.AdbcTest.test simple round-trip(AdbcTest.kt:69)

(unfortunately this is the only stack trace I'm getting atm)

Our implementation of the FlightSQL server is pretty bare-bones right now so entirely possible it's something we're doing wrong - raising here just in case anyone else is running into it (feel free to close if not!)

Cheers,

James

(our issue: xtdb/xtdb#3833)

Component(s)

FlightRPC, Java, Other

@assignUser assignUser transferred this issue from apache/arrow Nov 26, 2024
@assignUser assignUser added the Type: bug Something isn't working label Nov 26, 2024
@lidavidm
Copy link
Member

lidavidm commented Dec 4, 2024

I missed this, sorry. This is only happening via ADBC, you say, not via the regular FlightSqlClient?

@lidavidm
Copy link
Member

lidavidm commented Dec 4, 2024

Also, what version of grpc-netty do you end up pulling in? grpc/grpc-java#11284

@jarohen
Copy link
Contributor Author

jarohen commented Dec 9, 2024

aha, 1.60.0 atm. will see what's pulling that in

@jarohen
Copy link
Contributor Author

jarohen commented Dec 9, 2024

upgrading to 18.1.0, ADBC 0.15.0 (and hence grpc-netty 1.65.0) gives me a different error, at least 😅

Through FlightSqlClient:

1. Unhandled java.lang.IndexOutOfBoundsException
   (No message)

               Buffer.java:  757  java.nio.Buffer$1/apply
               Buffer.java:  754  java.nio.Buffer$1/apply
        Preconditions.java:  213  jdk.internal.util.Preconditions$4/apply
        Preconditions.java:  210  jdk.internal.util.Preconditions$4/apply
        Preconditions.java:   98  jdk.internal.util.Preconditions/outOfBounds
        Preconditions.java:  106  jdk.internal.util.Preconditions/outOfBoundsCheckIndex
        Preconditions.java:  302  jdk.internal.util.Preconditions/checkIndex
               Buffer.java:  779  java.nio.Buffer/checkIndex
       HeapByteBuffer.java:  502  java.nio.HeapByteBuffer/getInt
                Table.java:  301  com.google.flatbuffers.Table/__reset
              Message.java:   41  org.apache.arrow.flatbuf.Message/__init
              Message.java:   42  org.apache.arrow.flatbuf.Message/__assign
              Message.java:   40  org.apache.arrow.flatbuf.Message/getRootAsMessage
              Message.java:   39  org.apache.arrow.flatbuf.Message/getRootAsMessage
    MessageSerializer.java:  727  org.apache.arrow.vector.ipc.message.MessageSerializer/readMessage
    MessageSerializer.java:  205  org.apache.arrow.vector.ipc.message.MessageSerializer/deserializeSchema
      FlightSqlClient.java: 1306  org.apache.arrow.flight.sql.FlightSqlClient$PreparedStatement/deserializeSchema
      FlightSqlClient.java: 1282  org.apache.arrow.flight.sql.FlightSqlClient$PreparedStatement/getParameterSchema
      FlightSqlClient.java: 1334  org.apache.arrow.flight.sql.FlightSqlClient$PreparedStatement/execute
       flight_sql_test.clj:  135  xtdb.flight-sql-test/fn/fn

Currently wondering whether this is the 0.14.0 -> 0.15.0 upgrade, if there was a breaking change there... 👀

I'll close this one for now and keep digging, given I'm not seeing the original error - but if you happen to know off-hand what might be causing this other one I'm all ears 😆

@jarohen jarohen closed this as completed Dec 9, 2024
@jarohen
Copy link
Contributor Author

jarohen commented Dec 9, 2024

Sorted - needed to migrate Schema/.toByteArray to Schema/.serializeAsMessage

@lidavidm
Copy link
Member

lidavidm commented Dec 9, 2024

Ah! Thanks for reporting back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants