[Bug 657978] New: mod_apparmor causes "soft lockup - CPU#0 stuck..."
https://bugzilla.novell.com/show_bug.cgi?id=657978 https://bugzilla.novell.com/show_bug.cgi?id=657978#c0 Summary: mod_apparmor causes "soft lockup - CPU#0 stuck..." Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: VMWare OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Apache AssignedTo: bnc-team-apache@forge.provo.novell.com ReportedBy: loebig@rz.uni-leipzig.de QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=403768) --> (http://bugzilla.novell.com/attachment.cgi?id=403768) extract from /var/log/messages - 144 lines Enabling mod_apparmor in apache2 causes system to hang totally. This happens not immediately, but after a few hours. CPU load suddenly increases at a extremly high-level. Console, ssh are not working. A Reboot must be done. /var/log/messages records kernel: BUG: soft lockup - CPU#1 stuck for 61s! [httpd2-prefork] (see attachement) The problem is always reproducable by enabling mod_apparmor. It is independent of the httpd2-prefork apparmor profile. Without mod_apparmor no problems appear. system: x86-64 on VMware (ESX 3.5 Update 5) uname -a: Linux 2.6.34.7-0.5-desktop #1 SMP PREEMPT 2010-10-25 08:40:12 +0200 x86_64 x86_64 x86_64 GNU/Linux cat /proc/cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Xeon(R) CPU X5670 @ 2.93GHz stepping : 8 cpu MHz : 2926.000 cache size : 12288 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx lm constant_tsc arch_perfmon pebs bts rep_good xtopology tsc_reliable nonstop_tsc aperfmperf pni ssse3 cx16 lahf_lm ida arat bogomips : 5852.00 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Xeon(R) CPU X5670 @ 2.93GHz stepping : 8 cpu MHz : 2926.000 cache size : 12288 KB physical id : 0 siblings : 2 core id : 9 cpu cores : 2 apicid : 19 initial apicid : 19 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx lm constant_tsc arch_perfmon pebs bts rep_good xtopology tsc_reliable nonstop_tsc aperfmperf pni ssse3 cx16 lahf_lm ida arat bogomips : 5852.00 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=657978
https://bugzilla.novell.com/show_bug.cgi?id=657978#c1
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=657978
https://bugzilla.novell.com/show_bug.cgi?id=657978#c2
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=657978
https://bugzilla.novell.com/show_bug.cgi?id=657978#c3
Claudia Löbig
There are read/write locks all over the code of ns->lock but without disabling irqs.
The problem is that put_cred_rcu is called from softirq context at any time and put_cred_rcu might call write_lock, if refcnt is 0 in this chain: security_cred_free -> apparmor_cred_free -> aa_free_task_context -> aa_put_profile -(refcnt == 0)-> aa_free_profile_kref -> free_profile -> write_lock
Hence sometimes this leads to deadlock -- if somebody hold the lock for R or W. The option is to move the cleanup to a work queue into the process context.
Not a problem in upstream, in Kernel:HEAD or Kernel:stable, write_lock is not called in free_profile there (the function is named free_aa_profile upstream).
Could you check e.g. Kernel:stable?
Sorry, I'm not sure, I've understood everything you explained. As I mentioned, the kernel version is Linux 2.6.34.7-0.5-desktop #1 SMP PREEMPT 2010-10-25. It's the kernel supplied with OpenSuSE 11.3. So I suppose, this is a stable kernel. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=657978
https://bugzilla.novell.com/show_bug.cgi?id=657978#c4
Jiri Slaby
It's the kernel supplied with OpenSuSE 11.3. So I suppose, this is a stable kernel.
Yes, it is stable. I meant if you could try a kernel from: http://download.opensuse.org/repositories/Kernel:/stable/openSUSE_11.3/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=657978
https://bugzilla.novell.com/show_bug.cgi?id=657978#c5
Claudia Löbig
Yes, it is stable. I meant if you could try a kernel from: http://download.opensuse.org/repositories/Kernel:/stable/openSUSE_11.3/
No more crashes after installing kernel-desktop-2.6.36.2-4.1.x86_64 from your Kernel:stable repository. Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com