linux-um archives
 help / color / mirror / Atom feed
From: Thomas Meyer <thomas@m3y3r.de>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: "user-mode-linux-devel@lists.sourceforge.net"
	<user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] uml_net zombie processes
Date: Sun, 09 Aug 2015 20:22:56 +0200	[thread overview]
Message-ID: <1439144576.559700.5.camel@m3y3r.de> (raw)
In-Reply-To: <CAFLxGvyaL0WrSmfqrdQ8uV576tg_Jo=hupeEo1x+EF_-sYdF3g@mail.gmail.com>

Am Sonntag, den 09.08.2015, 19:57 +0200 schrieb Richard Weinberger:
> On Wed, Jul 15, 2015 at 3:58 PM, Thomas Meyer <thomas@m3y3r.de> 
> wrote:
> > Am Mittwoch, den 15.07.2015, 12:12 +0200 schrieb Richard 
> > Weinberger:
> > > On Mon, Jul 13, 2015 at 5:12 PM, Thomas Meyer <thomas@m3y3r.de>
> > > wrote:
> > > > Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard 
> > > > Weinberger:
> > > > > Am 13.07.2015 um 17:08 schrieb Thomas Meyer:
> > > > > > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard
> > > > > > Weinberger:
> > > > > > > Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
> > > > > > > > > Yeah. And please add a dump_stack() to figure out 
> > > > > > > > > where
> > > > > > > > > it
> > > > > > > > > was
> > > > > > > > > called.
> > > > > > > > 
> > > > > > > > I think calling dump_stack() somehow changed the errno 
> > > > > > > > to
> > > > > > > > 25?!
> > > > > > > 
> > > > > > > > 
> > > > > > > > +extern __attribute__((regparm(0))) void 
> > > > > > > > dump_stack(void);
> > > > > > > 
> > > > > > > Hmm, maybe the regparm(0) kills your stack.
> > > > > > > Anyway, how do you trigger the issue?
> > > > > > > I tried here and don't see any zombie processes?
> > > > > > > In my setup I run UML as non-root and tap0 is owned by 
> > > > > > > root.
> > > > > > > -> UML is unable to setup eth0.
> > > > > > > But no zombies here.
> > > > > > 
> > > > > > I run UML as non-root user, tun is:
> > > > > > 
> > > > > > $ ll /dev/net
> > > > > > insgesamt 0
> > > > > > crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun
> > > > > > 
> > > > > > $ ll /usr/bin/uml_net
> > > > > > -rwsr-x---. 1 root uml-net 31472 19. Aug 2014 
> > > > > >  /usr/bin/uml_net
> > > > > 
> > > > > And eth0=tuntap,tap?
> > > > 
> > > > yes,
> > > > 
> > > > eth0=tuntap,,,192.168.10.2
> > > 
> > > Sorry for the late reply.
> > Hi,
> > 
> > null problemo.
> > 
> > > I'm still burred in work issues and had no time to look in detail 
> > > at
> > > this.
> > > 
> > > But in the meanwhile you can try to gather some more Infos.
> > > Remove the dump_stack() and add some printk()s.
> > > I'm interested which PIDs are returned and waited for.
> > 
> > Mhh.. I think the pid is already printed in error case:
> > 
> > [   15.930000] helper_wait : waitpid process 11673 failed, errno = 
> > 10
> > [   15.930000] * modprobe tun
> >                * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 
> > up
> >                * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> > [   20.480000] helper_wait : waitpid process 11780 failed, errno = 
> > 10
> > [   20.480000] * route add -host 192.168.10.2 dev tap0
> >                * bash -c echo 1 > 
> > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> > 
> > pid 11673 and pid 11780 in above case were the two zombie 
> > processes.
> > 
> > errno 10 = ECHILD
> > 
> > which can happen for the waitpid() call, according to the man page:
> > 
> >        ECHILD (for  waitpid()  or waitid()) The process specified 
> > by pid (waitpid()) or idtype and id (waitid()) does not exist or
> >               is not a child of the calling process.  (This can 
> > happen for one's own child if the action for  SIGCHLD  is  set  to
> >               SIG_IGN.  See also the Linux Notes section about 
> > threads.)
> > 
> > I'm not able to completely figure out above meaning, so...
> > But maybe ECHILD is returned because uml_net is run with setuid bit
> > set?
> > 
> > any ideas?
> 
> The attached fix should fix the issue. Please confirm.
> 

Hi,

yes, the uml_net zombie processes are gone now!

many thanks for this patch!

with kind regards
thomas


------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


      reply	other threads:[~2015-08-09 18:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 13:41 [uml-devel] uml_net zombie processes Thomas Meyer
2015-07-13 13:52 ` Richard Weinberger
2015-07-13 13:58   ` Thomas Meyer
2015-07-13 14:00     ` Richard Weinberger
2015-07-13 14:24       ` Thomas Meyer
2015-07-13 14:41         ` Richard Weinberger
2015-07-13 15:08           ` Thomas Meyer
2015-07-13 15:11             ` Richard Weinberger
2015-07-13 15:12               ` Thomas Meyer
2015-07-15 10:12                 ` Richard Weinberger
2015-07-15 13:58                   ` Thomas Meyer
2015-08-09 17:57                     ` Richard Weinberger
2015-08-09 18:22                       ` Thomas Meyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439144576.559700.5.camel@m3y3r.de \
    --to=thomas@m3y3r.de \
    --cc=richard.weinberger@gmail.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox