Devuan logs - #176, boring messages


Message sent to devuan-bugs@lists.dyne.org, owner@bugs.devuan.org:


X-Loop: owner@bugs.devuan.org
Subject: bug#176: vde2: ifup plugin-stanza "vde2-plug" does not capture correct PID
Reply-To: Guenther Brunthaler <5i6itdpybzgshcivvdxsjck8@nurfuerspam.de>, 176@bugs.devuan.org
Resent-From: Guenther Brunthaler <5i6itdpybzgshcivvdxsjck8@nurfuerspam.de>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: owner@bugs.devuan.org
Resent-Date: Sat, 20 Jan 2018 07:03:01 UTC
Resent-Message-ID: <handler.176.B.15164310073721@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: report 176
X-Devuan-PR-Package: vde2
X-Devuan-PR-Keywords: 
Received: via spool by submit@bugs.devuan.org id=B.15164310073721
          (code B ref -1); Sat, 20 Jan 2018 07:03:01 UTC
Received: (at submit) by bugs.devuan.org; 20 Jan 2018 06:50:07 +0000
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by fulcanelli with IMAP (fetchmail-6.3.26)
	for <debbugs@localhost> (single-drop); Sat, 20 Jan 2018 07:50:07 +0100 (CET)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.22])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id BB294F609B9
	for <submit@bugs.devuan.org>; Sat, 20 Jan 2018 07:43:23 +0100 (CET)
