I need to get some WARN_ON output to help a developer figure out a regression in 4.15. When I test the problem with kernels from Fedora built rpms I get the output from WARN_ON, but they don't have a debugging patch from the developer applied. When I build using make (both Linus' tree and Boyer's tree) I don't get that output. I'm guessing there is a config setting that isn't in the normal Fedora config file or I need to force a gcc option or something. But I thought someone here might just know what a need to know. Otherwise I'll try to figure it out from the spec file, but my memory of the kernel spec file is that it is complicated and it might not be easy to figure out what I'm looking for. Thanks.
It looks like .config has reasonable (the same as Fedora) values for CONFIG_BUG, CONFIG_CONSOLE_LOGLEVEL_DEFAULT and CONFIG_MESSAGE_LOGLEVEL_DEFAULT.
The loglevel kernel parameter is not used, so the defaults should apply.
When I get physical access to the test machine on Monday I can try setting loglevel on boot, which might work in the WARN_ON code was actually compiled in. My guess is that it isn't, but I don't know why.
On Sat, 16 Dec 2017 10:18:27 -0600 Bruno Wolff III bruno@wolff.to wrote:
It looks like .config has reasonable (the same as Fedora) values for CONFIG_BUG, CONFIG_CONSOLE_LOGLEVEL_DEFAULT and CONFIG_MESSAGE_LOGLEVEL_DEFAULT.
The loglevel kernel parameter is not used, so the defaults should apply.
When I get physical access to the test machine on Monday I can try setting loglevel on boot, which might work in the WARN_ON code was actually compiled in. My guess is that it isn't, but I don't know why.
It seems to be that WARN_ON is a macro, so is always available.
tools/include/asm/bug.h:#define WARN_ON(condition) ({ \ tools/include/asm/bug.h: int __ret_warn_on = !!(condition); \ tools/include/asm/bug.h: if (unlikely(__ret_warn_on)) \ tools/include/asm/bug.h: unlikely(__ret_warn_on); \
Is it possible you just need to tell the system to display the messages from the kernel?
sysctrl kernel.printk
should show you the current levels. From memory, higher numbers mean less priority for what is displayed. I set to 3 4 1 3.
sysctrl -w kernel.printk "3 4 1 3"
You could try upping these to 7 (the max) to see what happens. Or, if you are inclined, you could just read the man page to see if this has anything to do with what you want. :-)
kernel@lists.fedoraproject.org