Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756344AbcJHNXO (ORCPT ); Sat, 8 Oct 2016 09:23:14 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.231]:9618 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752487AbcJHNXL (ORCPT ); Sat, 8 Oct 2016 09:23:11 -0400 X-Greylist: delayed 424 seconds by postgrey-1.27 at vger.kernel.org; Sat, 08 Oct 2016 09:23:10 EDT Date: Sat, 8 Oct 2016 09:16:04 -0400 From: Steven Rostedt To: Tony Luck Cc: Joe Perches , Linus Torvalds , Jiri Kosina , Colin Ian King , Linux Kernel Mailing List Subject: Re: [GIT PULL] trivial for 4.9 Message-ID: <20161008131603.GA7021@home.goodmis.org> References: <1475870688.1945.13.camel@perches.com> <1475871538.1945.15.camel@perches.com> <1475872401.1945.17.camel@perches.com> <1475876667.1945.28.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) X-RR-Connecting-IP: 107.14.168.6:25 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1611 Lines: 43 On Fri, Oct 07, 2016 at 04:09:51PM -0700, Tony Luck wrote: > On Fri, Oct 7, 2016 at 4:01 PM, Tony Luck wrote: > > What if there isn't a "next printk" call for hours, or days? > > > > That poor little message without a "\n" will sit in the kernel buffers, > > and the user who might want to see the message can't, until some > > unrelated thing happens to print something. > > Retracted ... I'm sure that at some point in the past it happened like > that ... but > I just retested on 4.8 and the first message (with no "\n") showed up on the > serial port just fine without some other message to push it out. When the > next message came along, a "\n" was auto-inserted. > No there was a small window in time that it did just that. And it caused me a day of debugging. My ftrace self tests at boot up do something like: printk("testing X...."); if (test(X)) printk(" PASSED\n"); else printk(" FAILED\n"); And with this new change, the "testing X..." never appeared, but it caused the system to crash, It confused me because it crashed right after a: testing Y.... PASSED came out. Thus I was debugging why Y failed caused the system crash even though it reported a passing statement. The sad part was that my bug came in after this updated to printk. So in bisecting I didn't notice. But what I did notice in bisecting, was test X, and I tried that, and sure enough it crashed. Then that's where I started looking at changes in printk. I made a minor stink about it, and we converted the behavior back to where kernel writes to printk would always go to the console. -- Steve