Re: include/linux/seqlock.h:1257:undefined reference to `__scoped_seqlock_bug'
From: Uros Bizjak
Date: Thu Jan 29 2026 - 05:29:02 EST
On Thu, Jan 29, 2026 at 10:39 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Thu, Jan 29, 2026 at 09:32:00AM +0800, kernel test robot wrote:
> > Hi Oleg,
> >
> > FYI, the error/warning still remains.
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 8dfce8991b95d8625d0a1d2896e42f93b9d7f68d
> > commit: 488f48b32654dc6be04d9cc12f75ce030c9cb21b seqlock: Change thread_group_cputime() to use scoped_seqlock_read()
> > date: 3 months ago
> > config: s390-randconfig-002-20260129 (https://download.01.org/0day-ci/archive/20260129/202601290910.uwScjRjc-lkp@xxxxxxxxx/config)
> > compiler: s390-linux-gcc (GCC) 15.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260129/202601290910.uwScjRjc-lkp@xxxxxxxxx/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202601290910.uwScjRjc-lkp@xxxxxxxxx/
> >
> > All errors (new ones prefixed by >>):
> >
> > s390-linux-ld: kernel/sched/build_policy.o: in function `__scoped_seqlock_next':
> > >> include/linux/seqlock.h:1257:(.text+0x3ee04): undefined reference to `__scoped_seqlock_bug'
> >
>
> Yeah, this is an UBSAN build, and those sanitizers keep confusing
> things.
>
> The problem is, some distros seem to actually ship with that crap on
> :-(.
>
> I need to go prod some compiler folks.
>
> Uros, do compiler folks care about optimizer quality in the face of
> UBSAN or should I go kick distros for shipping with UBSAN enabled?
>
> If s390 isn't your cup of tea, I think Ingo has a x86 config somewhere
> that shows this same.
Please file a bug in GCC bugzilla under the "sanitizer" component.
This is more a question for people that deal with sanitizers in GCC.
Thanks,
Uros.