Re: [lfs-support] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Ken Moffat
On Wed, Feb 10, 2021 at 10:06:22PM +, Roger wrote:
> On Wed, 10 Feb 2021 20:04:10 +, Ken Moffat
>  wrote:
> 
> >The segfault is in objtool (see my reply to Pierre) and the output
> >object file got deleted.  I was using 5.14.1, my gzipped config,
> >objtool and core dump are now at
> >http://www.linuxfromscratch.org/~ken/tmp/
> 
> Using your config I get a seg fault at
> arch/x86/kernel/apic/apic.o which is interesting because earlier
> I did a "make x86_64_defconfig" and there was no seg fault. In
> fact the compilation finished without error.
> -- 
> Roger
> 

Years ago, I learned that the defconfig target was only likely to be
useful if you had the same hardware as Linus.  Since then, I think
that defconfigs get updated much less - new additions should not be
enabled by default (although options to enable them, such as the
reworking of net drivers, and more recently perhaps some setting to
make LED drivers visible) are allowed and other things get pulled in
as dependencies which turn out to be hard to turn off.

Thanks for trying my config.

ĸen
-- 
Any attempt to brew coffee with a teapot should result in the error
code "418 I'm a teapot". The resulting entity body MAY be short and
stout. -- rfc 2324 (1st April 1998)

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Ken Moffat
On Wed, Feb 10, 2021 at 09:58:54PM +0100, Pierre Labastie wrote:
> On Wed, 2021-02-10 at 20:04 +, Ken Moffat wrote:
> > The segfault is in objtool (see my reply to Pierre) and the output
> > object file got deleted.  I was using 5.14.1, my gzipped config,
> > objtool and core dump are now at
> > http://www.linuxfromscratch.org/~ken/tmp/
> > 
> 
> The core file returns "access denied". But maybe I do not need it,
> because with your config, the bug occurs also on my machine.
> Will try to investigate...
> 
Oh, sorry, didn't realise it was mode 600, now changed if anyone
else wants it, although since you can recreate the problem, probably
not.

What really puzzles me is that 5.11-rc7 built fine, allowing me to
boot the new system.  But even with 5.10.15-rc1 (now released as
5.10.15) the problem remained and I had the impression Greg KH was
accelerating the movement of changes in Linus's tree to stable.

ĸen
-- 
Any attempt to brew coffee with a teapot should result in the error
code "418 I'm a teapot". The resulting entity body MAY be short and
stout. -- rfc 2324 (1st April 1998)

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Ken Moffat
O Wed, Feb 10, 2021 at 11:43:24PM +0800, Xi Ruoyao wrote:
> On 2021-02-10 10:05 -0500, Jean-Marc Pigeon wrote:
> > Hello,
> > On Wed, 2021-02-10 at 09:52 +0100, Frans de Boer wrote:
> > On 10/02/2021 02:49, Ken Moffat wrote:


Even objtool (792K) is too big an attachment for the list.  I
figured the 50M core dump would be, but didn't realise that the
limit is 300K.

> > > On Tue, Feb 09, 2021 at 05:14:09PM -0500, Jean-Marc Pigeon wrote:
> > > > Hello,
> > > > On Tue, 2021-02-09 at 18:27 +, Ken Moffat wrote:
> > > > > On Tue, Feb 09, 2021 at 12:29:14AM +, Ken Moffat wrote:
> > > > > > On Mon, Feb 08, 2021 at 03:52:35AM +, Ken Moffat wrote:
> > > > > > > ../configure --prefix=/usr    \
> > > > > > >   --disable-werror \
> > > > > > >   --enable-kernel=3.2  \
> > > > > > >   --enable-stack-protector=strong  \
> > > > > > >   --with-headers=/usr/include  \
> > > > > > >   libc_cv_slibdir=/lib
> > > > > > > libc_cv_include_x86_isa_level=no
> > > > > > > 
> > > [...]
> > > > > > Well I don't need that workaround for using '-march=native -O2' on
> > > > > > my skylake, it booted successfully.  Fortunately, Frans said it
> > > > > > works for him, and htat distros are using it, so I guess we too
> > > > > > should use it.
> > > > > > 
> > > > > > However, there was one problem other than my own typos in editing
> > > > > > scripts - tried to build linux-5.10.13 -
> > > > > > 
> > > > > >    CC  arch/x86/kernel/apic/apic.o
> > > > > > make[3]: *** [scripts/Makefile.build:279:
> > > > > > arch/x86/kernel/apic/apic.o] Segmentation fault
> > > > Exact same problem here (not a memory problem, or very big
> > > > "cosmic ray"). same problem on kernel-5.10.9 too.
> > > > this happen using glibc-2.33 AND binutils-2.36.1
> > > > 
> > > > rebuilding from scratch using binutils-2.36.1 and keeping
> > > > glibc-2.32 make the segmentation fault (I previously restarted
> > > > build from scratch with glibc-2.32 + binutils-2.35.1, kernel
> > > > compilation was OK).
> > > > My conclusion, binutils is the trouble maker.
> > > > Could somebody confirm this finding?
> > > > Google is mute on this subject but may be my search
> > > > keywords were not that good.
> > > > advices? suggestions?
> > > > 
[...]
> > > 
> > > Just to be clear (before Bruce asks, I know he distrusts using any
> > > CFLAGS) - are you building with any variant of -march= ?  And what
> > > CPU are you building on ?
> > 
> > Intel(R) Core(TM) i7 CPU 970 @ 3.20GH
> > all compilation done within a   / tmpfs 40G 
> > 

