Vertica jdbc connection freezes sometimes on 'Connection.commit()' call

Hi, we're experiencing problems using Vertica jdbc driver version 6.0.0 Sometimes, when calling 'connection.commit()' method, whole application freezes. 100% utilization of the CPU of the java process can be spotted then. It seems, that there is some unfinished loop in the internal Vertica jdbc code. See the stacktrace: ------------------------------------------------- java.lang.Thread.State: RUNNABLE at com.vertica.dataengine.VResultSet.close(Unknown Source) at com.vertica.core.VConnection.executeTransactionStatement(Unknown Source) - locked <0x000000074be88028> (a com.vertica.core.VConnection) at com.vertica.core.VConnection.commit(Unknown Source) - locked <0x000000074be88028> (a com.vertica.core.VConnection) at com.vertica.jdbc.SConnection.commit(Unknown Source) at org.jetel.connection.jdbc.specific.conn.BasicSqlConnection.commit(BasicSqlConnection.java:229) at org.jetel.connection.jdbc.SQLDataParser.close(SQLDataParser.java:376) at org.jetel.component.DBInputTable.processSqlQuery(DBInputTable.java:368) at org.jetel.component.DBInputTable.execute(DBInputTable.java:301) at org.jetel.graph.Node.run(Node.java:493) at java.lang.Thread.run(Thread.java:744) ------------------------------------------------- Problem seeems to be in the com.vertica.core.VConnection.executeTransactionStatement method (as I wrote above, there is IMHO the unfinished loop) The problem is very hard to reproduce (it happens once in hunderts calls) Thanks for your quick response.

Comments

  • wwong2wwong2 Employee
    Hi, for the version you are running, looking at the release notes, there is an issue with the connection.commit that was fixed in a patch that may apply.  Please review.

    The release note states

    VER-23494

    Connection.commit() did not commit changes made via
    PreparedStatement.executeBatch(). This issue has been
    resolved

    This is fixed in 6.0SP1


    Regards
  • Hi Wayne,

    that is another issue.

    Please, read my report above - I have problem, that causes the whole process FREEZE and that causes 100% CPU utilization, because of unfinished loop in internal vertica jdbc code.

    Furthermore, I do not run PreparedStatement.executeBatch(), I read data from the ResultSet.


    Regards
  • One more information: It seems to me, that this problem occurs after getting SQLException during the ResultSet read. So as it seems to me it can be replicated this way:

    1. Run some select - iterate over the ResultSet - you must get the exception during the iterating - in our environment, we sometimes get SocketException 'connection reset' 

    2. call 'commit' method on the connection right after catching the exception


    Following these steps, you should be able to reproduce it. It seems, that when getting the exception, some internal flag in the vertica jdbc code is switched badly and the cycle in com.vertica.core.VConnection.executeTransactionStatement iterates forever.



  • wwong2wwong2 Employee
    Thanks for the feedback.
    What patchset are you on for v6.0.0?  Checking on my side, there has been several bug fixes and changes in that part of the code you are hittng.  Can you apply the latest patchset if you are not already on it?

    Thanks
  • Could you please navigate me, where could I download that 'patchset'? I have simply v6.0.0

    Should I try to reproduce it on vertsion 7.0.0?
  • Sorry for confusion - I have v6.1.0
  • wwong2wwong2 Employee
    Hi, can you confirm exact version (if any patches) have been applied?

    issue command,
    select version():

    Regards
  • Wayne,

    do we understand each other?

    I'm having problems with JDBC driver - this is client (not server) code... Server version has nothing to do with this.
  • But if you wish - our server verison is : 'Vertica Analytic Database v6.1.3-0 '  

    Could you please show my report to someone from your engeneering? This is rather client JDBC driver problem - there is unfinished loop in your JDBC driver code - that is the problem - really, server version has little to do with it.
  • wwong2wwong2 Employee
    Hi Jakob, after discussing with dev, this appears to be a bug.  Can you provide the driver log (to set up, add loglevel=debug to the connection string) and a reproducer?  Are you able to log a support case?

    Regards

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file