unix-junkie/persistence-benchmark

GlobalsConnectionJNI.connectImpl may leave native code in an inconsistent state

unix-junkie opened this issue · 2 comments

When attempting to connect to a Caché instance, which is down,
the first attempt results in the following exception:

com.intersys.globals.GlobalsException: lc_conn::connect_device returned Db_err: source: lc_conn::connect()  message: lc_conn::connect: CacheSecureStart returned -1: <FAILURE>
    at com.intersys.globals.internal.GlobalsConnectionJNI.connectImpl(Native Method)
    at com.intersys.globals.internal.GlobalsConnectionJNI.connect(GlobalsConnectionJNI.java:107)
    at com.intersys.globals.internal.isc.GlobalsConnectionJNIInternal.connect(GlobalsConnectionJNIInternal.java:54)
    at com.intersys.xep.EventPersister.connect(EventPersister.java:124)

This is a completely legitimate behaviour. The second attempt, however, results in

com.intersys.globals.GlobalsException: Must disconnect before connecting to a different database, namespace, or user
    at com.intersys.globals.internal.GlobalsConnectionJNI.connectImpl(Native Method)
    at com.intersys.globals.internal.GlobalsConnectionJNI.connect(GlobalsConnectionJNI.java:107)
    at com.intersys.globals.internal.isc.GlobalsConnectionJNIInternal.connect(GlobalsConnectionJNIInternal.java:54)
    at com.intersys.xep.EventPersister.connect(EventPersister.java:124)

Hello,
When I tried connecting Intersystems Cache` Globals using JNI, I see the following exception. Could you please help me in fixing this?

lc_conn::connect_device returned Db_err: source: lc_conn::connect() message: lc_conn::connect: CacheSecureStart returned -15:

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000000045ab78, pid=5132, tid=9084

JRE version: Java(TM) SE Runtime Environment (7.0_60-b19) (build 1.7.0_60-b19)

Java VM: Java HotSpot(TM) 64-Bit Server VM (24.60-b09 mixed mode windows-amd64 compressed oops)

Problematic frame:

C [lcbjni.dll+0xab78]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:

c:\intersystems\trycache1\mgr\hs_err_pid5132.log

If you would like to submit a bug report, please visit:

http://bugreport.sun.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

Hello,

  • For native code problems in InterSystems Caché, emerging during Globals API or XEP usage, please contact InterSystems Support
  • For native code problems in GlobalsDB, use GlobalsDB forum.

I can diagnose Java-related problems only.