leaking closed terminals with Java 8 on Debian Stretch Terminator problem (28.241.7409/7409/7409/1.8.0_272-8u272-b10-0+deb9u1-b10/Linux 4.9.0-12-amd64/amd64 x12)

17 views
Skip to first unread message

Martin Dorey

unread,
Dec 14, 2020, 9:30:33 PM12/14/20
to terminator-users
A few times now I've had Terminator leaking.  As it just inconvenienced me to the point of having to close all my windows, I thought I'd go after it.  I'm running Debian Stretch and have what might be a free choice between Java 8 and Java 11.  If I'm running Java 11, then, after starting Terminator, and opening and closing a new window in it, then garbage collecting, the heap histogram shows just one TerminatorFrame.  With Java 8, it shows 2.  The real problem is that all the [C characters in the closed one remain allocated.  After fighting with jcmd and jhat, I thought that the problem might be "JNI Global References" from the Gnome accessibility support.  Wondering how to disable it, I found https://stackoverflow.com/questions/47985068/bug-in-gnomes-java-atk-wrapper-how-to-disable-accessibility-for-a-swing-compo which links to a bug reported filed against Gnome and raised from a Debian Stretch system.  Hmm.  The suggestion:

diff --git a/terminator/bin/terminator b/terminator/bin/terminator
index a9ccee24..26633905 100755
--- a/terminator/bin/terminator
+++ b/terminator/bin/terminator
@@ -113,6 +113,8 @@ class Terminator
         invoker.add_property("e.gui.HelpMenu.hasManual", "true")
         invoker.add_property("e.gui.HelpMenu.supportAddress", @support_address)
         invoker.add_property("e.gui.HelpMenu.supportSite", "http://groups.google.com/group/terminator-users")
+
+        invoker.add_property("javax.accessibility.assistive_technologies", "")
         
         invoker.launch()
     end
martind@sirius:~/jessies/work/terminator$

... worked for me.  The Gnome bug appears to have been reported to Debian as:

java-atk-wrapper: memory leak and performance issue

... where it was fixed in:

java-atk-wrapper (0.33.3-22) unstable; urgency=medium

... which I could get the benefit of with:

sudo aptitude install libatk-wrapper-java-jni/stretch-backports

Reverting to the Stretch version reintroduced the buggy behavior and going back to stretch-backports fixed it again.

mad

unread,
May 28, 2022, 2:15:00 AM5/28/22
to terminator-users
I'm suffering from leaking again.  Now I'm Debian Bullseye, with libatk-wrapper-java-jni 0.38.0-2+deb11u1.  A new Terminator passes the 2 windows back to 1 test below.  The instance I've been struggling to use in production has:

  91:            90          42480  terminator.TerminatorFrame

... but only the heap usage and histogram windows are open.

(29.41.7465/7465/7465/1.8.0_252-8u252-b09-1~deb9u1-b09/Linux 5.10.0-13-amd64/amd64 x8)

Not such a high quality report this time, sorry.
Reply all
Reply to author
Forward
0 new messages