Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orbit-dev] Adding new version of JNA library in orbit

On Wed, Aug 31, 2022 at 1:29 AM Muhammad Umair Sair <umair_sair@xxxxxxxxxxx> wrote:
Hi,

I am facing issue on Linux with NativeLibrary. When HTTPS proxy is set, I am getting errors on terminal error stream with consistency from org.eclipse.equinox.internal.security.linux.unlockSecretService(..) and following call in this method gets stuck forever.

            Pointer secretService = fLibSecret.secret_service_get_sync(SecretServiceFlags.SECRET_SERVICE_LOAD_COLLECTIONS,
                        Pointer.NULL, gerror);

On investigation, I found that its a race condition between finalizer and NativeLibrary.getInstance(..). On second time call to get secret-1 library, the object from weak reference is gone/GCed in NativeLibrary.libraries but the NativeLibrary object itself is not finalized/GCed yet, so it gets ref.get()==null and goes for reloading the library which causes following errors in console. The reason is that the older library was not unloaded yet and we loaded it again.

~~~~~~~~~~~~~~~~~~~~~~~~~
(java:3835014): GLib-GObject-WARNING **: 02:47:42.753: cannot register existing type 'SecretService'

(java:3835014): GLib-GObject-WARNING **: 02:47:42.753: cannot add private field to invalid (non-instantiatable) type '<invalid>'

(java:3835014): GLib-GObject-CRITICAL **: 02:47:42.753: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(java:3835014): GLib-GObject-CRITICAL **: 02:47:42.753: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(java:3835014): GLib-GObject-WARNING **: 02:47:42.753: cannot register existing type 'SecretBackend'

(java:3835014): GLib-GObject-CRITICAL **: 02:47:42.753: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(java:3835014): GLib-GObject-CRITICAL **: 02:47:42.753: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(java:3835014): GLib-CRITICAL **: 02:47:42.753: g_once_init_leave: assertion 'result != 0' failed

(java:3835014): GLib-GObject-CRITICAL **: 02:47:42.753: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
~~~~~~~~~~~~~~~~~~~~~~

I was looking at jna project and they have moved away from using finalizers [1] and it is available is version 5.12.

Can we add latest jna version in orbit for 2022-09?

I think it's too late for 2022-09, Jonah declared the final Orbit build for 2022-09 here https://www.eclipse.org/lists/orbit-dev/msg05575.html

_______________________________________________
orbit-dev mailing list
orbit-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/orbit-dev

Back to the top