Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#37548 - [networkmanager] dispatcher script ends up with zombie process

Attached to Project: Arch Linux
Opened by Robert Orzanna (orschiro) - Wednesday, 30 October 2013, 08:17 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 13 September 2014, 18:54 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Take this simple dispatcher script:

#!/bin/bash

INTERFACE=$1 # The interface which is brought up or down
STATUS=$2 # The new state of the interface

case "$STATUS" in
up) # $INTERFACE is up
su -c "DISPLAY=:0 dropboxd &" orschiro
;;
down) # $INTERFACE is down
;;
esac

All it does is to start dropbox daemon after a successful connection. The result is, however, that the dropbox tray icon appears for ~3 seconds before it disappears again.

A zombie process remains:

~ $ ps aux | grep dropbox
orschiro 779 0.0 0.0 0 0 tty1 Z Okt29 0:23 [dropbox] <defunct>

I doubt that this error is related to Dropbox only. For some reasons the dispatcher scripts seems to kill the executed process after while.

Additional info:

network-manager-applet 0.9.8.4-2
networkmanager 0.9.8.8-1
networkmanager-dispatcher-crashplan-systemd 1.0-2
networkmanager-dispatcher-dropbox 1.0-2
networkmanager-dispatcher-ntpd 1.0-6
networkmanager-openvpn 0.9.8.4-1
networkmanager-pptp 0.9.8.4-1
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 13 September 2014, 18:54 GMT
Reason for closing:  None
Additional comments about closing:  from user: Nobody else seems to be affected by this. I am no longer using networkmanager.
Comment by Robert Orzanna (orschiro) - Saturday, 09 November 2013, 07:44 GMT
I found a solution. It happens because NM-dispatcher is for short-lived scripts and there is a 3 sec timeout: https://bugzilla.redhat.com/show_bug.cgi?id=982734

What however works is to add RemainAfterExit=yes to the service file. Maybe you should think of adding that to the default package.

~ $ cat /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
[Unit]
Description=Network Manager Script Dispatcher Service

[Service]
Type=dbus
BusName=org.freedesktop.nm_dispatcher
ExecStart=/usr/lib/networkmanager/nm-dispatcher.action
RemainAfterExit=yes

[Install]
Alias=dbus-org.freedesktop.nm-dispatcher.service
Comment by Alexander F. Rødseth (xyproto) - Friday, 06 December 2013, 11:59 GMT
/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service (or /usr/lib/systemd/system/dbus-org.freedesktop.nm-dispatcher.service) does not exist in any official networkmanager-related package, as far as I could tell.

Are you requesting "RemainAfterExit=yes" to be added to /usr/lib/systemd/system/NetworkManager-dispatcher.service (which is owned by the networkmanager package)?
Comment by Robert Orzanna (orschiro) - Sunday, 12 January 2014, 06:33 GMT
Yes. I was talking about a modification of /usr/lib/systemd/system/NetworkManager-dispatcher.service to add RemainAfterExit=yes as a temporary workaround until maybe the 3 seconds timeout is changed upstream?

Loading...