[linux-rt-devel:linux-5.14.y-rt-rebase 91/237] include/linux/sched.h:146:3: error: invalid preprocessing directive #debug_rtlock_wait_set_state

From: kernel test robot
Date: Thu Aug 05 2021 - 04:53:41 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.14.y-rt-rebase
head: d4702aad1dbeeb17eab7cd341c723c6da072aa33
commit: 9cc31c252f1fca839769876bda1b2196809026d7 [91/237] sched: Prepare for RT sleeping spin/rwlocks
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=9cc31c252f1fca839769876bda1b2196809026d7
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.14.y-rt-rebase
git checkout 9cc31c252f1fca839769876bda1b2196809026d7
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 prepare

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from arch/x86/kernel/asm-offsets.c:10:
include/linux/sched.h:134:3: error: invalid preprocessing directive #debug_normal_state_change
134 | # debug_normal_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched.h:140:3: error: invalid preprocessing directive #debug_special_state_change
140 | # debug_special_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:146:3: error: invalid preprocessing directive #debug_rtlock_wait_set_state
146 | # debug_rtlock_wait_set_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:152:3: error: invalid preprocessing directive #debug_rtlock_wait_restore_state
152 | # debug_rtlock_wait_restore_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h: In function 'kernel_signal_stop':
include/linux/sched.h:223:3: error: implicit declaration of function 'debug_special_state_change' [-Werror=implicit-function-declaration]
223 | debug_special_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h:296:3: note: in expansion of macro 'set_special_state'
296 | set_special_state(TASK_STOPPED);
| ^~~~~~~~~~~~~~~~~
include/linux/rcuwait.h: In function 'finish_rcuwait':
include/linux/sched.h:202:3: error: implicit declaration of function 'debug_normal_state_change' [-Werror=implicit-function-declaration]
202 | debug_normal_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:53:2: note: in expansion of macro '__set_current_state'
53 | __set_current_state(TASK_RUNNING);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from arch/x86/kernel/asm-offsets.c:10:
include/linux/sched.h:134:3: error: invalid preprocessing directive #debug_normal_state_change
134 | # debug_normal_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched.h:140:3: error: invalid preprocessing directive #debug_special_state_change
140 | # debug_special_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:146:3: error: invalid preprocessing directive #debug_rtlock_wait_set_state
146 | # debug_rtlock_wait_set_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:152:3: error: invalid preprocessing directive #debug_rtlock_wait_restore_state
152 | # debug_rtlock_wait_restore_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h: In function 'kernel_signal_stop':
include/linux/sched.h:223:3: error: implicit declaration of function 'debug_special_state_change' [-Werror=implicit-function-declaration]
223 | debug_special_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h:296:3: note: in expansion of macro 'set_special_state'
296 | set_special_state(TASK_STOPPED);
| ^~~~~~~~~~~~~~~~~
include/linux/rcuwait.h: In function 'finish_rcuwait':
include/linux/sched.h:202:3: error: implicit declaration of function 'debug_normal_state_change' [-Werror=implicit-function-declaration]
202 | debug_normal_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:53:2: note: in expansion of macro '__set_current_state'
53 | __set_current_state(TASK_RUNNING);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1213: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from arch/x86/kernel/asm-offsets.c:10:
include/linux/sched.h:134:3: error: invalid preprocessing directive #debug_normal_state_change
134 | # debug_normal_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched.h:140:3: error: invalid preprocessing directive #debug_special_state_change
140 | # debug_special_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:146:3: error: invalid preprocessing directive #debug_rtlock_wait_set_state
146 | # debug_rtlock_wait_set_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:152:3: error: invalid preprocessing directive #debug_rtlock_wait_restore_state
152 | # debug_rtlock_wait_restore_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h: In function 'kernel_signal_stop':
include/linux/sched.h:223:3: error: implicit declaration of function 'debug_special_state_change' [-Werror=implicit-function-declaration]
223 | debug_special_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h:296:3: note: in expansion of macro 'set_special_state'
296 | set_special_state(TASK_STOPPED);
| ^~~~~~~~~~~~~~~~~
include/linux/rcuwait.h: In function 'finish_rcuwait':
include/linux/sched.h:202:3: error: implicit declaration of function 'debug_normal_state_change' [-Werror=implicit-function-declaration]
202 | debug_normal_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:53:2: note: in expansion of macro '__set_current_state'
53 | __set_current_state(TASK_RUNNING);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1213: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
--
In file included from arch/x86/kernel/asm-offsets.c:10:
include/linux/sched.h:134:3: error: invalid preprocessing directive #debug_normal_state_change
134 | # debug_normal_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched.h:140:3: error: invalid preprocessing directive #debug_special_state_change
140 | # debug_special_state_change(state_value) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:146:3: error: invalid preprocessing directive #debug_rtlock_wait_set_state
146 | # debug_rtlock_wait_set_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/sched.h:152:3: error: invalid preprocessing directive #debug_rtlock_wait_restore_state
152 | # debug_rtlock_wait_restore_state() \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h: In function 'kernel_signal_stop':
include/linux/sched.h:223:3: error: implicit declaration of function 'debug_special_state_change' [-Werror=implicit-function-declaration]
223 | debug_special_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sched/signal.h:296:3: note: in expansion of macro 'set_special_state'
296 | set_special_state(TASK_STOPPED);
| ^~~~~~~~~~~~~~~~~
include/linux/rcuwait.h: In function 'finish_rcuwait':
include/linux/sched.h:202:3: error: implicit declaration of function 'debug_normal_state_change' [-Werror=implicit-function-declaration]
202 | debug_normal_state_change((state_value)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:53:2: note: in expansion of macro '__set_current_state'
53 | __set_current_state(TASK_RUNNING);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1213: prepare0] Error 2
make[1]: Target 'vmlinux' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'vmlinux' not remade because of errors.
***
*** The source tree is not clean, please run 'make ARCH=x86_64 mrproper'
*** in /kbuild/worktree/build-ktools-consumer
***
make[2]: *** [Makefile:567: outputmakefile] Error 1
make[2]: Target 'syncconfig' not remade because of errors.
make[1]: *** [Makefile:723: include/config/auto.conf.cmd] Error 2
make[1]: *** [include/config/auto.conf.cmd] Deleting file 'include/generated/autoconf.h'
make[1]: Failed to remake makefile 'include/config/auto.conf.cmd'.
make[1]: Failed to remake makefile 'include/config/auto.conf'.
***
*** The source tree is not clean, please run 'make ARCH=x86_64 mrproper'
*** in /kbuild/worktree/build-ktools-consumer
***
make[1]: *** [Makefile:567: outputmakefile] Error 1
In file included from <command-line>:32:
include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
5 | #include <generated/autoconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from <command-line>:32:
include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
5 | #include <generated/autoconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from <command-line>:32:
include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
5 | #include <generated/autoconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from scripts/selinux/mdp/mdp.c:22:
include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
5 | #include <generated/autoconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [scripts/Makefile.host:95: scripts/selinux/mdp/mdp] Error 1
make[4]: Target '__build' not remade because of errors.
make[3]: *** [scripts/Makefile.build:514: scripts/selinux/mdp] Error 2
make[3]: Target '__build' not remade because of errors.
make[2]: *** [scripts/Makefile.build:514: scripts/selinux] Error 2
In file included from netlink.c:9:
usr/include/linux/if_ether.h:169:1: error: packed attribute is unnecessary for 'ethhdr' [-Werror=packed]
169 | } __attribute__((packed));
| ^
In file included from tools/include/uapi/linux/ethtool.h:19,
from xsk.c:18:
usr/include/linux/if_ether.h:169:1: error: packed attribute is unnecessary for 'ethhdr' [-Werror=packed]
169 | } __attribute__((packed));
| ^
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1184: scripts] Error 2
cc1: all warnings being treated as errors
make[5]: *** [tools/build/Makefile.build:96: tools/bpf/resolve_btfids/libbpf/staticobjs/xsk.o] Error 1
make[5]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[5]: *** [tools/build/Makefile.build:96: tools/bpf/resolve_btfids/libbpf/staticobjs/netlink.o] Error 1
make[4]: *** [Makefile:158: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
make[3]: *** [Makefile:44: tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
make[2]: *** [Makefile:72: bpf/resolve_btfids] Error 2
make[1]: *** [Makefile:1351: tools/bpf/resolve_btfids] Error 2
make[1]: Target 'vmlinux' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'vmlinux' not remade because of errors.


vim +146 include/linux/sched.h

125
126 /*
127 * Special states are those that do not use the normal wait-loop pattern. See
128 * the comment with set_special_state().
129 */
130 #define is_special_task_state(state) \
131 ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_PARKED | TASK_DEAD))
132
133 #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
> 134 # debug_normal_state_change(state_value) \
135 do { \
136 WARN_ON_ONCE(is_special_task_state(state_value)); \
137 current->task_state_change = _THIS_IP_; \
138 } while (0)
139
140 # debug_special_state_change(state_value) \
141 do { \
142 WARN_ON_ONCE(!is_special_task_state(state_value)); \
143 current->task_state_change = _THIS_IP_; \
144 } while (0)
145
> 146 # debug_rtlock_wait_set_state() \
147 do { \
148 current->saved_state_change = current->task_state_change;\
149 current->task_state_change = _THIS_IP_; \
150 } while (0)
151
> 152 # debug_rtlock_wait_restore_state() \
153 do { \
154 current->task_state_change = current->saved_state_change;\
155 } while (0)
156 #else
157 # debug_normal_state_change(cond) do { } while (0)
158 # debug_special_state_change(cond) do { } while (0)
159 # debug_rtlock_wait_set_state() do { } while (0)
160 # debug_rtlock_wait_restore_state() do { } while (0)
161 #endif
162

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip