mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Kernel panic on Lenovo X60 with tracing enabled
Date: Fri, 10 Mar 2017 12:18:58 -0600	[thread overview]
Message-ID: <20170310181858.xh46uslrdkvmxej5@treble> (raw)
In-Reply-To: <bea1b2d8-6cd6-28b1-7214-a3ed7da2eb1e@molgen.mpg.de>

On Fri, Mar 10, 2017 at 09:53:29AM +0100, Paul Menzel wrote:
> Dear Josh,
> 
> 
> On 03/10/17 00:04, Josh Poimboeuf wrote:
> > On Thu, Mar 09, 2017 at 09:43:47PM +0100, Paul Menzel wrote:
> > > On 2017-03-09 17:29, Steven Rostedt wrote:
> > > > On Thu, 9 Mar 2017 10:16:02 -0600 Josh Poimboeuf wrote:
> > > > 
> > > > > On Thu, Mar 09, 2017 at 09:36:30AM -0500, Steven Rostedt wrote:
> > > > > > On Thu, 9 Mar 2017 13:12:28 +0100 Paul Menzel wrote:
> > > 
> > > > > > > Hopefully, I am contacting the right people for my issue.
> > > > > > > 
> > > > > > > Suspending a system with Linux 4.9.13 with tracing enabled, it fails
> > > > > > > with the screen still enabled, and the LED blinking. Attaching a serial
> > > > > > > console to the dock, shows the messages below.
> > > > > > 
> > > > > > I'm betting this is a compiler bug, as that bug that printed is the
> > > > > > internal ftrace check for it. (note the bug is only in x86-32 not
> > > > > > x86-64)
> > > > > > 
> > > > > > Funny, we are just talking about this bug in another thread, but with a
> > > > > > different symptom.
> > > > > > 
> > > > > > Josh, did you say this goes away if you disable optimize for size or
> > > > > > does it need to be enabled?
> > > > > 
> > > > > Yeah, assuming it's the same problem, then this is caused by
> > > > > CONFIG_CC_OPTIMIZE_FOR_SIZE.  It would be fixed by changing it to
> > > > > CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE.
> > > > 
> > > > Paul, do you have CONFIG_CC_OPTIMIZE_FOR_SIZE enabled? Can you set it
> > > > to PERFORMANCE and see if the problem goes away?
> > > 
> > > As far as I can see, the Debian Linux kernel is built with
> > > `CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y`.
> > > 
> > > So it might be a different problem?
> > 
> > Is it a stock Debian kernel?  If so, do you have a link where it can be
> > downloaded?
> 
> Sure, hopefully [3] works for you.
> 
> ```
> dpkg -x linux-image-4.9.0-0.bpo.2-686-pae-unsigned_4.9.13-1~bpo8+1_i386.deb
> target-directory

Thanks, that helped.  One of the functions on the stack trace has the
buggy prologue:

acpi_pm_device_sleep_wake:
  c138048c:	57                   	push   %edi
  c138048d:	8d 7c 24 08          	lea    0x8(%esp),%edi
  c1380491:	83 e4 f8             	and    $0xfffffff8,%esp
  c1380494:	ff 77 fc             	pushl  -0x4(%edi)
  c1380497:	55                   	push   %ebp
  c1380498:	89 e5                	mov    %esp,%ebp
  c138049a:	57                   	push   %edi
  c138049b:	56                   	push   %esi
  c138049c:	53                   	push   %ebx
  c138049d:	83 ec 0c             	sub    $0xc,%esp
  c13804a0:	e8 e7 bf 21 00       	call   0xc159c48c (mcount)

And the config file indeed has CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y.

I found the root cause after a little digging.  drivers/acpi/Makefile is
setting '-Os' manually:

  ccflags-y                       := -Os

That line predates git history, so I don't know why it's there, but I'd
guess we can probably remove it.  I'll submit a fix for it along with
the other -maccumulate-outoing-args related patch I was going to do.

-- 
Josh

      reply	other threads:[~2017-03-10 18:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 12:12 Paul Menzel
2017-03-09 14:36 ` Steven Rostedt
2017-03-09 16:16   ` Josh Poimboeuf
2017-03-09 16:29     ` Steven Rostedt
2017-03-09 20:43       ` Paul Menzel
2017-03-09 23:04         ` Josh Poimboeuf
2017-03-10  8:53           ` Paul Menzel
2017-03-10 18:18             ` Josh Poimboeuf [this message]

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=20170310181858.xh46uslrdkvmxej5@treble \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=rostedt@goodmis.org \
    /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

all inboxes | Powered by JetHome®