public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Shu Wang <shuwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] controllers/cgroup_fj: fix longtime wait cgroup_fj_proc.
Date: Fri, 14 Oct 2016 04:07:13 -0400 (EDT)	[thread overview]
Message-ID: <227857597.6660541.1476432433891.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20161013142604.GA14300@rei>



----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: shuwang@redhat.com
> Cc: ltp@lists.linux.it
> Sent: Thursday, October 13, 2016 10:26:04 PM
> Subject: Re: [LTP] [PATCH 1/1] controllers/cgroup_fj: fix longtime wait cgroup_fj_proc.
> 
> Hi!
> > On some machines, when many cgroup_fj_proc created on the background,
> > killall may failed to find and kill them all as the processes are
> > just created and not ready. And that will cause the ltp testrun wait
> > forever. So changed to use kill -9 instead.
> 
> What is the exact race here? What exactly "just created and not ready"
> means here?

The case cgroup_fj_stress.sh creates many cgroup subgroups according to
$1 (subgroup_num) and $2 (subgroup_depth) parameters, and if $3 
attach_operation is 'each', it creates cgroup_fj_proc on the background
attached to each subgroup.

The race here is to use 'killall -9 cgroup_fj_proc' right after background
processes cgroup_fj_proc were created. And a few cgroup_fj_proc processes
may not be killed, still running on the background, stalls the wait command.

reproducer:
for i in `seq 10`
do
 sleep 10000 &
done;
killall -9 sleep;
wait;                  #stall here


> 
> --
> Cyril Hrubis
> chrubis@suse.cz
> 

  reply	other threads:[~2016-10-14  8:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13  3:05 [LTP] [PATCH 1/1] controllers/cgroup_fj: fix longtime wait cgroup_fj_proc shuwang
2016-10-13 14:26 ` Cyril Hrubis
2016-10-14  8:07   ` Shu Wang [this message]
2016-10-17 14:04     ` Cyril Hrubis

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=227857597.6660541.1476432433891.JavaMail.zimbra@redhat.com \
    --to=shuwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /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