linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Chanho Min <chanho.min@lge.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Christian Brauner <christian@brauner.io>,
	Anna-Maria Gleixner <anna-maria@linutronix.de>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Seungho Park <seungho1.park@lge.com>
Subject: Re: [PATCH] freezer: fix freeze timeout on exec
Date: Thu, 8 Nov 2018 11:50:30 +0100	[thread overview]
Message-ID: <20181108105030.GB9939@redhat.com> (raw)
In-Reply-To: <1541671796-8725-1-git-send-email-chanho.min@lge.com>

On 11/08, Chanho Min wrote:
>
> Suspend fails due to the exec family of fuctnions blocking the freezer.
> This issue has been found that it is mentioned in the ancient mail thread.
> The casue is that de_thread() sleeps in TASK_UNINTERRUPTIBLE waiting for all
> sub-threads to die, and we have the "deadlock" if one of them is frozen.
> It causes freeze timeout as bellows.
>
> Freezing of tasks failed after 20.010 seconds (1 tasks refusing to freeze, wq_busy=0):
> setcpushares-ls D ffffffc00008ed70     0  5817   1483 0x0040000d
>  Call trace:
> [<ffffffc00008ed70>] __switch_to+0x88/0xa0
> [<ffffffc000d1c30c>] __schedule+0x1bc/0x720
> [<ffffffc000d1ca90>] schedule+0x40/0xa8
> [<ffffffc0001cd784>] flush_old_exec+0xdc/0x640
> [<ffffffc000220360>] load_elf_binary+0x2a8/0x1090
> [<ffffffc0001ccff4>] search_binary_handler+0x9c/0x240
> [<ffffffc00021c584>] load_script+0x20c/0x228
> [<ffffffc0001ccff4>] search_binary_handler+0x9c/0x240
> [<ffffffc0001ce8e0>] do_execveat_common.isra.14+0x4f8/0x6e8
> [<ffffffc0001cedd0>] compat_SyS_execve+0x38/0x48
> [<ffffffc00008de30>] el0_svc_naked+0x24/0x28
>
> To fix this, I suggest a patch by emboding the mentioned solution.
> First, revive and rework cancel_freezing_and_thaw() function whitch stops the
> task from sleeping in refrigirator reliably. And, The task to be killed does not
> allow to freeze.

Can't we simply change de_thread() to use freezable_schedule() ?

Oleg.


  reply	other threads:[~2018-11-08 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 10:09 [PATCH] freezer: fix freeze timeout on exec Chanho Min
2018-11-08 10:50 ` Oleg Nesterov [this message]
2018-11-09  0:29   ` Chanho Min
2018-11-09  7:50   ` Chanho Min
2018-11-11  9:50 ` kbuild test robot
2018-11-11  9:51 ` kbuild test robot

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=20181108105030.GB9939@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anna-maria@linutronix.de \
    --cc=chanho.min@lge.com \
    --cc=christian@brauner.io \
    --cc=ebiederm@xmission.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=seungho1.park@lge.com \
    /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;
as well as URLs for NNTP newsgroup(s).