Describe the bug
When starting a connection, give the following warning
GLib-LOG **: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/perl5/5.30/vendor_perl/Glib/Object/Introspection.pm line 67.
GLib-LOG **: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/perl5/5.30/vendor_perl/Glib/Object/Introspection.pm line 67.
GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/share/perl5/vendor_perl/Gtk3.pm line 555.
Desktop (please complete the following information):
Thanks for the feedback.
I do believe that it does not really hurt. I mean: it was already the case for a long time, the upstream projects decided to display a warning since the newer version, this is a very good piece of information :-)
At this stage, I'm not yet sure if this is something needs to be fixed in 脕sbr煤 or in Gtk / Gtk-perl or Glib-introspection or maybe somewhere else !
If somebody has a better understanding of these new warnings, please let use now.
Hi to all.
I confirm this "bug" on Debian Experimental.
GLib-LOG *: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
GLib-LOG *: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/share/perl5/Gtk3.pm line 555.
It seems to work good anyway.
Thanks to all.
Mirko
Is there any way to hide these warnings?
Hiding the warnings/errors would also be acceptable for me. The errors and warnings just clutter up the terminal window. That is actually my complaint...
Fyi, I created an issue to the upstream project (Gtk3-perl) : https://gitlab.gnome.org/GNOME/perl-gtk3/-/issues/7
Some notes while searching...
1)
Message has been added recently in glib --> https://gitlab.gnome.org/GNOME/glib/-/blob/master/NEWS#L114-115
Related merge request : https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1337
2)
A very minimal code to reproduce the error is:
use Glib::Object::Introspection;
use Gtk3 -init;
Glib::Object::Introspection->setup(basename => 'Gio',
version => '2.0',
package => 'Glib::IO');
my $app = Gtk3::Application->new('test.test', []);
$app->register();
3)
Added line:
print("Invoke $basename $namespace $name @_\n");
on line 67 of /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm and ran the minimal code with gdb (gdb --args perl test.pl), this shows:
Starting program: /usr/bin/perl test.pl
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff49de700 (LWP 29651)]
[New Thread 0x7ffff41dd700 (LWP 29652)]
Invoke Gtk Application new Gtk3::Application test.test ARRAY(0x5555558ae470)
Invoke Gio Application register Gtk3::Application=HASH(0x555556cfcdc0)
GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 68.
[Thread 0x7ffff41dd700 (LWP 29652) exited]
[Thread 0x7ffff49de700 (LWP 29651) exited]
[Inferior 1 (process 29646) exited normally]
So the message looks to be generated in to Gio application register.
4)
Code of Gio application register can be found here https://gitlab.gnome.org/GNOME/glib/-/blob/master/gio/gapplication.c#L2175-2214
I don't see any obvious reference to the environment there...
5)
A (hopefully) similar application in python does not generate the same kind of warning:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import sys
class MyApplication(Gtk.Application):
def __init__(self):
Gtk.Application.__init__(self)
def do_activate(self):
print("activated")
app = MyApplication()
if (app.register()):
print("registered")
exit_status = app.run(sys.argv)
sys.exit(exit_status)
Tunneling issue with windows system asking password even password is saved already and if we enter the password again then it shows wrong password and try again option.
This is with Focal Fosa Ubuntu 20.04
GLib-LOG *: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
GLib-LOG *: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/share/perl5/Gtk3.pm line 555.
-------------
W A R N I N G
-------------
THIS IS A PRIVATE COMPUTER SYSTEM.
This is an official computer system and the property of One97 Communications Ltd. and It is for authorized users only. Unauthorized users are prohibited. Users (authorized or unauthorized) have no explicit or implicit expectation of privacy. Any or all uses of this system may be subject to one or more of the following actions: interception, monitoring, auditing, inspection and disclosing to security personnel and law enforcement personnel, as well as authorized officials of other agencies, both domestic and foreign. By using this system, the user consents to these actions. Unauthorized or improper use of this system may result in administrative disciplinary action and civil and criminal penalties. By accessing this system you indicate your awareness of and consent to these terms and conditions of use. Discontinue access immediately if you do not agree to the conditions stated in this notice.
Administrator@localhost's password:
Permission denied, please try again.
Administrator@localhost's password: LOG **: Name com.canonical.AppMenu.Registrar does not exist on the session bus
Permission denied, please try again.
Administrator@localhost's password:
Administrator@localhost: Permission denied (publickey,password).
@master-vineet please avoid posting the same issue everywhere and stay on topic. Your issue does not seem related to setenv/putenv. As already suggest, please check your password prompt in advanced settings or create a dedicated issue.
Good news : it looks like the root issue has been identified ! The guilty one is perl-glib that is reporting a debug message, even if the appropriate debug flag is not set.
And a patch is now available, see https://gitlab.gnome.org/GNOME/perl-glib/-/merge_requests/5
Is there anyone to check if it works ?
When starting a connection, give the following warning
GLib-LOG **: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/perl5/5.30/vendor_perl/Glib/Object/Introspection.pm line 67. GLib-LOG **: setenv()/putenv() are not thread-safe and should not be used after threads are created at /usr/lib/perl5/5.30/vendor_perl/Glib/Object/Introspection.pm line 67. GLib-LOG **: unsetenv() is not thread-safe and should not be used after threads are created at /usr/share/perl5/vendor_perl/Gtk3.pm line 555.
Confirmed bug/issue on Fedora 32
Thanks for the fix. It is really confusing when I first saw these warnings.
Yes confusing and very annoying ; we'll need to wait for the next release of the upstream perl-Gtk3 package to have it fixed for everyone.
In the meantime, you can use a locally compiled version of that package by doing something like:
git clone https://gitlab.gnome.org/GNOME/perl-glib.git
cd perl-glib.git
perl Makefile.PL PREFIX=/some/local/lib/location
make
make install
and then you can run 脕sbr煤 with that local library with something like:
export PERL5LIB=/some/local/lib/location/perl5/lib/x86_64-linux-gnu/perl/5.30.0:$PERL5LIB
asbru-cm
Fyi, a new step has been made in the right direction, see https://mail.gnome.org/archives/gtk-perl-list/2020-June/msg00002.html where you'll read the announcement of the new perl-glib package (version 1.3293) that includes the necessary fix.
Next step is to have to included in the various distributions ; please contact the packagers if needed...
Fixed in Archlinux with glib-perl 1.3293. Hope it will be soon in official repos.
I confirm, that updating to glib-perl 1.3293, it is resolved.
If you do not want to wait for an official release
guess will work for similar debian distributions, tested on Linux Mint 20
install with synaptics: libglib2.0-dev
or
sudo apt install libglib2.0-dev
then
sudo cpanm -i Glib
You should see a message similar to
--> Working on Glib
Fetching http://www.cpan.org/authors/id/X/XA/XAOC/Glib-1.3293.tar.gz ... OK
Configuring Glib-1.3293 ... OK
Building and testing Glib-1.3293 ... OK
Successfully installed Glib-1.3293 (upgraded from 1.3292)
1 distribution installed
@hanspr
Thanks for the fix.
For me i have had also to install cpanminus package
apt install cpanminus
Now everything is fine :+1:
Most helpful comment
If you do not want to wait for an official release
guess will work for similar debian distributions, tested on Linux Mint 20