when sending SIGTERM (ie when stopping / disabling corresponding service) irqbalance does not stop
XavierMika opened this issue · comments
Hi
One of the reasons for this issue is the combination of the fact that :
1/ thermal is enabled by default on x86_64 :
Check whether --enable-thermal was given.
if test ${enable_thermal+y}
then :
enableval=$enable_thermal;
else $as_nop
if test x"$host_cpu" = x"x86_64"
then :
enable_thermal=yes
else $as_nop
enable_thermal=no
fi
2/ kernel option CONFIG_THERMAL_NETLINK is not activated
In this configuration init_thermal () doesn't return, so irqbalance is not working at all,
1st call to nl_recvmsgs resulting (via handle_error) in this error:
thermal: received a netlink error (Interrupted system call should be restarted).
Please specify in the requirements that if the kernel version used is 5.9+ that the CONFIG_THERMAL_NETLINK option must be enabled on x86_64 or adapt configure.ac accordingly, thanks
I might see the issue. The handle_error function is returning NL_SKIP, but I think it should instead return NL_STOP to break us out of the nl_recvmsgs loop. Can you make that change and confirm please?
well done, this change permits irqbalance to start but with these error messages :
thermal: received a netlink error (Interrupted system call).
thermal: failed to receive messages.
Failed to initialize thermal events.
Looks like we need to be a bit smarter that just returning NL_STOP.
I've made a PR here:
#262
Please build that and test, it should correct both the hand and the error above
with the patch error messages are the same :
thermal: received a netlink error (Interrupted system call).
thermal: failed to receive messages.
Failed to initialize thermal events.
please run irqbalance under gdb and let me know what the value of err->error is in handle_error
value of err->error : -2
I've updated the branch, please pull and test again
There is no more error message but we are back in the initial situation, no return from init_thermal
maybe this will be useful :
init_thermal > establish_netlink > nl_recvmsgs
first call of nl_recvmsgs : rc = 0
2nd call of nl_recvmsgs rc : not returning
Thats because I'm an idiot. sorry, updated the branch, run one more time please
it is indeed better
irqbalance works again, the two error messages remain:
thermal: failed to receive messages.
Failed to initialize thermal events.
which I think are appropriate
roger, thank you!