Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590608

Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor module'

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor module'
Date Wed, 01 Mar 2017 21:10:02 +0100
Message-ID <tgiJs-82F-7@gated-at.bofh.it> (permalink)
References <tfg6Z-5dx-7@gated-at.bofh.it> <tfSvD-6NI-5@gated-at.bofh.it> <tfUxs-897-13@gated-at.bofh.it> <tfUxs-897-11@gated-at.bofh.it> <tghDH-77b-25@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BjtMSwNPJn/eO4aWSdktUBsHa0oB5etREaZfDMUkPBE=; b=O1qhXHGir2WvtW8aYpAgTVWudY 4NVA5OnHWO6OCLd5P2WF4W7f2F9ar13xFEQcvR5by7sDhCIt4ISaQ14+swE+JMZSIMg49gQhUxtry udW/lGNJFLzrnfSo58HxLO7Dh5FMKgqdEDtXekUGeizGhxnC/TS/vxOSwP/L1yjDGl/ugcvrACMOC TqvGxsQUIlnANS2CDBjUM0KfImIkTniEbEvhYZezXNFNQwUKZwxRfvEf9LWe6KeeQvKDD3s6aUolM wQNTPSoWys0yyELe6D4mNfLgOhZHJqNbxpiC0MTT4Kn+GyX7q0hq5SIsZz8GsaYDmhLhMLAJ/32Sf EetKfYeA==;
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.24 (2015-08-30)
X-Authenticated_Sender guenter@roeck-us.net
X-Outgoing-Spam-Status No, score=-1.0
X-Antiabuse This header was added to track abuse, please include it with any abuse report
X-Antiabuse Primary Hostname - bh-25.webhostbox.net
X-Antiabuse Original Domain - vger.kernel.org
X-Antiabuse Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse Sender Address Domain - roeck-us.net
X-Get-Message-Sender-Via bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net
X-Authenticated-Sender bh-25.webhostbox.net: guenter@roeck-us.net
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 82
Organization linux.* mail to news gateway
X-Original-Cc Sandra Loosemore <sandra@codesourcery.com>, Tobias Klauser <tklauser@distanz.ch>, Arnd Bergmann <arnd@arndb.de>, Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, Ley Foon Tan <lftan@altera.com>, nios2-dev@lists.rocketboards.org
X-Original-Date Wed, 1 Mar 2017 11:45:21 -0800
X-Original-Message-ID <20170301194520.GA20160@roeck-us.net>
X-Original-References <20170226210338.GA19476@roeck-us.net> <20170228155331.GC27998@distanz.ch> <58B5B934.5040807@codesourcery.com> <20170228181413.GC13455@roeck-us.net> <20170301185817.GA13543@bierbaron.springfield.local>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1590608

Show key headers only | View raw


