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

panic during spanner migration #4044

Open
n0npax opened this issue Mar 7, 2025 · 2 comments
Open

panic during spanner migration #4044

n0npax opened this issue Mar 7, 2025 · 2 comments

Comments

@n0npax
Copy link

n0npax commented Mar 7, 2025

Hi,

issue may be related to: #4039, but erros I'm facing are a bit different.

I'm facing given error during spanner migration using flyway.

both spanner emulator and flyway are within docker containers inside compose. Everything was working fine in past.
FLYWAY_VERSION=11.3.4
docker image with flyway has java:21

db-1  | DEBUG: Performing operation in non-transactional context.
db-1  | DEBUG: Memory usage: 69 of 148M
db-1  | ERROR: Unexpected error
db-1  | com.google.cloud.spanner.SpannerException: INTERNAL: com.google.api.gax.rpc.InternalException: io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug!
db-1  | 	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:302)
db-1  | 	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:308)
db-1  | 	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:170)
db-1  | 	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:110)
db-1  | 	at com.google.cloud.spanner.SessionPool$WaiterFuture.pollUninterruptiblyWithTimeout(SessionPool.java:1953)
db-1  | 	at com.google.cloud.spanner.SessionPool$WaiterFuture.get(SessionPool.java:1899)
db-1  | 	at com.google.cloud.spanner.SessionPool$WaiterFuture.get(SessionPool.java:1874)
db-1  | 	at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:67)
db-1  | 	at com.google.cloud.spanner.SessionPool$PooledSessionFuture.get(SessionPool.java:1564)
db-1  | 	at com.google.cloud.spanner.SessionPool$PooledSessionFuture.get(SessionPool.java:1540)
db-1  | 	at com.google.cloud.spanner.SessionPool.getDialect(SessionPool.java:2530)
db-1  | 	at com.google.cloud.spanner.DatabaseClientImpl.getDialect(DatabaseClientImpl.java:99)
db-1  | 	at com.google.cloud.spanner.connection.ConnectionImpl.getDialect(ConnectionImpl.java:485)
db-1  | 	at com.google.cloud.spanner.jdbc.AbstractJdbcConnection.getDialect(AbstractJdbcConnection.java:88)
db-1  | 	at com.google.cloud.spanner.jdbc.JdbcConnection.getDefaultCatalog(JdbcConnection.java:499)
db-1  | 	at com.google.cloud.spanner.jdbc.JdbcConnection.getCatalog(JdbcConnection.java:494)
db-1  | 	at org.flywaydb.core.internal.database.base.Database.doGetCatalog(Database.java:963)
db-1  | 	at org.flywaydb.core.internal.database.base.Database.getCatalog(Database.java:956)
db-1  | 	at org.flywaydb.core.internal.parser.ParsingContext.populate(ParsingContext.java:854)
db-1  | 	at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:961)
db-1  | 	at org.flywaydb.core.Flyway.migrate(Flyway.java:954)
db-1  | 	at org.flywaydb.commandline.Main.executeOperation(Main.java:1049)
db-1  | 	at org.flywaydb.commandline.Main.executeFlyway(Main.java:955)
db-1  | 	at org.flywaydb.commandline.Main.main(Main.java:894)

relevant part of docker compose

  db:
    build:
      context: REDACTED
      dockerfile: REDACTED
    command: ["migrate", "-outputType=json", "-X"]
    environment:
      FLYWAY_URL: "jdbc:cloudspanner://spanner:9010/projects/${TEST_SPANNER_PROJECT_ID}/instances/${TEST_SPANNER_INSTANCE_ID}/databases/${TEST_SPANNER_DATABASE_ID}?usePlainText=true"
      SPANNER_EMULATOR_HOST: "spanner:9010"
      SPANNER_EMULATOR_URL: "http://spanner:9010/"
@JasonLuo-Redgate
Copy link

JasonLuo-Redgate commented Mar 7, 2025

Hi @n0npax ,

Thanks for reporting this issue to us.

It looks like this Exception: INTERNAL: Panic! This is a bug! came from grpc rather than a direct Flyway issue.

I did a bit search for this strange error message, would these be of any help?
grpc/grpc-java#4544
grpc/grpc-java#9706

@n0npax
Copy link
Author

n0npax commented Mar 10, 2025

Hi,

Pls forgive me if I'm messing the stuff here. I had very little exposure to java and I may be missing some java specific ways of doing. I'm using flyway as a cmd line tool, no code integration with any java project.

My current understanding is gax and grcp-spanner are bundled with flyway cmd line app.
I check content of:

wget https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/11.3.4/flyway-commandline-11.3.4-linux-x64.tar.gz
tar -xzvf flyway-commandline-11.3.4-linux-x64.tar.gz
Image Image

Were those deps bumped recently? I remember no problems with flyway10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants