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-next>] [day] [month] [year] [list]
Message-Id: <20181027.205830.1547905692901578490.davem@davemloft.net>
Date:   Sat, 27 Oct 2018 20:58:30 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     acme@...nel.org
CC:     linux-kernel@...r.kernel.org, kan.liang@...el.com
Subject: UI messages in event thread hangs perf top


If I run perf top with a "make -j128" kernel build, I get ring buffer event
processing timeouts which results in:

		ui__warning("Too slow to read ring buffer.\n"
			    "Please try increasing the period (-c) or\n"
			    "decreasing the freq (-F) or\n"
			    "limiting the number of CPUs (-C)\n");

from perf_top__mmap_read().

This hangs the main event thread.  Only the display thread runs after
this point.

We can't issue UI messages from the event thread, because those will
hang waiting for a keypress.  The display thread will eat any keys
we press and the event thread thus hangs forever.

I can tell this is what has happened because the histogram entries
continue to decay, yet the event count stops increasing.

If I put a gdb on the perf process, indeed the backtrace in the event
processing thread is in the select() call done by ui__getch().

Adding insult to injury, the display thread immediately overwrites the
warning message printed by the event thread, and thus the user has no
chance to even see it.

I really wonder how this was tested.

Perhaps we should mark the event thread in a special way and trigger
assertions if UI messages are printed from it.  Again, any such
operation will hang the thread and stop all event processing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