Messages in this thread | | | Date | Thu, 11 Dec 2008 23:48:32 +0100 | From | "Kay Sievers" <> | Subject | Re: [Bugme-new] [Bug 12201] New: long wait in call_usermodehelper() / queue_work() / wait_for_completion() |
| |
On Thu, Dec 11, 2008 at 23:37, Andrew Morton <akpm@linux-foundation.org> wrote: >> As I continued to dig deeper (using lots of printks), I found that these delays >> were caused by the netlink_create() code calling request_module() to find/load >> a module for AUDIT support which doesn't exist. >> >> Continuing to dig, I found that request_module() uses call_usermodehelper() to >> run /sbin/modprobe to find/load the module. >> >> The farthest I got is that after the process is created, we call >> wait_for_completion() to get the result of that process. This waiting process >> takes 1-2 seconds. >> >> The big problem in troubleshooting here is that this only starts to happen >> after the server has been online for a while (10 days maybe) and serving lots >> of traffic. The delay gradually builds up and maxes out at around 2 seconds. >> >> If I manually call /sbin/modprobe on the commandline and provide it the same >> arguments that call_usermodehelper() uses, the command returns instantly 100% >> of the time (assuming server has been on for a while). >> >> If I write a small pilot program that calls socket(PF_NETLINK, SOCK_RAW, >> NETLINK_AUDIT), it will delay by 1-2 seconds 100% of the time (assuming server >> has been online for a while). Certain protocol types given to socket() have >> zero delay (because no module needs to be loaded). >> >> Steps to reproduce: >> Once server has been online for a while, a simple call to socket(PF_NETLINK, >> SOCK_RAW, NETLINK_AUDIT) shows the problem.
If you replace /sbin/modprobe in the kernel module loader, does the delay go away: echo /bin/true > /proc/sys/kernel/modprobe ?
Kay
| |