Skip to content

Add GraalVM Reachability Metadata and corresponding nativeTest for Firebird#34307

Merged
strongduanmu merged 2 commits intoapache:masterfrom
linghengqian:firebird
Jan 21, 2025
Merged

Add GraalVM Reachability Metadata and corresponding nativeTest for Firebird#34307
strongduanmu merged 2 commits intoapache:masterfrom
linghengqian:firebird

Conversation

@linghengqian
Copy link
Member

@linghengqian linghengqian commented Jan 11, 2025

For #29052.

Changes proposed in this pull request:


Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

Copy link
Member Author

@linghengqian linghengqian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failures (1):
  JUnit Jupiter:FirebirdTest:assertShardingInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.test.natived.jdbc.databases.FirebirdTest', methodName = 'assertShardingInLocalTransactions', methodParameterTypes = '']
    => java.sql.SQLTransientConnectionException: HikariPool-65 - Connection is not available, request timed out after 30000ms.
       com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
       com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
       com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
       com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)
       org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager.createConnection(DriverDatabaseConnectionManager.java:375)
  • image
  • image
  • Maybe there is something I'm not aware of and the connection leak only happens in the Github Actions device.
  • update in 2025.01.12: According to the results of https://github.com/apache/shardingsphere/actions/runs/12734759305/job/35492699852?pr=34307 , org.apache.shardingsphere.test.natived.jdbc.databases.FirebirdTest runs fine under normal JVM, but fails under GraalVM Native Image, which is interesting.
  • update in 2025.01.14: According to the test results of https://github.com/apache/shardingsphere/actions/runs/12768181816/job/35588020566?pr=34307 , org.apache.shardingsphere.test.natived.proxy.transactions.base.SeataTest's NativeTest will cause connection leaks and destroy the unit test of SS JDBC, which is too outrageous.
  • update in 2025.01.15: First, we need to deal with #34358 . Otherwise, I won’t know what the missing GraalVM Reachability Meatdata is, and the log will be too messy.
  • update in 2025.01.18: My understanding is that there is absolutely no way I can work on the current issue until graalvm/native-build-tools#650 is resolved.
  • update in 2025.01.19: Seata's RM Client's behavior after destruction is very suspicious. I need to confirm something else.
[INFO] Running org.apache.shardingsphere.test.natived.jdbc.transactions.base.SeataTest
[ERROR] 2025-01-19 11:44:05.205 [main] o.a.s.config.ConfigurationFactory - failed to load non-spring configuration :not found service provider for : org.apache.seata.config.ConfigurationProvider
org.apache.seata.common.loader.EnhancedServiceNotFoundException: not found service provider for : org.apache.seata.config.ConfigurationProvider
[ERROR] 2025-01-19 11:44:05.427 [AsyncWorker_1_1_2] o.a.seata.rm.datasource.AsyncWorker - Failed to batch delete undo log
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:398)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:502)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:419)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)
        at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:155)
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
        at org.apache.seata.rm.datasource.undo.AbstractUndoLogManager.batchDeleteUndoLog(AbstractUndoLogManager.java:179)
        at org.apache.seata.rm.datasource.AsyncWorker.deleteUndoLog(AsyncWorker.java:182)
        at org.apache.seata.rm.datasource.AsyncWorker.dealWithGroupedContexts(AsyncWorker.java:162)
        at java.base/java.util.HashMap.forEach(HashMap.java:1429)
        at org.apache.seata.rm.datasource.AsyncWorker.doBranchCommit(AsyncWorker.java:125)
        at org.apache.seata.rm.datasource.AsyncWorker.doBranchCommitSafely(AsyncWorker.java:107)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1570)
Caused by: java.io.EOFException: null
        at org.postgresql.core.PGStream.receiveChar(PGStream.java:469)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2166)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:371)
        ... 19 common frames omitted
[ERROR] 2025-01-19 11:44:05.428 [AsyncWorker_1_1_2] o.a.seata.rm.datasource.AsyncWorker - Failed to rollback JDBC resource after deleting undo log failed
java.sql.SQLException: Connection is closed
        at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection.lambda$getClosedConnection$0(ProxyConnection.java:515)
        at jdk.proxy3/jdk.proxy3.$Proxy37.rollback(Unknown Source)
        at com.zaxxer.hikari.pool.ProxyConnection.rollback(ProxyConnection.java:396)
        at com.zaxxer.hikari.pool.HikariProxyConnection.rollback(HikariProxyConnection.java)
        at org.apache.seata.rm.datasource.AsyncWorker.deleteUndoLog(AsyncWorker.java:189)
        at org.apache.seata.rm.datasource.AsyncWorker.dealWithGroupedContexts(AsyncWorker.java:162)
        at java.base/java.util.HashMap.forEach(HashMap.java:1429)
        at org.apache.seata.rm.datasource.AsyncWorker.doBranchCommit(AsyncWorker.java:125)
        at org.apache.seata.rm.datasource.AsyncWorker.doBranchCommitSafely(AsyncWorker.java:107)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1570)
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 37.43 s -- in org.apache.shardingsphere.test.natived.jdbc.transactions.base.SeataTest

@linghengqian linghengqian marked this pull request as ready for review January 21, 2025 04:51
@linghengqian linghengqian added this to the 5.5.3 milestone Jan 21, 2025
@strongduanmu strongduanmu merged commit 98a94fc into apache:master Jan 21, 2025
148 checks passed
@linghengqian linghengqian deleted the firebird branch January 21, 2025 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants