Bug 11929 - net_applet segfaults
Summary: net_applet segfaults
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on: 11286
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-08 12:16 CET by Colin Guthrie
Modified: 2013-12-09 11:24 CET (History)
7 users (show)

See Also:
Source RPM: drakx-net-applet-1.28-2.mga4
CVE:
Status comment:


Attachments
Backtrace of one crash (8.03 KB, text/plain)
2013-12-08 12:42 CET, Colin Guthrie
Details
Workaround (1.66 KB, text/plain)
2013-12-08 16:00 CET, Colin Guthrie
Details

Description Colin Guthrie 2013-12-08 12:16:44 CET
+++ This bug was initially created as a clone of Bug #11286 +++

From comment 17 on the above bug:

The error I report was confirmed some time ago by Claire Robinson (MrsB).

Here's the âhowtoâ.

I have installed all updates presented.

Normally the applet starts with KDE - and disappears (crashes) from the panel at the bottom of my screen when I try to (dis)connect wired ethernet.

I have disabled the applet below, and started it by a bash command instead

Pls find the output here [my comments in brackets]:

bash-4.2$ net_applet -v
Drakxtools version 16.11
Copyright (C) 1999-2008 Mandriva by <install@mandriva.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

bash-4.2$ net_applet 
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 304.
Cannot open /dev/input/eventX: Adgang nægtet [access denied]
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
[right click to open menu â click to connet wired ethernet]
*** Gtk3::Widget::get_visible: passed too many parameters (expected 1, got 2); ignoring excess at /usr/bin/net_applet line 388.
Segmentfejl 

[connect the wired net via network man. Center]

bash-4.2$ net_applet
[right click to open menu â click to disconnet wired ethernet]
*** Gtk3::Widget::get_visible: passed too many parameters (expected 1, got 2); ignoring excess at /usr/bin/net_applet line 388.
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
*** Gtk3::Widget::get_visible: passed too many parameters (expected 1, got 2); ignoring excess at /usr/bin/net_applet line 388.
*** Gtk3::Widget::get_visible: passed too many parameters (expected 1, got 2); ignoring excess at /usr/bin/net_applet line 388.
Segmentfejl

************

If I run it via bash as superuser the output is slightly different in both cases, but the app still crashes.
Comment 1 René Lagoni Neukirch 2013-12-08 12:24:21 CET
Also crashes when trying to connet wireless (wifi) network.
I right click on the applet and try to activate wifi via Activate connections (?) [in danish: Aktive grænsesnit] the menu point just below  ... VPN ...

bash-4.2$ net_applet 
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 304.
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Cannot open /dev/input/eventX: Adgang nægtet
Segmentfejl
Comment 2 Colin Guthrie 2013-12-08 12:42:10 CET
Created attachment 4595 [details]
Backtrace of one crash

Seems like a crash in glib, more specifically some dbus related something or other.

It also seems like net_applet does a lot of forking (i.e. once per second) which seems less than optimal...
Comment 3 Colin Guthrie 2013-12-08 14:48:00 CET
OK, so some investigation later it seems to be the usernetctl check that causes the crash...

In lib/network/tools.pm in run_interface_command we call:

system("/usr/sbin/usernetctl $intf report")

If I remove this, everything works fine.
Comment 4 Colin Guthrie 2013-12-08 16:00:57 CET
Created attachment 4597 [details]
Workaround

So there seems to be many references to perl system() and threads which is what seems to be the problem here. Not sure if there are any specific fixes we can apply globally.

As a work around, the attached patch works for me.
Comment 5 Colin Guthrie 2013-12-08 16:01:37 CET
Thierry, can you take a look at this patch? I'm certain there is a nicer way but this works for me.

Assignee: bugsquad => thierry.vignaud

Comment 6 Thierry Vignaud 2013-12-08 19:09:27 CET
Go ahead.

Keywords: (none) => PATCH
CC: (none) => mageia

Comment 7 Thierry Vignaud 2013-12-08 23:15:16 CET
Closing

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

Comment 8 René Lagoni Neukirch 2013-12-09 08:33:29 CET
Crash solved - CONFIRMED.

I just updated this morning, and it is now possible to disconnect the wired network without the applet crashing (seg.faulting).

Surprisingly the error reported e.g. under Bug 6031 seems to be fixed also.
I tried for the 1.001'st time to connect wifi via the applet - and EUREKA it works. I am writing this message via the wifi connection now.

PS. I don't know how to report across different errors/bug reports - but now you know.

PPS: Sorry Colin for shouting both confirmed and eureka :-)

Thank you so much, all of you, for a quick fix.
Comment 9 Colin Guthrie 2013-12-09 11:24:25 CET
(In reply to René Lagoni Neukirch from comment #8)
> PPS: Sorry Colin for shouting both confirmed and eureka :-)
> 
> Thank you so much, all of you, for a quick fix.

We generally don't get too annoyed when the shouts are praise ;)

Glad to have helped!

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