Re: 2.6.23-rc1-mm1 -- INFO: possible recursive locking detected -- (>hb_spinlock){....}, at: [] irias_seq_show+0xba/0x1a8

2007-07-29 Thread Paul Menage
On 7/28/07, Andrew Morton <[EMAIL PROTECTED]> wrote:
> >  [] proc_cpuset_show+0x5e/0xb9
> >  [] seq_read+0xef/0x266
> >  [] vfs_read+0x8e/0x117
> >  [] sys_read+0x3d/0x61
> >  [] sysenter_past_esp+0x5f/0x99
> >  ===
> > INFO: lockdep is turned off.
> > Code: 00 89 d8 83 c4 0c 5b 5e 5f 5d c3 55 89 e5 57 56 53 83 ec 08 89
> > 45 f0 89 55 ec 89 d3 01 cb 8d 43 ff c6 43 ff 00 8b 55 f0 8b 72 1c <8b>
> > 56 3c 29 d0 3b 45 ec 72 45 89 d1 c1 e9 02 8b 76 40 89 c7 f3
> > EIP: [] container_path+0x20/0x7b SS:ESP 0068:c5ccff00
>

Oops, this is a case of trying to read /proc/self/cpuset when cpusets
are completely unmounted. It works fine when cpusets is mounted as
part of any hierarchy, or part of an active but unmounted hierarchy.
Attached patch fixes it, and should be rolled in to the first patch of
the series. (basic framework patch).

Paul
---
 kernel/container.c |9 +
 1 file changed, 9 insertions(+)

Index: container-2.6.22-rc6-mm1/kernel/container.c
===
--- container-2.6.22-rc6-mm1.orig/kernel/container.c
+++ container-2.6.22-rc6-mm1/kernel/container.c
@@ -684,6 +684,15 @@ int container_path(const struct containe
 {
 	char *start;
 
+	if (cont == dummytop) {
+		/*
+		 * Inactive subsystems have no dentry for their root
+		 * container
+		 */
+		strcpy(buf, "/");
+		return 0;
+	}
+
 	start = buf + buflen;
 
 	*--start = '\0';


Re: 2.6.23-rc1-mm1 -- INFO: possible recursive locking detected -- (>hb_spinlock){....}, at: [] irias_seq_show+0xba/0x1a8

2007-07-28 Thread Andrew Morton
On Sat, 28 Jul 2007 00:01:23 -0700 "Miles Lane" <[EMAIL PROTECTED]> wrote:

> Looking to see whether reading /proc files made things unhappy:
> 
>find /proc/ | xargs cat
>find /proc/ -name "[g-z]*" | xargs cat
>find /proc/ -name "[a-g]*" | xargs file
> 
> dmesg shows:

I'm unable to reproduce this.

> process `cat' is using deprecated sysctl (syscall)
> net.ipv6.neigh.default.retrans_time; Use
> net.ipv6.neigh.default.retrans_time_ms instead.
> 
> =
> [ INFO: possible recursive locking detected ]
> 2.6.23-rc1-mm1 #15
> -
> cat/5333 is trying to acquire lock:
>  (>hb_spinlock){}, at: [] irias_seq_show+0xba/0x1a8
> 
> but task is already holding lock:
>  (>hb_spinlock){}, at: [] irias_seq_start+0x14/0x4e
> 
> other info that might help us debug this:
> 2 locks held by cat/5333:
>  #0:  (>lock){--..}, at: [] mutex_lock+0x1c/0x1f
>  #1:  (>hb_spinlock){}, at: [] 
> irias_seq_start+0x14/0x4e
> 
> stack backtrace:
>  [] show_trace_log_lvl+0x1a/0x2f
>  [] show_trace+0x12/0x14
>  [] dump_stack+0x16/0x18
>  [] __lock_acquire+0x18d/0xc20
>  [] lock_acquire+0x71/0x8b
>  [] _spin_lock+0x35/0x42
>  [] irias_seq_show+0xba/0x1a8
>  [] seq_read+0x192/0x266
>  [] proc_reg_read+0x63/0x76
>  [] vfs_read+0x8e/0x117
>  [] sys_read+0x3d/0x61
>  [] sysenter_past_esp+0x5f/0x99
>  ===

It'd be useful if you could display the name of each /proc file as it is
read, so we know which one went boom.

> BUG: unable to handle kernel NULL pointer dereference at virtual
> address 003c
>  printing eip:
> c01536a7
> *pde = 
> Oops:  [#1]
> PREEMPT SMP
> Modules linked in: binfmt_misc cpufreq_conservative cpufreq_powersave
> cpufreq_performance sbp2 parport_pc lp parport snd_intel8x0
> snd_ac97_codec ac97_bus snd_pcm_oss snd_mixer_oss pcmcia snd_pcm
> snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event
> snd_seq firewire_ohci snd_timer yenta_socket firewire_core
> snd_seq_device sdhci rsrc_nonstatic tifm_7xx1 crc_itu_t tifm_core
> pcmcia_core mmc_core ipw2200 snd rng_core iTCO_wdt iTCO_vendor_support
> soundcore shpchp pci_hotplug snd_page_alloc rtc 8139cp 8139too mii
> ehci_hcd uhci_hcd ohci1394 ieee1394 usbcore
> CPU:0
> EIP:0060:[]Not tainted VLI
> EFLAGS: 00210286   (2.6.23-rc1-mm1 #15)
> EIP is at container_path+0x20/0x7b
> eax: c6e8b05f   ebx: c6e8b060   ecx: 1000   edx: c0880434
> esi:    edi: c6e8a060   ebp: c5ccff14   esp: c5ccff00
> ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
> Process cat (pid: 5412, ti=c5ccf000 task=c6cf6390 task.ti=c5ccf000)
> Stack: c6e8a060 c0880434 c1c58000 c6f01c60 c6e8a060 c5ccff30 c0154ad2 c10dd100
>fffd c5c9f500 c6f01c60 0001 c5ccff70 c01976b1 0400 08054000
>c5c9f500 c6f01c80  c5ccff60 08054000 0400 c5ccffb0 
> Call Trace:
>  [] show_trace_log_lvl+0x1a/0x2f
>  [] show_stack_log_lvl+0x9d/0xac
>  [] show_registers+0x1f1/0x332
>  [] die+0x112/0x247
>  [] do_page_fault+0x4ea/0x5c8
>  [] error_code+0x72/0x78
>  [] proc_cpuset_show+0x5e/0xb9
>  [] seq_read+0xef/0x266
>  [] vfs_read+0x8e/0x117
>  [] sys_read+0x3d/0x61
>  [] sysenter_past_esp+0x5f/0x99
>  ===
> INFO: lockdep is turned off.
> Code: 00 89 d8 83 c4 0c 5b 5e 5f 5d c3 55 89 e5 57 56 53 83 ec 08 89
> 45 f0 89 55 ec 89 d3 01 cb 8d 43 ff c6 43 ff 00 8b 55 f0 8b 72 1c <8b>
> 56 3c 29 d0 3b 45 ec 72 45 89 d1 c1 e9 02 8b 76 40 89 c7 f3
> EIP: [] container_path+0x20/0x7b SS:ESP 0068:c5ccff00

Ditto, thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/