Received: from [10.157.38.112] ([178.165.130.246]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LZiQy-1f6Jo617Eq-00lTfK; Sat, 20
 Jan 2018 07:43:14 +0100
From: Guenther Brunthaler <5i6itdpybzgshcivvdxsjck8@nurfuerspam.de>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Message-ID: <5c3fe9c4-ad74-2704-b73e-a5ce50ba3163@nurfuerspam.de>
Date: Sat, 20 Jan 2018 07:43:10 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.5.2
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:tjoWr6/R12t6fEqLIOmrPEiApwJ3zocVkqwOKNTN9ldYMptqHhL
 xNhL2uH0TeqhzqpcvtBCJzjqpMfgK/Y9EgYZaOd3EXMbUo3JSM0OJYkH+9CKTAfN5xcwxZ7
 FaUAuGntb/8NvEMNkMUxiEXk2sfT22/SGPMyFQwpPhVUldhQZnMoDBIz0xrm/XmDZw0jir3
 3AkYGXcWEVStY7aoj9ejQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:GAajBQmZvvc=:aJTWUy0cjKOjH5M1Ag0m3/
 sjuLSd1Et2VR+HP792h39aoEXcv0uw2+nGMgadSlPxWAPkSDunSIT0rA6fTVaeIZ5JRIcOivU
 sR2dAXSQcwoPzm4RGQz9lw55ICbxH4BLiDB+Wwdj8hHzvIUnBCj26xNQ4L19E6Atz0OSxwIyc
 Mh76930V9dfsGjyhAECupeGCPTmqTPVCNO4CWIKDzv3T0Mr7quugCNrAOpk/c7fu5+15WT3Jw
 wUHdb1qFtl4a0bZBBLYlEEsqeOfoRW93n11TjXCiME5knOgmPx08k3OeAgUz/k5o0fv3xD8oc
 6bZ0Ky5acxGqWP2r8+61PEq0d6NC5QwlFUUnK4JYC5HaKd8O/yJSLACiugw+9RdaDXugXG0mR
 F6m4A+4Kl7UHMmHqQKXtBfNdmFB0zeEkImLYXEWdJ7YceQRVUgL65nv48RBxzKdKCO5w2GsH1
 NLE3js6YLexhHJWd3gxL9OINSD3itSfbjN9KrOfj0Y83D3AlkNE57rhhYZQCBPlIASzd0PnCv
 Ge0lYhXPvnL9+slyb1tIr8EFZOQO5JAvZx0UKFFRHsMK+xJ+S91Q8Is7a15jk8m+0V0Cys2v+
 wpAKDSUUdpctvzU0UFAlUwVNAvwcFMe9q//RDC47bq0xaqvqTWTRj0cB+XtMTQ83P1ph0OXI1
 p/EgDTw4HRAQedGkyt4hl0PY6/Yak1mx9UXVESWRmh2Wot6Ou9SbWx8+NkD6ECEJD+mkzMdrZ
 5Yhows9MvO9PcS31oaljQt5IufqRHesZ6b2OEEzNB59if7iW9orrdYZhllGJ71np+4ZA3zYec
 HY5j1TjBS1mxsEELOlCz4dsh5ylOTGWyeFj19M6Wo8YwvzcXywEdsYf0nRirvWD8f19u32I
X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_LOCAL_NOVOWEL,
	RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_PASS
	autolearn=disabled version=3.4.1
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tupac3.dyne.org

Package: vde2
Version: 2.3.2+r586-1
Severity: normal
X-Debbugs-Cc: 5i6itdpybzgshcivvdxsjck8@nurfuerspam.de

Dear Maintainer,


Preliminary remark: Even though I am using Devuan rather then Debian, I
have verified that the problem still exists in the current "stretch"
version (vde2_2.3.2+r586-2.1_amd64.deb) of the package.

"ifup" for a virtual VDE2 tun/tap plug records an incorrect PID for the
vde_plug2tap process in the pidfile, and "ifdown" will therefore not be
able to shut it down.

As a consequence, the vde_plug2tap process keeps running, wasting
resources, and the tun/tap interface remains still visible with
ifconfig -a, even though it will have been deconfigured.

The problem arises when using ifup/ifdown to configure additional
tun/tap interfaces for a VDE2 switch.

Such additional network interfaces are necessary when binding normal
applications running on the local box (and not in VM guests) to
different VLANs managed by the same virtual VDE2 switch.

For instance, when adding the following /etc/network/interfaces entry

iface ethsmb inet static
         vde2-plug vde_plug2tap -p 5 -s /var/run/vde2/ethvm.ctl ethsmb
         address 10.35.43.113
         netmask 255.255.0.0

then "ifup ethsmb" makes a new network interface "ethsmb" appear which 
is connected to port 5 on the virtual switch (which itself manages 
another network interface "ethvm").

"ifdown ethsmb" should make the new interface go away, but it won't.

The problem is located in plug-in script /etc/network/if-pre-up.d/vde2
from the package.

This script contains a command

start-stop-daemon --start --quiet --pidfile $PIDFILE \
--make-pidfile --background \
--exec $DPIPE -- $VDE_PLUG -g $GROUP -m 660 $CTLDIR = "$@"

It seems dpipe double-forks under certain situations, at least in this
case, and so the --background option of start-stop-daemon has no effect
and the --pidfile captures the wrong PID.

This can also be verified by just running the resulting dpipe command
manually without the "start-stop-daemon": It returns immediately,
obviously forking the processes into the background, and $! does *not*
contain a valid process ID.

I have also figured out what needs to be changed in order to make 
everything work as intended again: Just exchange the order of commands 
connected with dpipe. In other words, change the

    --exec $DPIPE -- $VDE_PLUG -g $GROUP -m 660 $CTLDIR = "$@"

line into

    --exec $DPIPE -- "$@" = $VDE_PLUG -g $GROUP -m 660 $CTLDIR

It turns out that the order of commands in dpipe is not irrelevant if 
the processes have different lifetimes.

In such a case, the first command must be that with the longer lifetime, 
because dpipe will exec itself into that command, and its PID will be 
used by the caller of dpipe in order to terminate the pipeline later.

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 1.0 (jessie)
Release:	1.0
Codename:	jessie
Architecture: x86_64

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages vde2 depends on:
ii  adduser      3.113+nmu3
ii  libc6        2.19-18+deb8u10
ii  libpcap0.8   1.6.2-2
ii  libvde0      2.3.2+r586-1
ii  libvdeplug2  2.3.2+r586-1

vde2 recommends no packages.

Versions of packages vde2 suggests:
pn  qemu           <none>
ii  qemu-kvm       1:2.1+dfsg-12+deb8u6
ii  vde2-cryptcab  2.3.2+r586-1

-- no debconf information


Message sent:


X-Loop: owner@bugs.devuan.org
From: owner@bugs.devuan.org (Devuan bug Tracking System)
To: Guenther Brunthaler <5i6itdpybzgshcivvdxsjck8@nurfuerspam.de>
Subject: bug#176: Acknowledgement (vde2: ifup plugin-stanza "vde2-plug" does not capture correct PID)
Message-ID: <handler.176.B.15164310073721.ack@bugs.devuan.org>
In-Reply-To: <5c3fe9c4-ad74-2704-b73e-a5ce50ba3163@nurfuerspam.de>
References: <5c3fe9c4-ad74-2704-b73e-a5ce50ba3163@nurfuerspam.de>
Precedence: bulk
X-Devuan-PR-Message: ack 176
X-Devuan-PR-Package: vde2
X-Devuan-PR-Keywords: 
Reply-To: 176@bugs.devuan.org

Thank you for the problem report you have sent regarding Devuan.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers mailing list for
their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 owner@bugs.devuan.org

If you wish to submit further information on your problem, please send
it to 176@bugs.devuan.org (and *not* to
submit@bugs.devuan.org).

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Devuan Bugs Owner
(administrator, Devuan bugs database)


Message received at control@bugs.devuan.org:


Received: (at control) by bugs.devuan.org; 18 Feb 2018 19:40:06 +0000
Return-Path: <OmegaPhil@startmail.com>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by fulcanelli with IMAP (fetchmail-6.3.26)
	for <debbugs@localhost> (single-drop); Sun, 18 Feb 2018 20:40:05 +0100 (CET)
Received: from mx-out1.startmail.com (mx-out1.startmail.com [145.131.90.139])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 2897CF60997
	for <control@bugs.devuan.org>; Sun, 18 Feb 2018 20:35:13 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; unprotected) header.d=startmail.com header.i=@startmail.com header.b="GFzHghS1";
	dkim-atps=neutral