So for you it is an early intel, for me it is a low-end skylake.

> > Recompilation is done in 2 phases, first the tool-chain (automatic make
> > sequence)
> > then recompile everything within the previously builded tool-chain
> > building process is all "all automatic" (> 1000 
> > utilities/tools/applications)
> > duration is around 5 hours.
> > 
> > Here is my finding (everything equal beside the glibc binutils version
> > (kernel-5.10.13))
> > glibc     binutils
> > 2.32     2.35.1 compilation successful all the way
> > 2.33     2.36.1         compilation stop at kernel (segmentation 
> > fault)
> > kernel is among the  last components to be
> > build
> > 2.33      2.35.1webkitgtk (2.30.4) compilation error,
> > compilation sequence
> > make webkitgtk to be compiled before
> > kernel.  
> > (but manual request to compile kernel is
> > successful)
> > 2.32     2.36.1 segmentation fault on kernel compilation
> > (manual request)
> > 
> > Manual request about kernel, mean I didn't wait for all packages
> > to be compiled but building context is good enough to have 
> > kernel compilation to be successful.
> > 
> > At first, I beleived only binutils-2.36.1 was the problem, seems
> > interaction between glibc+binutils are subtle.
> > 
> > IMHO:
> > at that stage, modification done to low level components
> > as glibc, binutils should be transparent to a (proved
> > working) building process.
> > 
> > So we have; my bet; something fishy, hidden somewhere
> > within both glibc and binutils. 
> > 
> > could someone else confirm my data with its own experiment?
> 
> Could you attach the segfaulted executable and its coredump file on segfault
> here?  Bruce, Pierre, and I tried multiple ways to reproduce the issue but we
> couldn't.
> 
The segfault is in objtool (see my reply to Pierre) and the output
object file got deleted.  I was using 5.14.1, my gzipped config,
objtool and core dump are now at
http://www.linuxfromscratch.org/~ken/tmp/

ĸen
-- 
Any attempt to brew coffee with a teapot should result in the error
code "418 I'm a teapot". The resulting entity body MAY be short and
stout. -- rfc 2324 (1st April 1998)

-- 

Re: [lfs-support] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Roger
On Wed, 10 Feb 2021 20:04:10 +, Ken Moffat
 wrote:

>The segfault is in objtool (see my reply to Pierre) and the output
>object file got deleted.  I was using 5.14.1, my gzipped config,
>objtool and core dump are now at
>http://www.linuxfromscratch.org/~ken/tmp/

Using your config I get a seg fault at
arch/x86/kernel/apic/apic.o which is interesting because earlier
I did a "make x86_64_defconfig" and there was no seg fault. In
fact the compilation finished without error.
-- 
Roger

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Jean-Marc Pigeon
On Wed, 2021-02-10 at 21:58 +0100, Pierre Labastie wrote:
> On Wed, 2021-02-10 at 20:04 +, Ken Moffat wrote:
> > The segfault is in objtool (see my reply to Pierre) and the output
> > object file got deleted.  I was using 5.14.1, my gzipped config,
> > objtool and core dump are now at
> > http://www.linuxfromscratch.org/~ken/tmp/
> > 
> 
> The core file returns "access denied". But maybe I do not need it,
> because with your config, the bug occurs also on my machine.
> Will try to investigate...
> 
> Note to Jean-Marc: it may be a bug in binutils, glibc, or in the
> kernel, exposed by the binutils or glibc.
Agreed could a trouble in kernel too (shown by binutils),
as far I can tell, binutils -> kernel compilation segfault.
(glibc 2.32 and binutils-2.36.1 with kernel compilation fault)

> 
> Pierre
> 

-- 
You have seen "Linux from scratch" and looking for ISO files
www.osukiss.org

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Pierre Labastie
On Wed, 2021-02-10 at 20:04 +, Ken Moffat wrote:
> The segfault is in objtool (see my reply to Pierre) and the output
> object file got deleted.  I was using 5.14.1, my gzipped config,
> objtool and core dump are now at
> http://www.linuxfromscratch.org/~ken/tmp/
> 

The core file returns "access denied". But maybe I do not need it,
because with your config, the bug occurs also on my machine.
Will try to investigate...

Note to Jean-Marc: it may be a bug in binutils, glibc, or in the
kernel, exposed by the binutils or glibc.

