Re: [platform-dev] Adding new version of JNA library in orbit

2022-09-02 Thread Muhammad Umair Sair
Thanks for providing the feedback. I investigated further and the problem 
turned out to be different and can happen with updated jna as well. Opened 
following PRs.

https://github.com/eclipse-equinox/equinox/pull/110
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/pull/533

- Umair


From: platform-dev  on behalf of Aleksandar 
Kurtakov 
Sent: Wednesday, August 31, 2022 11:24 AM
To: Eclipse platform general developers list. 
Subject: Re: [platform-dev] Adding new version of JNA library in orbit



On Wed, Aug 31, 2022 at 9:11 AM Ed Merks 
mailto:ed.me...@gmail.com>> wrote:

The platform is  pulling that directly from Maven:


[cid:182f28ff1495140cc251]


The generate maven dependency resolves to a much newer version:


[cid:182f28ff14a238574b2]


The versions are available here( with 5.21.1 being the latest):


  https://repo1.maven.org/maven2/net/java/dev/jna/jna/


The version would need to be changed here:


https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/67bf36e6dcd414163905a05e72c30c66a5b5b164/eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target#L178-L189


So it's best to open an issue in that repository


https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues

Submitting PR would be even better. I'm afraid that it's too late for 2022-09 
release as the final build is supposed to literally happen today and bumping 
JNA now will give zero time for other projects to adjust nor any time for 
bugfixes. If there is PR submitted now we can do the license check/approval and 
etc. and have the change in I-build (for 2022-12) hopefully next week.




On 31.08.2022 01:29, Muhammad Umair Sair 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 ''

(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?

[1] https://github.com/java-native-access/jna/pull/1402

Thanks,
Umair Sair



___
platform-dev mailing list
platform-dev@eclipse.org<mailto:platform-dev@eclipse.org>
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev


___
platform-dev mailing list
platform-dev@eclipse.org<mailto:platform-dev@eclipse.org>
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev


--
Aleksandar Kurtakov
Red Hat Eclipse Team
___
platform-dev mailing list
platform-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev


Re: [platform-dev] Adding new version of JNA library in orbit

2022-08-31 Thread Aleksandar Kurtakov
On Wed, Aug 31, 2022 at 9:11 AM Ed Merks  wrote:

> The platform is  pulling that directly from Maven:
>
>
>
> The generate maven dependency resolves to a much newer version:
>
>
>
> The versions are available here( with 5.21.1 being the latest):
>
>
>   https://repo1.maven.org/maven2/net/java/dev/jna/jna/
>
>
> The version would need to be changed here:
>
>
>
> https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/67bf36e6dcd414163905a05e72c30c66a5b5b164/eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target#L178-L189
>
>
> So it's best to open an issue in that repository
>
>
>
> https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues
>

Submitting PR would be even better. I'm afraid that it's too late for
2022-09 release as the final build is supposed to literally happen today
and bumping JNA now will give zero time for other projects to adjust nor
any time for bugfixes. If there is PR submitted now we can do the license
check/approval and etc. and have the change in I-build (for 2022-12)
hopefully next week.


>
>
>
> On 31.08.2022 01:29, Muhammad Umair Sair 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 ''
>
> (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?
>
> [1] https://github.com/java-native-access/jna/pull/1402
>
> Thanks,
> Umair Sair
>
> ___
> platform-dev mailing listplatform-...@eclipse.org
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/platform-dev
>
> ___
> platform-dev mailing list
> platform-dev@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/platform-dev
>


-- 
Aleksandar Kurtakov
Red Hat Eclipse Team
___
platform-dev mailing list
platform-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev


Re: [platform-dev] Adding new version of JNA library in orbit

2022-08-31 Thread Ed Merks

The platform is  pulling that directly from Maven:



The generate maven dependency resolves to a much newer version:



The versions are available here( with 5.21.1 being the latest):


https://repo1.maven.org/maven2/net/java/dev/jna/jna/


The version would need to be changed here:


https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/67bf36e6dcd414163905a05e72c30c66a5b5b164/eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target#L178-L189


So it's best to open an issue in that repository


https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues




On 31.08.2022 01:29, Muhammad Umair Sair 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 ''


(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?

[1] https://github.com/java-native-access/jna/pull/1402

Thanks,
Umair Sair

___
platform-dev mailing list
platform-dev@eclipse.org
To unsubscribe from this list, 
visithttps://www.eclipse.org/mailman/listinfo/platform-dev___
platform-dev mailing list
platform-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev


[platform-dev] Adding new version of JNA library in orbit

2022-08-30 Thread Muhammad Umair Sair
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 ''

(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?

[1] https://github.com/java-native-access/jna/pull/1402

Thanks,
Umair Sair
___
platform-dev mailing list
platform-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev