From nobody@FreeBSD.org  Tue Dec 24 13:41:32 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id B62AF830
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Dec 2013 13:41:32 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 8866E1212
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Dec 2013 13:41:32 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rBODfVaO080897
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Dec 2013 13:41:31 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rBODfVGK080896;
	Tue, 24 Dec 2013 13:41:31 GMT
	(envelope-from nobody)
Message-Id: <201312241341.rBODfVGK080896@oldred.freebsd.org>
Date: Tue, 24 Dec 2013 13:41:31 GMT
From: Mark Martinec <Mark.Martinec+freebsd@ijs.si>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Graphical console on 10-RC locks up on heavy writing
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185156
>Category:       misc
>Synopsis:       Graphical console on 10-RC locks up on heavy writing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 24 13:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Mark Martinec
>Release:        stable/10 (= 10-RC2)
>Organization:
J. Stefan Institute
>Environment:
FreeBSD xxx.ijs.si 10.0-PRERELEASE FreeBSD 10.0-PRERELEASE #0 r259614: Thu Dec 19 18:45:02 CET 2013     mark@xxx.ijs.si:/usr/obj/usr/src/sys/SIESTA  amd64
>Description:
Copying a topic from the freebsd-stable ML:
  http://lists.freebsd.org/pipermail/freebsd-stable/2013-December/076571.html
  http://lists.freebsd.org/pipermail/freebsd-stable/2013-December/076573.html
submitted here so as not to be forgotten:

Mark Martinec wrote on 2013-12-23:

FreeBSD amd64, recent stable/10:
When running some task on a graphical console window
and that task writes lots of output to a console, the
console gets stuck after some time (like 20 minutes),
output stops, keyboard appears unresponsive, alt-ctrl-Fn
is unable to switch consoles - but the machine seems
otherwise sane: I can log in over ssh, file system and
processes are healthy, CPU not busy.

This was first noticed trying to rebuild kde from
ports in a console window. Same happened when bulk
updating packages from a remote site and the pkg update
was busily writing its output to a console.

The same heavy tasks (e.g. ports rebuild) can run
just fine in an ssh session, or in a konsole / xterm.

As a final proof, I tried a perl one-liner which
writes a line (a count and some text) ten times per
second: it manages to screw up the console window
in about 6 minutes.

Interestingly, while the console output is stuck
and I blindly type a command on a keyboard (no echo),
then run a shutdown from another (ssh) session,
the console output gets unstuck during shutdown,
rapidly displays the missing lines, including the
echo of a command typed blindly previously, along
with its output.

Btw, this never happened on this machine while it was
running 9.2 or older versions.



Adrian Chadd wrote on 2013-12-23:

I see this when the kernel is outputting debugging .. the console can
quickly lock up exactly how you describe. I've never figured out why
though. :(

>How-To-Repeat:
On a console run any program that writes lots of output,
e.g. the following perl one-liner:

perl -e '@a=("a".."z","0".."9"); for (;;) {
  printf("%d %s %s\n", ++$n, join("",@a), scalar localtime);
  push(@a, shift @a); select(undef,undef,undef,0.1) }'
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