Pierre

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Xi Ruoyao
On 2021-02-10 10:05 -0500, Jean-Marc Pigeon wrote:
> Hello,
> On Wed, 2021-02-10 at 09:52 +0100, Frans de Boer wrote:
> On 10/02/2021 02:49, Ken Moffat wrote:
> > On Tue, Feb 09, 2021 at 05:14:09PM -0500, Jean-Marc Pigeon wrote:
> > > Hello,
> > > On Tue, 2021-02-09 at 18:27 +, Ken Moffat wrote:
> > > > On Tue, Feb 09, 2021 at 12:29:14AM +, Ken Moffat wrote:
> > > > > On Mon, Feb 08, 2021 at 03:52:35AM +, Ken Moffat wrote:
> > > > > > ../configure --prefix=/usr    \
> > > > > >   --disable-werror \
> > > > > >   --enable-kernel=3.2  \
> > > > > >   --enable-stack-protector=strong  \
> > > > > >   --with-headers=/usr/include  \
> > > > > >   libc_cv_slibdir=/lib
> > > > > > libc_cv_include_x86_isa_level=no
> > > > > > 
> > [...]
> > > > > Well I don't need that workaround for using '-march=native -O2' on
> > > > > my skylake, it booted successfully.  Fortunately, Frans said it
> > > > > works for him, and htat distros are using it, so I guess we too
> > > > > should use it.
> > > > > 
> > > > > However, there was one problem other than my own typos in editing
> > > > > scripts - tried to build linux-5.10.13 -
> > > > > 
> > > > >    CC  arch/x86/kernel/apic/apic.o
> > > > > make[3]: *** [scripts/Makefile.build:279:
> > > > > arch/x86/kernel/apic/apic.o] Segmentation fault
> > > Exact same problem here (not a memory problem, or very big
> > > "cosmic ray"). same problem on kernel-5.10.9 too.
> > > this happen using glibc-2.33 AND binutils-2.36.1
> > > 
> > > rebuilding from scratch using binutils-2.36.1 and keeping
> > > glibc-2.32 make the segmentation fault (I previously restarted
> > > build from scratch with glibc-2.32 + binutils-2.35.1, kernel
> > > compilation was OK).
> > > My conclusion, binutils is the trouble maker.
> > > Could somebody confirm this finding?
> > > Google is mute on this subject but may be my search
> > > keywords were not that good.
> > > advices? suggestions?
> > > 
> > Wow!  I hadn't thought of trying binutils-2.36.1 with glibc-2.32
> > (partly because I'd prefer to use glibc-2.33 because of its iconv
> > fixes).
> > 
> > And I'm surprised at 5.10.9 because based on the kernel list and
> > binutils-bugs I had thought that would crap out in objcopy (with an
> > error message about the sections, not a segfault).
> > 
> > This does sound as if it is a real problem, but I guess the reason
> > google is not coming up with anything is that binutils-2.36 and
> > 2.36.1 are fresh.  Normally we try to keep on the cutting edge
> > rather than the bleeding edge, but this time we've maybe overshot.
> > 
> > Just to be clear (before Bruce asks, I know he distrusts using any
> > CFLAGS) - are you building with any variant of -march= ?  And what
> > CPU are you building on ?
> 
> Intel(R) Core(TM) i7 CPU 970 @ 3.20GH
> all compilation done within a / tmpfs 40G 
> 
> Recompilation is done in 2 phases, first the tool-chain (automatic make
> sequence)
> then recompile everything within the previously builded tool-chain
> building process is all "all automatic" (> 1000 utilities/tools/applications)
> duration is around 5 hours.
> 
> Here is my finding (everything equal beside the glibc binutils version
> (kernel-5.10.13))
> glibc     binutils
> 2.32       2.35.1 compilation successful all the way
> 2.33       2.36.1         compilation stop at kernel (segmentation fault)
>   kernel is among the  last components to be
> build
> 2.33      2.35.1  webkitgtk (2.30.4) compilation error,
> compilation sequence
>   make webkitgtk to be compiled before
> kernel.  
>   (but manual request to compile kernel is
> successful)
> 2.32       2.36.1 segmentation fault on kernel compilation
> (manual request)
> 
> Manual request about kernel, mean I didn't wait for all packages
> to be compiled but building context is good enough to have 
> kernel compilation to be successful.
> 
> At first, I beleived only binutils-2.36.1 was the problem, seems
> interaction between glibc+binutils are subtle.
> 
> IMHO:
> at that stage, modification done to low level components
> as glibc, binutils should be transparent to a (proved
> working) building process.
> 
> So we have; my bet; something fishy, hidden somewhere
> within both glibc and binutils. 
> 
> could someone else confirm my data with its own experiment?

Could you attach the segfaulted executable and its coredump file on segfault
here?  Bruce, Pierre, and I tried multiple ways to reproduce the issue but we
couldn't.

-- 
Xi Ruoyao 
School of Aerospace Science and Technology, Xidian University

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because