[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181112095121.GA5695@amd>
Date: Mon, 12 Nov 2018 10:51:21 +0100
From: Pavel Machek <pavel@....cz>
To: Chanho Min <chanho.min@....com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Christian Brauner <christian@...uner.io>,
Oleg Nesterov <oleg@...hat.com>,
Anna-Maria Gleixner <anna-maria@...utronix.de>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
Seungho Park <seungho1.park@....com>,
Inkyu Hwang <inkyu.hwang@....com>,
Donghwan Jung <donghwan.jung@....com>,
Jongsung Kim <neidhard.kim@....com>
Subject: Re: [PATCH v2] exec: make de_thread() freezable
On Mon 2018-11-12 12:54:45, Chanho Min wrote:
> Suspend fails due to the exec family of functions blocking the freezer.
> 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.
> This also can occur with the schedule() waiting for the group thread leader
> to exit if it is frozen.
>
> In our machine, 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, make de_thread() freezable. It looks safe and works fine.
>
> Changes in v2:
> - changes for the same reason in "if (!thread_group_leader(tsk))" branch.
> (reported by Oleg)
>
> Suggested-by: Oleg Nesterov <oleg@...hat.com>
> Signed-off-by: Chanho Min <chanho.min@....com>
Acked-by: Pavel Machek <pavel@....cz>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists