linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: snazy@snazy.de
Cc: Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Potyra, Stefan" <Stefan.Potyra@elektrobit.com>
Subject: Re: mlockall(MCL_CURRENT) blocking infinitely
Date: Fri, 25 Oct 2019 13:46:33 +0200	[thread overview]
Message-ID: <20191025114633.GE17610@dhcp22.suse.cz> (raw)
In-Reply-To: <70393308155182714dcb7485fdd6025c1fa59421.camel@gmx.de>

On Fri 25-10-19 13:02:23, Robert Stupp wrote:
> On Fri, 2019-10-25 at 11:21 +0200, Michal Hocko wrote:
> > On Thu 24-10-19 16:34:46, Randy Dunlap wrote:
> > > [adding linux-mm + people]
> > >
> > > On 10/24/19 12:36 AM, Robert Stupp wrote:
> > > > Hi guys,
> > > >
> > > > I've got an issue with `mlockall(MCL_CURRENT)` after upgrading
> > > > Ubuntu 19.04 to 19.10 - i.e. kernel version change from 5.0.x to
> > > > 5.3.x.
> > > >
> > > > The following simple program hangs forever with one CPU running
> > > > at 100% (kernel):
> >
> > Can you capture everal snapshots of proc/$(pidof $YOURTASK)/stack
> > while
> > this is happening?
> 
> Sure,
> 
> Approach:
> - one shell running
>   while true; do cat /proc/$(pidof test)/stack; done
> - starting ./test in another shell + ctrl-c quite some times
> 
> Vast majority of all ./test invocations return an empty 'stack' file.
> Some tries, maybe 1 out of 20, returned these snapshots.
> Was running 5.3.7 for this test.
> 
> 
> [<0>] __handle_mm_fault+0x4c5/0x7a0
> [<0>] handle_mm_fault+0xca/0x1f0
> [<0>] __get_user_pages+0x230/0x770
> [<0>] populate_vma_page_range+0x74/0x80
> [<0>] __mm_populate+0xb1/0x150
> [<0>] __x64_sys_mlockall+0x11c/0x190
> [<0>] do_syscall_64+0x5a/0x130
> [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [<0>] __handle_mm_fault+0x4c5/0x7a0
> [<0>] handle_mm_fault+0xca/0x1f0
> [<0>] __get_user_pages+0x230/0x770
> [<0>] populate_vma_page_range+0x74/0x80
> [<0>] __mm_populate+0xb1/0x150
> [<0>] __x64_sys_mlockall+0x11c/0x190
> [<0>] do_syscall_64+0x5a/0x130
> [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> 
> 
> [<0>] __handle_mm_fault+0x4c5/0x7a0
> [<0>] handle_mm_fault+0xca/0x1f0
> [<0>] __get_user_pages+0x230/0x770
> [<0>] populate_vma_page_range+0x74/0x80
> [<0>] __mm_populate+0xb1/0x150
> [<0>] __x64_sys_mlockall+0x11c/0x190
> [<0>] do_syscall_64+0x5a/0x130
> [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> 
> 
> [<0>] __do_fault+0x3c/0x130
> [<0>] do_fault+0x248/0x640
> [<0>] __handle_mm_fault+0x4c5/0x7a0
> [<0>] handle_mm_fault+0xca/0x1f0
> [<0>] __get_user_pages+0x230/0x770
> [<0>] populate_vma_page_range+0x74/0x80
> [<0>] __mm_populate+0xb1/0x150
> [<0>] __x64_sys_mlockall+0x11c/0x190
> [<0>] do_syscall_64+0x5a/0x130
> [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> 

This is expected.

> // doubt this one is relevant
> [<0>] __wake_up_common_lock+0x7c/0xc0
> [<0>] __wake_up_sync_key+0x1e/0x30
> [<0>] __wake_up_parent+0x26/0x30
> [<0>] do_notify_parent+0x1cc/0x280
> [<0>] do_exit+0x703/0xaf0
> [<0>] do_group_exit+0x47/0xb0
> [<0>] get_signal+0x165/0x880
> [<0>] do_signal+0x34/0x280
> [<0>] exit_to_usermode_loop+0xbf/0x160
> [<0>] do_syscall_64+0x10f/0x130
> [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Hmm, this means that the task has exited so how come there are 
other syscalls happening. Are you sure you are collecting stacks for the
correct task?
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2019-10-25 11:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  7:36 mlockall(MCL_CURRENT) blocking infinitely Robert Stupp
2019-10-24 23:34 ` Randy Dunlap
2019-10-25  9:21   ` Michal Hocko
2019-10-25 11:02     ` Robert Stupp
2019-10-25 11:46       ` Michal Hocko [this message]
2019-10-25 11:50         ` Michal Hocko
2019-10-25 11:59           ` Robert Stupp
2019-10-25 13:19             ` Robert Stupp
2019-10-25 11:55         ` Robert Stupp
2019-10-25 12:05           ` Michal Hocko
2019-10-25 12:11             ` Michal Hocko
2019-10-25 13:10               ` Robert Stupp
2019-10-25 13:27                 ` Michal Hocko
2019-10-25 13:45                   ` Robert Stupp
2019-10-25 13:57                     ` Michal Hocko
2019-10-25 14:00                       ` Michal Hocko
2019-10-25 15:58                         ` Robert Stupp
2019-11-05 13:23                           ` Robert Stupp
2019-11-05 15:28                             ` Vlastimil Babka
2019-11-05 18:22                               ` Johannes Weiner
2019-11-05 20:05                                 ` Robert Stupp
2019-11-06 10:25                                   ` Robert Stupp
2019-11-06 11:26                                     ` Robert Stupp
2019-11-06 12:04                                       ` Jan Kara
2019-11-06 12:24                                       ` Robert Stupp
2019-11-06 12:03                                 ` Jan Kara
2019-11-06 13:45                                   ` Robert Stupp
2019-11-06 14:35                                     ` Jan Kara
2019-11-06 15:32                                       ` Robert Stupp
2019-11-06 14:38                                     ` Jan Kara
2019-11-06 14:56                                     ` Josef Bacik
2019-11-06 15:05                                       ` Jan Kara
2019-11-06 15:14                                         ` Josef Bacik
2019-11-06 15:25                                           ` Jan Kara
2019-11-06 16:39                                           ` Robert Stupp
2019-11-06 17:03                                             ` Robert Stupp
2019-11-06 17:25                                               ` Jan Kara
2019-11-07  8:08                                                 ` Robert Stupp
2019-11-20 12:42                                                   ` Robert Stupp
2019-10-25 13:55                   ` Robert Stupp

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=20191025114633.GE17610@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=Stefan.Potyra@elektrobit.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rdunlap@infradead.org \
    --cc=snazy@snazy.de \
    /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).