[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiler segfault when building the kernel



On Fri, Jun 09, 2017 at 07:58:12AM -0400, Celejar wrote:
> Hi,
> 
> I've been building kernels (vanilla from upstream) for years with
> kernel-package (typical command line: "time make-kpkg -j2 --initrd
> --revision 1.custom kernel_image"; .kernel-pkg.conf contains just the
> line "root_cmd = fakeroot") without problem. Recently, the builds have
> begun to fail with messages like these:
> 
> *****
> 
> > In file included from ./include/linux/percpu-rwsem.h:8:0,
> >                  from ./include/linux/fs.h:30,
> >                  from ./include/linux/pagemap.h:8,
> >                  from block/partitions/check.h:1,
> >                  from block/partitions/msdos.c:23:
> > ./include/linux/rcu_sync.h:29:48: internal compiler error: Segmentation fault
> >  enum rcu_sync_type { RCU_SYNC, RCU_SCHED_SYNC, RCU_BH_SYNC };
> >                                                 ^
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
> >   CC      fs/posix_acl.o
> > The bug is not reproducible, so it is likely a hardware or OS problem.
> 
> *****
> 
> > In file included from ./include/linux/linkage.h:6:0,
> >                  from ./include/linux/kernel.h:6,
> >                  from ./include/linux/list.h:8,
> >                  from ./include/linux/module.h:9,
> >                  from lib/fonts/font_8x16.c:8:
> > ./include/linux/export.h:63:22: internal compiler error: Segmentation fault
> >   static const struct kernel_symbol __ksymtab_##sym  \
> >                       ^
> > ./include/linux/export.h:93:25: note: in expansion of macro ‘___EXPORT_SYMBOL’
> >  #define __EXPORT_SYMBOL ___EXPORT_SYMBOL
> >                          ^
> > ./include/linux/export.h:97:2: note: in expansion of macro ‘__EXPORT_SYMBOL’
> >   __EXPORT_SYMBOL(sym, "")
> >   ^
> > lib/fonts/font_8x16.c:4633:1: note: in expansion of macro ‘EXPORT_SYMBOL’
> >  EXPORT_SYMBOL(font_vga_8x16);
> >  ^
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> 
> This occurred immediately following a cleaning of the source tree
> ("make-kpkg ... clean"), the first one I've done in quite some time, so
> I'm pretty sure that that's what triggered this, whatever the
> underlying problem actually is.
> 
> Googling suggests that this sort of thing can be triggered by race
> conditions caused by build systems improper handling of
> concurrency,e.g.:
> 
> https://askubuntu.com/questions/343490/the-bug-is-not-reproducible-so-it-is-likely-a-hardware-or-os-problem

That is just an incorrect answer from some random person.

Missing dependencies produce different kinds of errors,
never internal compiler errors.

> For the last year or so, I've been building with -j2, so I tried again
> without it. I still got the same error, but when I once again did a
> clean and then rebuilt without -j2, the build succeeded.
> 
> Any ideas? Is this a bug I should be filing against kernel-package (or
> anywhere else)?

Based on what you describe (the problem is not reproducible and the 
problem started recently), there is a nearly 100% chance that it is
caused by a hardware defect on your machine.

Were there any hardware changes or was there a a move of the machine recently?
Are all fans still working?
Do all temperatures look normal?
Do all capacitors on the mainboard look OK?
Does a RAM testing tool like memtest86 succeed?
...

> Celejar

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


Reply to: