Bug 9102 - net_applet segfaults when connect to internet via right click (b/c libnotify/glib2.0 created a thread)
Summary: net_applet segfaults when connect to internet via right click (b/c libnotify/...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High critical
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 10289
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-18 13:00 CET by Kiki Syahadat
Modified: 2014-01-08 05:04 CET (History)
9 users (show)

See Also:
Source RPM: drakx-net, Gtk2::Queue, perl-Gtk2-Notify, libnotify, glib2.0
CVE:
Status comment:


Attachments
GDB trace with symbols (1.54 KB, text/plain)
2013-02-19 21:04 CET, Thierry Vignaud
Details
thread creation trace: notify_notification_show() -> _notify_get_proxy() (4.85 KB, text/plain)
2013-03-27 08:03 CET, Thierry Vignaud
Details

Description Kiki Syahadat 2013-02-18 13:00:38 CET
Description of problem:

When you right click on net_applet on tray then click on connect/disconnect to internet, net_applet suddenly disappear.


Version-Release number of selected component (if applicable):

drakx-net-applet-1.18-1.mga3


How reproducible:


Steps to Reproduce:
1. right click on net_applet icon on tray
2. click connect/disconnect ...
3.
Comment 1 Thierry Vignaud 2013-02-19 20:38:58 CET
works for me.
What desktop are you using (GNOME3, GNOME Classic, KDE, ...)?
Is the net_applet processus still there after?
If not, can you start net_applet from a terminal, then redo your procedure
then report back any error message here.

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Thierry Vignaud 2013-02-19 21:03:56 CET

Keywords: NEEDINFO => (none)

Comment 2 Thierry Vignaud 2013-02-19 21:04:10 CET
Created attachment 3531 [details]
GDB trace with symbols

actually it's segfaulting (and I've already seen that trace in others BR)
Thierry Vignaud 2013-02-19 21:07:58 CET

Priority: Normal => release_blocker
Summary: net_applet disappear when connect to internet via right click => net_applet segfaults when connect to internet via right click
Source RPM: drakx-net-1.18-1.mga3.src.rpm => drakx-net-1.18-1.mga3
Severity: normal => critical

Comment 3 Kiki Syahadat 2013-02-19 23:34:30 CET
I am using KDE
Prosses' gone after right click. When I started from terminal then redo prosses it said segfault.

Sorry if someone has reported this bug.
Comment 4 Thierry Vignaud 2013-02-19 23:35:33 CET
Multiple reports are fine, we got more info this way such as a way to reproduce.
Comment 5 Malo Deniélou 2013-03-21 19:55:27 CET
Any idea on this Thierry? Can I assign this bug to you?

CC: (none) => pierre-malo.denielou

Malo Deniélou 2013-03-26 22:54:13 CET

Status: NEW => ASSIGNED
Assignee: bugsquad => thierry.vignaud

Comment 6 Thierry Vignaud 2013-03-27 07:00:39 CET
it segfaults in the CHLD signal handler.
Commenting it out fixes it.

strange thing is that it has two threads and it dies in the other thread.

Blino, does that ring something to you?

CC: (none) => mageia

Comment 7 Thierry Vignaud 2013-03-27 07:13:47 CET
Once we (un)connect once, it has two threads.
it's hard to debug as under strace, the ifup commands do not happen
Comment 8 Thierry Vignaud 2013-03-27 07:39:23 CET
And the winner is 
Not running this fixes it:
        $notification_queue->add({
            title => $old_description || $current_description || N("Network connection"),
            pixbuf => network::net_applet::get_state_pixbuf(),
            message => get_state_message($old_interface || $current_interface),
        }) if $show;

reduced to this line in ugtk2:
    eval { $notification->show };

Before we have one thread, after two threads

@blino: Giving that Gtk2::Notify isn't maintained since 2007, what about throwing those out?
Might be the fc patch on perl-Gtk2-Notify or libnotify

Source RPM: drakx-net-1.18-1.mga3 => drakx-net-1.18-1.mga3, Gtk2::Queue, perl-Gtk2-Notify, libnotify

Comment 9 Thierry Vignaud 2013-03-27 08:03:08 CET
Created attachment 3664 [details]
thread creation trace: notify_notification_show() -> _notify_get_proxy()
Thierry Vignaud 2013-03-28 07:03:54 CET

Summary: net_applet segfaults when connect to internet via right click => net_applet segfaults when connect to internet via right click (b/c libnotify/glib2.0 created a thread)
Source RPM: drakx-net-1.18-1.mga3, Gtk2::Queue, perl-Gtk2-Notify, libnotify => drakx-net, Gtk2::Queue, perl-Gtk2-Notify, libnotify, glib2.0

Thierry Vignaud 2013-03-28 07:14:48 CET

CC: (none) => olav

Comment 11 Thierry Vignaud 2013-03-28 07:24:43 CET
ccing dbug & glib maintainers who may know why a thread is created for a syncrhonous operation?
or may know how to prevent glib to spawn threads?

CC: (none) => mageia
See Also: (none) => https://bugzilla.redhat.com/show_bug.cgi?id=835112

