lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120111155658.GB26659@elte.hu>
Date:	Wed, 11 Jan 2012 16:56:59 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	David Ahern <dsahern@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Suresh Siddha <suresh.b.siddha@...el.com>
Subject: Re: [BUG] kernel freezes with latest tree

* Peter Zijlstra <peterz@...radead.org> wrote:

> On Wed, 2012-01-11 at 10:04 +0100, Peter Zijlstra wrote:
> > Maybe adding a few more NEED_BREAK bits
> > and making it a counter and overflowing it into ABORT might be good.
> > 
> > 
>
> I could reproduce and confirm something like the below makes 
> the hang go-away. I haven't managed to fully understand why 
> we're stuck though because we do release the runqueue locks 
> and re-enable IRQs on this lock-break.

Well, what happens if every CPU runs load_balance() and we keep 
triggering:

                if (loops++ > sysctl_sched_nr_migrate) {
                        *lb_flags |= LBF_NEED_BREAK;
                        break;
                }

in this case load_balance() will do the retry:

                if (lb_flags & LBF_NEED_BREAK) {
                        lb_flags &= ~LBF_NEED_BREAK;
                        goto redo;
                }

but the retry starts the loop again:

        list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) {

so nobody is able to make progress: livelock/lockup.

( This also explains why i was unable to see this in my 
  randomized testing: my tests never extreme enough to trigger 
  the sysctl_sched_nr_migrate threshold. )

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