All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rasmus Villemoes" <rasmus.villemoes@prevas.dk>
To: "yocto@lists.yoctoproject.org" <yocto@lists.yoctoproject.org>
Subject: "stack smashing detected" when building aarch64 kernel
Date: Thu, 23 Sep 2021 17:16:00 +0200	[thread overview]
Message-ID: <c81729e7-0bc2-7f7c-84ce-25d92ec09148@prevas.dk> (raw)

I've recently started getting an internal compiler error when building
an aarch64 kernel. It only happens once in a while, and re-running the
task usually just succeeds, so I don't know how to reproduce or trigger
this at will.

Two examples:

===
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm20b.o
  CC [M]  drivers/net/ethernet/mellanox/mlx5/core/rl.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.o
*** stack smashing detected ***: <unknown> terminated
In file included from .../kernel-source/arch/arm64/include/asm/atomic.h:15,
                 from .../kernel-source/include/linux/atomic.h:7,
                 from
.../kernel-source/include/asm-generic/bitops/atomic.h:5,
                 from .../kernel-source/arch/arm64/include/asm/bitops.h:26,
                 from .../kernel-source/include/linux/bitops.h:29,
                 from .../kernel-source/include/linux/kernel.h:12,
                 from .../kernel-source/include/linux/uio.h:8,
                 from .../kernel-source/include/linux/socket.h:8,
                 from .../kernel-source/include/uapi/linux/if.h:25,
                 from .../kernel-source/net/mac80211/led.c:7:
.../kernel-source/include/net/inet_sock.h: In function 'inet_sk_state_load':
.../kernel-source/arch/arm64/include/asm/barrier.h:114:8: internal
compiler error: Aborted
  114 |  union { __unqual_scalar_typeof(*p) __val; char __c[1]; } __u; \
      |        ^
.../kernel-source/include/asm-generic/barrier.h:142:29: note: in
expansion of macro '__smp_load_acquire'
  142 | #define smp_load_acquire(p) __smp_load_acquire(p)
      |                             ^~~~~~~~~~~~~~~~~~
.../kernel-source/include/net/inet_sock.h:312:9: note: in expansion of
macro 'smp_load_acquire'
  312 |  return smp_load_acquire(&sk->sk_state);
      |         ^~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
.../kernel-source/scripts/Makefile.build:279: recipe for target
'net/mac80211/led.o' failed
make[3]: *** [net/mac80211/led.o] Error 1
make[3]: *** Waiting for unfinished jobs....
  CC [M]  drivers/net/ethernet/mellanox/mlx5/core/lag.o
===
  CC [M]  drivers/gpu/drm/nouveau/nvkm/nvfw/ls.o
  CC [M]  drivers/gpu/drm/drm_modeset_helper.o
  CC [M]  drivers/gpu/drm/drm_scdc_helper.o
*** stack smashing detected ***: <unknown> terminated
In file included from
.../kernel-source/include/linux/regulator/consumer.h:35,
                 from
.../kernel-source/drivers/gpu/drm/nouveau/include/nvif/os.h:27,
                 from
.../kernel-source/drivers/gpu/drm/nouveau/include/nvkm/core/os.h:4,
                 from
.../kernel-source/drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h:3,
                 from
.../kernel-source/drivers/gpu/drm/nouveau/include/nvkm/core/device.h:4,
                 from
.../kernel-source/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h:4,
                 from
.../kernel-source/drivers/gpu/drm/nouveau/nvkm/nvfw/ls.c:22:
.../kernel-source/include/linux/suspend.h:364:36: internal compiler
error: Aborted
  364 | extern void mark_free_pages(struct zone *zone);
      |                                    ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
.../kernel-source/scripts/Makefile.build:280: recipe for target
'drivers/gpu/drm/nouveau/nvkm/nvfw/ls.o' failed
make[5]: *** [drivers/gpu/drm/nouveau/nvkm/nvfw/ls.o] Error 1
make[5]: *** Waiting for unfinished jobs....
  CC [M]  drivers/gpu/drm/drm_gem_framebuffer_helper.o
===

This is with hardknott, aarch64-oe-linux-gcc (GCC) 10.2.0, building
5.10.* kernels (5.10.45 and 5.10.65 in the cases above IIRC). The build
is visiting drivers/gpu/drm/ in both cases, but in the former case it's
not actually a TU in there that fails, but one in net/, so I'm not even
sure it it has to do with something peculiar to the drivers/gpu/drm/
modules.

Has anyone seem something like this, or any ideas for figuring out
what's going on?

Rasmus

             reply	other threads:[~2021-09-23 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23 15:16 Rasmus Villemoes [this message]
2021-09-24  4:58 ` [yocto] "stack smashing detected" when building aarch64 kernel Khem Raj

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=c81729e7-0bc2-7f7c-84ce-25d92ec09148@prevas.dk \
    --to=rasmus.villemoes@prevas.dk \
    --cc=yocto@lists.yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.