• threadsafe?

    By Patrick Kwintensson 11 months ago

    experiencing major problems with openlog. reported a case at HCL and according to their investigation the ODA framework code is not threadsafe. Here is a snippet of the report:

    3XMTHREADBLOCK Blocked on: org/openntf/domino/logging/LogFilterHandler@0x00000000C0C354A0 Owned by: "Thread-8" (J9VMThread:0x00000000008DC000, java/lang/Thread:0x00000000C0C1D3B0) 3XMHEAPALLOC Heap bytes allocated since last GC cycle=0 (0x0) 3XMTHREADINFO3 Java callstack: 4XESTACKTRACE at org/openntf/domino/logging/LogFilterHandler.publish(LogFilterHandler.java:299(Compiled Code)) 5XESTACKTRACE (entered lock: org/openntf/domino/logging/LogFilterHandler@0x00000000C0C354A0, entry count: 1) 4XESTACKTRACE at java/util/logging/Logger.log(Logger.java:738(Compiled Code)) 4XESTACKTRACE at java/util/logging/Logger.doLog(Logger.java:765(Compiled Code)) 4XESTACKTRACE at java/util/logging/Logger.log(Logger.java:788(Compiled Code)) 4XESTACKTRACE at java/util/logging/Logger.fine(Logger.java:1516(Compiled Code)) 4XESTACKTRACE at org/openntf/domino/impl/Base.getDelegate(Base.java:475(Compiled Code)) 4XESTACKTRACE at org/openntf/domino/impl/Session.getDatabase(Session.java:791(Compiled Code)) 5XESTACKTRACE (entered lock: java/lang/Object@0x00000000C0C1C688, entry count: 1) 4XESTACKTRACE at org/openntf/domino/impl/Session.getDatabase(Session.java:827(Compiled Code))

    the "entered lock" reflect a java lock, one uses these for example to make an application thread safe

    LogFilterHandler.publish(LogFilterHandler.java:299 ---> that's opensource openntf

    Refer to : - https://github.com/OpenNTF/org.openntf.domino/blob/develop/domino/core/src/main/java/org/openntf/domino/logging/LogFilterHandler.java some info around synchronization in java: https://codegym.cc/groups/posts/377-top-50-job-interview-questions-and-answers-for-java-core-part-2

    better (its just to a quick grasp on multi thread sync/locks that one needs when coding a multithreaded app)

    https://www.codejava.net/java-core/concurrency/java-synchronization-tutorial-part-1-the-problems-of-unsynchronized-code

    Java Synchronization Tutorial Part 1 - The Problems of Unsynchronized Code

    To know how synchronization works in Java, you need to understand what kinds of problem your application may face without synchronized code

    • By Patrick Kwintensson 11 months ago

      the result is that I get a deadlock on an NSF and the code is no longer usable for the user. or brings even the whole server down after a while. many sessions open for the user even when browser is closed.