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

sql.mysql.JdbcMysqlJ8IamAuthIntegrationTests: pooledConnectionTest failed #1159

Closed
flaky-bot bot opened this issue Feb 15, 2023 · 3 comments · Fixed by #1390
Closed

sql.mysql.JdbcMysqlJ8IamAuthIntegrationTests: pooledConnectionTest failed #1159

flaky-bot bot opened this issue Feb 15, 2023 · 3 comments · Fixed by #1390
Assignees
Labels
flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Feb 15, 2023

Note: #1081 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 4293451
buildURL: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/actions/runs/4186937144
status: failed

Test output
java.lang.NullPointerException: Cannot invoke "com.zaxxer.hikari.HikariDataSource.getConnection()" because "this.connectionPool" is null
	at com.google.cloud.sql.mysql.JdbcMysqlJ8IamAuthIntegrationTests.dropTableIfPresent(JdbcMysqlJ8IamAuthIntegrationTests.java:104)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.lang.Thread.run(Thread.java:833)
@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 15, 2023
@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Feb 15, 2023
@flaky-bot
Copy link
Author

flaky-bot bot commented Feb 15, 2023

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (4293451), this test passed in one build (https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/actions/runs/4186937144) and failed in another build (https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/actions/runs/4186937144).

@hessjcg
Copy link
Collaborator

hessjcg commented Jun 9, 2023

Fixed by #1319

@hessjcg hessjcg closed this as completed Jun 9, 2023
@flaky-bot
Copy link
Author

flaky-bot bot commented Jun 13, 2023

Oops! Looks like this issue is still flaky. It failed again. 😬

I reopened the issue, but a human will need to close it again.


commit: 183c71a
buildURL: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/actions/runs/5259611167
status: failed

Test output
org.junit.runners.model.TestTimedOutException: test timed out after 30 seconds
	at java.base@17.0.7/jdk.internal.misc.Unsafe.park(Native Method)
	at java.base@17.0.7/java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
	at app//com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:557)
	at app//com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:89)
	at app//com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:204)
	at app//com.google.cloud.sql.core.CloudSqlInstance.getInstanceData(CloudSqlInstance.java:161)
	at app//com.google.cloud.sql.core.CloudSqlInstance.createSslSocket(CloudSqlInstance.java:174)
	at app//com.google.cloud.sql.core.CoreSocketFactory.createSslSocket(CoreSocketFactory.java:329)
	at app//com.google.cloud.sql.core.CoreSocketFactory.connect(CoreSocketFactory.java:199)
	at app//com.google.cloud.sql.core.CoreSocketFactory.connect(CoreSocketFactory.java:157)
	at app//com.google.cloud.sql.mysql.SocketFactory.connect(SocketFactory.java:59)
	at app//com.google.cloud.sql.mysql.SocketFactory.connect(SocketFactory.java:44)
	at app//com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)
	at app//com.mysql.cj.NativeSession.connect(NativeSession.java:120)
	at app//com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:949)
	at app//com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:819)
	at app//com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:449)
	at app//com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:242)
	at app//com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
	at app//com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:121)
	at app//com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
	at app//com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
	at app//com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
	at app//com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
	at app//com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)
	at app//com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:81)
	at app//com.google.cloud.sql.mysql.JdbcMysqlJ8IamAuthIntegrationTests.setUpPool(JdbcMysqlJ8IamAuthIntegrationTests.java:79)
	at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base@17.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base@17.0.7/java.lang.reflect.Method.invoke(Method.java:568)
	at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at app//org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
	at app//org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at app//org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
	at app//org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
	at java.base@17.0.7/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base@17.0.7/java.lang.Thread.run(Thread.java:833)

@flaky-bot flaky-bot bot reopened this Jun 13, 2023
hessjcg added a commit that referenced this issue Jul 20, 2023
Update the logic in forceRefresh() to reduce the churn on the thread pool when the certificate refresh API calls are failing.

New forceRefresh() logic ensures that:

Only 1 refresh cycle may run at a time.
If a refresh cycle is in progress, then it will not be canceled until it succeeds.
Add new test cases to validate race conditions, deadlocks, and concurrency.

Add additional logging to help diagnose production problems with certificate refresh.

Related to #1314

Fixes #1209
Fixes #1159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants