Skip to contentSkip to conversation

EXN: Coccinelle_modules.Common.Timeout

cocci Jakub Kicinski 3 participants 5 messages Jan 7, 2024 – Jan 8, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi!

When running coccicheck on net-next I get:

/usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/free/clk_put.cocci --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi --include ./include/linux/compiler-version.h --include ./include/linux/kconfig.h --jobs 64 --chunksize 1 158 files match
./drivers/bus/ti-sysc.c:2362:2-8: ERROR: missing clk_put; clk_get on line 2354 and execution via conditional on line 2361
./drivers/tty/serial/bcm63xx_uart.c:850:2-8: ERROR: missing clk_put; clk_get on line 845 and execution via conditional on line 849
EXN: Coccinelle_modules.Common.Timeout in ./drivers/cpufreq/armada-8k-cpufreq.c
EXN: Coccinelle_modules.Common.Timeout in ./drivers/cpufreq/mvebu-cpufreq.c
An error occurred when attempting to transform some files.
coccicheck failed
make[1]: *** [/home/cocci/testing/Makefile:2003: coccicheck] Error 255
make: *** [Makefile:234: __sub-make] Error 2

I couldn't google out any meaningful info about this. Is the timeout something I can increase locally? Is something wrong?

#1 lore raw
Quoted 16 lines · Jakub Kicinski

Hi!

When running coccicheck on net-next I get:

/usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/free/clk_put.cocci --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi --include ./include/linux/compiler-version.h --include ./include/linux/kconfig.h --jobs 64 --chunksize 1 158 files match
./drivers/bus/ti-sysc.c:2362:2-8: ERROR: missing clk_put; clk_get on line 2354 and execution via conditional on line 2361
./drivers/tty/serial/bcm63xx_uart.c:850:2-8: ERROR: missing clk_put; clk_get on line 845 and execution via conditional on line 849
EXN: Coccinelle_modules.Common.Timeout in ./drivers/cpufreq/armada-8k-cpufreq.c
EXN: Coccinelle_modules.Common.Timeout in ./drivers/cpufreq/mvebu-cpufreq.c
An error occurred when attempting to transform some files.
coccicheck failed
make[1]: *** [/home/cocci/testing/Makefile:2003: coccicheck] Error 255
make: *** [Makefile:234: __sub-make] Error 2

Quoted 2 lines

I couldn't google out any meaningful info about this. Is the timeout something I can increase locally? Is something wrong?

The documentation says:

You can use SPFLAGS to add debugging flags, for instance you may want to add both –profile –show-trying to SPFLAGS when debugging. For instance you may want to use:

rm -f err.log
export COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci
make coccicheck DEBUG_FILE="err.log" MODE=report SPFLAGS="--profile --show-trying" M=./drivers/mfd/arizona-irq.c

So you could say SPFLAGS="--timeout 200", for example.

But the real problem is that Coccinelle was changed at some point to fail if anything failed. Whereas in many situations, like here, that is highly undesirable. The original motivation was to avoid partial transformations, but I think it is better that users just monitor the output to see if there is a risk of that. Having the most complete attempt to perform the transformation is almost always better, because it can help the user figure out what to improve.

julia

#3 lore raw
In reply to Jakub Kicinski
Quoted 16 lines · Jakub Kicinski

Hi!

When running coccicheck on net-next I get:

/usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/free/clk_put.cocci --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi --include ./include/linux/compiler-version.h --include ./include/linux/kconfig.h --jobs 64 --chunksize 1 158 files match
./drivers/bus/ti-sysc.c:2362:2-8: ERROR: missing clk_put; clk_get on line 2354 and execution via conditional on line 2361
./drivers/tty/serial/bcm63xx_uart.c:850:2-8: ERROR: missing clk_put; clk_get on line 845 and execution via conditional on line 849
EXN: Coccinelle_modules.Common.Timeout in ./drivers/cpufreq/armada-8k-cpufreq.c
EXN: Coccinelle_modules.Common.Timeout in ./drivers/cpufreq/mvebu-cpufreq.c
An error occurred when attempting to transform some files.
coccicheck failed
make[1]: *** [/home/cocci/testing/Makefile:2003: coccicheck] Error 255
make: *** [Makefile:234: __sub-make] Error 2

Quoted 2 lines

I couldn't google out any meaningful info about this. Is the timeout something I can increase locally? Is something wrong?

Perhaps if you pull from github it will work better now, ie keep going after the timeouts.

julia

#5 lore raw
In reply to a message not in the archive
Quoted 9 lines · Jakub Kicinski
Quoted 5 lines · On Sun, 7 Jan 2024 21:15:54 +0100 (CET) Julia Lawall wrote:
Quoted 2 lines

I couldn't google out any meaningful info about this. Is the timeout something I can increase locally? Is something wrong?

Perhaps if you pull from github it will work better now, ie keep going after the timeouts.

Thank you! I fetched from github, and after an hour it's still making progress, previously it error'ed out after 10 minutes or so!

Great.

Quoted 6 lines

Next issue.. :) when I run with --use-patch-diff commit1..commit2 I get these three lines for every spatch run:

grep: warning: + at start of expression
grep: warning: + at start of expression
grep: warning: + at start of expression

OK, will look into it. I think this comes from coccicheck, not from Coccinelle.

julia