Comment 12 Thierry Vignaud 2013-03-28 07:48:39 CET
Or maybe should we explicitely create a perl thread prior to loading/initializing gtk+2, and do all the notifications from this thread, thus needing some dialog API between the two threads.
libnotify sucks :-(
Comment 13 Thierry Vignaud 2013-03-28 08:04:21 CET
or fork() rather than threads.
Or if as action is used, forking notify-send instead.

what's strange is that we do not got such errors on mgaapplet though we've got some strange segfaults.
and mgaapplet also has 2 threads once a bubble has been shown...
Comment 14 Thierry Vignaud 2013-03-29 07:51:52 CET
For now, it's workarounded (not fixed) in drakxtools-15.31:
we no more display those notification bubbles.

But the root issue remains
Comment 15 Colin Guthrie 2013-03-29 11:12:30 CET
Doing initialisation before forking or in random threads is a really bad idea generally.

It would likely be far easier to simply implement things by sending direct dbus messages in perl... Not that I'm volunteering :D
Comment 16 Thierry Vignaud 2013-03-29 19:13:32 CET
well libnotify is supposed to do that job for the apps.
Synchronously.
Without glib creating a thread behind.
Comment 17 Thierry Vignaud 2013-03-30 08:33:55 CET
I think I'll try rebuild libnotify6, link perl-Gtk2-Notify with it, reenable notification bubbles in order to see if it fixes it.
Anyway we'll have to report this upstream.
They've broken 8 years working code...
Comment 18 Thierry Vignaud 2013-04-06 07:11:29 CEST
No more release critical as it's "workarounded"

Priority: release_blocker => High

Comment 19 Alex Loginov 2013-05-26 19:58:43 CEST
net_applet segfaults in Mageia 3. Users haves many problems with Internet connection via net_applet.

CC: (none) => loginov_alex

Comment 20 Manuel Hiebel 2013-05-28 21:51:09 CEST
*** Bug 10078 has been marked as a duplicate of this bug. ***

CC: (none) => jeanluc.szewczyk

Comment 21 Thierry Vignaud 2013-05-28 22:51:08 CEST
bug #10078 has nothing to do with that one
Comment 22 Alex Loginov 2013-05-29 15:28:07 CEST
[gaurii@localhost ~]$ gdb -q --args perl /usr/bin/net_applet                                                                               
Reading symbols from /usr/bin/perl...Reading symbols from /usr/lib/debug/usr/bin/perl5.16.3.debug...done.                                   
done.                                                                                                                                       
(gdb) run                                                                                                                                   
Starting program: /usr/bin/perl /usr/bin/net_applet                                                                                         
[Thread debugging using libthread_db enabled]                                                                                               
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: the debug information found in "/usr/lib/debug/usr/lib64/libfreetype.so.6.10.0.debug" does not match "/lib64/libfreetype.so.6" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib64/libfreetype.so.6.10.0.debug" does not match "/lib64/libfreetype.so.6" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib64//libfreetype.so.6.10.0.debug" does not match "/lib64/libfreetype.so.6" (CRC mismatch).

Detaching after fork from child process 7508.
Detaching after fork from child process 7510.
Detaching after fork from child process 7511.
[New Thread 0x7fffe7217700 (LWP 7512)]
Detaching after fork from child process 7513.
Detaching after fork from child process 7514.
Detaching after fork from child process 7515.
Detaching after fork from child process 7516.
Cannot open /dev/input/eventX: ÐÑказано в доÑÑÑпе
Cannot open /dev/input/eventX: ÐÑказано в доÑÑÑпе
Cannot open /dev/input/eventX: ÐÑказано в доÑÑÑпе
Cannot open /dev/input/eventX: ÐÑказано в доÑÑÑпе
Detaching after fork from child process 7517.
Detaching after fork from child process 7518.
Detaching after fork from child process 7519.
Detaching after fork from child process 7520.
Detaching after fork from child process 7521.
Detaching after fork from child process 7522.
Detaching after fork from child process 7523.
Detaching after fork from child process 7524.
Detaching after fork from child process 7525.
Detaching after fork from child process 7526.
Detaching after fork from child process 7527.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe7217700 (LWP 7512)]
Perl_csighandler (sig=17, sip=<optimized out>, uap=<optimized out>) at mg.c:1381
1381               (sig == SIGSEGV || (PL_signals & PERL_SIGNALS_UNSAFE_FLAG)))
Missing separate debuginfos, use: debuginfo-install lib64freetype6-2.4.11-2.mga3.x86_64
(gdb)
Detlef Schmidt 2013-07-01 14:18:05 CEST

CC: (none) => detlefschmidt

Comment 23 Andy V 2013-08-05 17:14:09 CEST
When you right click on net_applet on tray then click on active_interface t, net_applet suddenly disappear.


Version-Release number of selected component (if applicable):

drakx-net-applet-1.24-1.mga3

How reproducible:


Steps to Reproduce:
1. right click on net_applet icon on tray
2. click active_interface ...

CC: (none) => asw

Comment 24 Thierry Vignaud 2013-12-27 16:01:21 CET
Doesn't happen anymore since switching to gtk3

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 25 Thierry Vignaud 2014-01-08 05:04:18 CET
Actually this might have been bug #10289

Depends on: (none) => 10289


Note You need to log in before you can comment on or make changes to this bug.