To: control@bugs.devuan.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=startmail.com;
	s=2017-11; t=1518982480;
	bh=1OCVZDyMLBKAUfTdMsNnOQ2sERL41GIP7+04psLqo6w=;
	h=To:From:Date:From;
	b=GFzHghS1VmAUGCd4vsa4vqw8NQwsFDN9PuFvgjR4kn6ed0xhVKBwY11EAcWNX9KGW
	 92/ds7fCweCNM4Fk6U3+KC22PJT/hCUIO/LeIZ7hoq3mJfDYOrhQY07kWrQkBf37fE
	 U0a9ADsedyBQONLcqmVEcnIgrlm5hGmMIm7OqwQWv3KffBYELxd7AGoECU6igSS8vw
	 UnJjBp0F+qPJwwz3Zy24li+TivLoN16cUB+B2AqpLrU1Qsh8BZD15Iu7OPyFgQEQyy
	 ELKzz2bKtLtltLc5JD+kgy+WxlFOwrU0pjfDw50jc7QzjsEPqSILsufw5KcXv3JlF2
	 kqBAIENB3aylA==
From: OmegaPhil <OmegaPhil@startmail.com>
Message-ID: <15266628-8a38-eae5-84c1-c4e5c50f6e17@startmail.com>
Date: Sun, 18 Feb 2018 19:34:39 +0000
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,MISSING_SUBJECT,RP_MATCHES_RCVD,SPF_PASS autolearn=disabled
	version=3.4.1
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tupac3.dyne.org

tags 14 ascii
tags 157 ceres
tags 178 jessie
tags 129 jessie ascii
tags 184 ascii
tags 174 ascii
tags 172 ascii
tags 171 jessie ascii
tags 170 jessie
tags 116 experimental
tags 177 ascii
tags 42 ascii
tags 181 ascii
tags 161 jessie
tags 180 ascii
tags 176 jessie
tags 76 jessie ascii
tags 173 ascii
tags 179 ceres
tags 182 ascii
tags 56 jessie


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Fri, 5 Jun 2020 02:39:01 UTC