On Wed, Mar 01, 2017 at 07:58:17PM +0100, Sven Schmidt wrote:
> Hi Guenter, Tobias and Sandra,
> 
> thanks for your effort here.
> 
> On Tue, Feb 28, 2017 at 10:14:13AM -0800, Guenter Roeck wrote:
> > On Tue, Feb 28, 2017 at 10:53:56AM -0700, Sandra Loosemore wrote:
> > > On 02/28/2017 08:53 AM, Tobias Klauser wrote:
> > > >(adding Sandra Loosemore to Cc due to possible relation to gcc/binutils
> > > >for nios2)
> > > >
> > > >On 2017-02-26 at 22:03:38 +0100, Guenter Roeck <linux@roeck-us.net> wrote:
> > > >>Hi Sven,
> > > >>
> > > >>my qemu test for nios2 started failing with commit 4e1a33b105dd ("lib:
> > > >>update LZ4 compressor module"). The test hangs early during boot before
> > > >>any console output is seen. Reverting the offending patch as well as the
> > > >>subsequent lz4 related patches fixes the problem. Disabling CONFIG_RD_LZ4
> > > >>and with it other LZ4 options also fixes it (as does adding "return -EINVAL;"
> > > >>at the top of the LZ4 decompression code). For reference, bisect log
> > > >>is attached.
> > > >>
> > > >>I tried with buildroot toolchains using gcc 6.1.0 as well as 6.3.0
> > > >>and binutils 2.26.1. Scripts used to run the tests are available at
> > > >>https://github.com/groeck/linux-build-test/tree/master/rootfs/nios2.
> > > >>Qemu is from qemu mainline or qemu v2.8 with nios2 patches applied.
> > > >
> > > >Looks like this is somehow related to gcc/binutils. Using GCC 4.8.3 and
> > > >binutils 2.24.51 (both from from Sourcery CodeBench Lite 2014.05) I can
> > > >get a kernel booting on latest master branch. AFAICT, none of the
> > > >LZ4_decompress_* functions are called during boot.
> > > >
> 
> It seems a bit strange that code which is not actually called causes problems like that.
> 
Yes, it is, though it is always possible. The code isn't exactly easy to
understand; there may be some hidden caveats such as global variables. It may
also be that some jump target exceeds its range (though why that would only
be seen with the LZ4 code is another question), or that the compiler gets
confused by the forced inlines (disabling that didn't make a difference,
though, nor did disabling -O3).

> Please let me know if and how I may help you figure out what's happening, especially
> regarding the differences between the previous LZ4 and the current implementation.
> 

For my part I am all but clueless. Unless someone has an idea, we may to
disable LZ4 support for nios2 for the time being. Does anyone have thoughts
on that ? Of course, that would not help if the problem also affects
recent gcc/binutil versions on other architectures.

Thanks,
Guenter

> > > >However, using a self-built GCC 7.0 (20161127) and binutils 2.27 I can
> > > >reproduce the problem you see using the instructions Guenter provided in
> > > >the reply to Sven.
> > > >
> > > >I'll try to dig a bit deeper from here on. Any suggestions on what to
> > > >look out for wrt the differences between the gcc/binutils version are
> > > >welcome of course.
> > > 
> > > This message doesn't give me enough context to know what is going on,
> > > especially without seeing the rest of the thread.  Generally speaking,
> > > Mentor recommends you use one of our stable releases instead of trying to
> > > roll your own from mainline sources.  As an upstream binutils and gcc
> > > maintainer I do try my best to look at bug reports for those components, but
> > > I need a reproducible standalone testcase and specific versions of the
> > > different components involved.
> > > 
> > The problem is also seen with Sourcery CodeBench Lite 2016.11-32 (gcc 6.2.0,
> > binutils 2.26.51). I can provide additional details if needed, but we don't
> > have a well enough understanding of the problem to be able to provide a
> > reduced size test case. The test used to reproduce the problem is available
> > at https://github.com/groeck/linux-build-test/tree/master/rootfs/nios2,
> > run on the ToT linux kernel.
> > 
> > Guenter
> 
> Regards,
> 
> Sven

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Sven Schmidt <4sschmid@informatik.uni-hamburg.de> - 2017-03-01 20:00 +0100
  Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Guenter Roeck <linux@roeck-us.net> - 2017-03-01 21:10 +0100
    Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Tobias Klauser <tklauser@distanz.ch> - 2017-03-02 17:50 +0100
      Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Guenter Roeck <linux@roeck-us.net> - 2017-03-03 04:10 +0100
        Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Tobias Klauser <tklauser@distanz.ch> - 2017-03-07 14:00 +0100
          Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Guenter Roeck <linux@roeck-us.net> - 2017-03-08 06:10 +0100
          Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Guenter Roeck <linux@roeck-us.net> - 2017-03-09 14:30 +0100
            Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Tobias Klauser <tklauser@distanz.ch> - 2017-03-09 15:50 +0100
              Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Guenter Roeck <linux@roeck-us.net> - 2017-03-09 21:10 +0100
  Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Sandra Loosemore <sandra@codesourcery.com> - 2017-03-02 02:00 +0100
    Re: nios2 crash/hang in mainline due to 'lib: update LZ4 compressor  module' Tobias Klauser <tklauser@distanz.ch> - 2017-03-02 14:40 +0100

csiph-web