public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Nilay Shroff <nilay@linux.ibm.com>,
	Alan Adamson <alan.adamson@oracle.com>,
	bpf@vger.kernel.org
Cc: Bart Van Assche <bvanassche@acm.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: kernel build failure when CONFIG_DEBUG_INFO_BTF and CONFIG_KCSAN are enabled
Date: Wed, 7 Jan 2026 11:26:16 -0800	[thread overview]
Message-ID: <e26b8ff0-c176-4d94-a25a-4e29992611c1@linux.dev> (raw)
In-Reply-To: <42a1b4b0-83d0-4dda-b1df-15a1b7c7638d@linux.ibm.com>



On 11/26/25 2:29 AM, Nilay Shroff wrote:
> Hi,
>
> I am encountering the following build failures when compiling the kernel source checked out
> from the for-6.19/block branch [1]:
>
>    KSYMS   .tmp_vmlinux2.kallsyms.S
>    AS      .tmp_vmlinux2.kallsyms.o
>    LD      vmlinux.unstripped
>    BTFIDS  vmlinux.unstripped
> WARN: multiple IDs found for 'task_struct': 110, 3046 - using 110
> WARN: multiple IDs found for 'module': 170, 3055 - using 170
> WARN: multiple IDs found for 'file': 697, 3130 - using 697
> WARN: multiple IDs found for 'vm_area_struct': 714, 3140 - using 714
> WARN: multiple IDs found for 'seq_file': 1060, 3167 - using 1060
> WARN: multiple IDs found for 'cgroup': 2355, 3304 - using 2355
> WARN: multiple IDs found for 'inode': 553, 3339 - using 553
> WARN: multiple IDs found for 'path': 586, 3369 - using 586
> WARN: multiple IDs found for 'bpf_prog': 2565, 3640 - using 2565
> WARN: multiple IDs found for 'bpf_map': 2657, 3837 - using 2657
> WARN: multiple IDs found for 'bpf_link': 2849, 3965 - using 2849
> [...]
> make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 255
> make[2]: *** Deleting file 'vmlinux.unstripped'
> make[1]: *** [/home/src/linux/Makefile:1242: vmlinux] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
>
>
> The build failure appears after commit 42adb2d4ef24 (“fs: Add the __data_racy annotation
> to backing_dev_info.ra_pages”) and commit 935a20d1bebf (“block: Remove queue freezing
> from several sysfs store callbacks”). However, the root cause does not seem to be specific
> to these commits or to the block layer changes themselves. Instead, the issue is triggered
> by the introduction of the __data_racy annotation on several fields in struct request_queue
> and struct backing_dev_info.
>
> It seems likely that some compilation units are built with KCSAN disabled, in which case
> the preprocessor expands __data_racy to nothing. Other units have KCSAN enabled, where
> __data_racy expands to the volatile qualifier. This results in two different versions
> of both struct request_queue and struct backing_dev_info: one where fields such as
> rq_timeout or ra_pages are declared volatile, and another where they are not.
>
> During BTF generation, the resolver encounters these conflicting type definitions.
> Although the reported error does not explicitly reference struct request_queue or
> struct backing_dev_info, it likely surfaces through types such as task_struct or
> others that embed these structures deep within their type hierarchies.
>
> For reference, gcc and pahole versions are shown below. Also, attached kernel .config:
>
> # gcc --version
> gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)
> Copyright (C) 2021 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> # pahole --version
> v1.27
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-6.19/block

I tried with clang with CONFIG_DEBUG_INFO_BTF and CONFIG_KCSAN enabled.
I am using the latest bpf-next.
   $ make LLVM=1 -j
   ...
   KSYMS   .tmp_vmlinux0.kallsyms.S
   AS      .tmp_vmlinux0.kallsyms.o
   LD      .tmp_vmlinux1
   BTF     .tmp_vmlinux1
      <==== hang here

^Cmake[2]: *** [/home/yhs/work/bpf-next/scripts/Makefile.vmlinux:72: vmlinux.unstripped] Interrupt
make[1]: *** [/home/yhs/work/bpf-next/Makefile:1277: vmlinux] Interrupt
make: *** [/home/yhs/work/bpf-next/Makefile:248: __sub-make] Interrupt

I am using latest clang22 and latest pahole master (v1.31).

I will debug further from clang side.


>
> Thanks,
> --Nilay


      parent reply	other threads:[~2026-01-07 19:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26 10:29 kernel build failure when CONFIG_DEBUG_INFO_BTF and CONFIG_KCSAN are enabled Nilay Shroff
2025-11-27 11:19 ` Jiri Olsa
2025-11-27 15:36   ` Alan Maguire
2025-11-28  6:27     ` Nilay Shroff
2025-11-28  7:53       ` Alan Maguire
2025-11-28  9:44         ` Nilay Shroff
2026-01-06 16:43           ` Nilay Shroff
2026-01-08 21:50     ` Yonghong Song
2026-01-08 22:27       ` Alan Maguire
2026-01-07 19:26 ` Yonghong Song [this message]

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=e26b8ff0-c176-4d94-a25a-4e29992611c1@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=alan.adamson@oracle.com \
    --cc=bpf@vger.kernel.org \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=nilay@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox