mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Nathan Lynch <nathanl@austin.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Zwane Mwaikambo <zwane@linuxpower.ca>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: 2.6.8.1-mm1
Date: Tue, 17 Aug 2004 17:08:39 +0530	[thread overview]
Message-ID: <20040817113839.GB7005@in.ibm.com> (raw)
In-Reply-To: <1092722342.3081.68.camel@booger>

I found this to be due to task leak in exit code. In release_task:

	a. Task is removed from task-list (unhash_process)
	b. More processing is done (like proc_pid_flush etc)
	   before task finally dies.

The problem is the task can get preempted between a and b. In that window
its CPU can die and migrate_all_tasks will not migrate the task (since
it is not on the list).  This will cause the task to be forever stuck
to the dead cpu.

One option is not to remove the task until the last minute (when
it calls schedule). Rusty however felt that release_task can be 
called from __put_task_struct, which will avoid the problem we have
now. He is most likely going to send a patch for the same.

	
On Tue, Aug 17, 2004 at 12:59:02AM -0500, Nathan Lynch wrote:
> I can consistently hit this BUG_ON in migration_call's CPU_DEAD handling
> by doing:
> 
> while true ; do
> echo 0 > /sys/devices/system/cpu/cpu1/online
> echo 1 > /sys/devices/system/cpu/cpu1/online
> done
> 
> and then starting a kernel build.  It seems to take less than 20
> minutes.  I can also recreate it on ppc64, but only with
> CONFIG_PREEMPT=y (I haven't tried without preempt on i386 yet).
> 
> kernel BUG at kernel/sched.c:4035!                                              
> invalid operand: 0000 [#1]                                                      
> PREEMPT SMP                                                                     
> Modules linked in:                                                              
> CPU:    0                                                                       
> EIP:    0060:[<c0122b1b>]    Not tainted VLI                                    
> EFLAGS: 00010202   (2.6.8.1-mm1)                                                
> EIP is at migration_call+0x1bb/0x300                                            
> eax: 00000001   ebx: c1410f60   ecx: 00000000   edx: deee8ec8                   
> esi: deee8000   edi: 00000001   ebp: deee8ee0   esp: deee8eb8                   
> ds: 007b   es: 007b   ss: 0068                                                  
> Process bash (pid: 2956, threadinfo=deee8000 task=df448150)                     
> Stack: deee8ed4 de6f6630 de6f6630 deee8ed4 00000296 deee8ee4 00000296 c04a5b78  
>        00000001 00000006 deee8ef4 c0136928 deee8000 00000001 c04a7a40 deee8f2c  
>        c01405ac c01a8d79 c04f5700 00000000 deee8000 00000001 00000001 000000ff  
> Call Trace:                                                                     
>  [<c01082ea>] show_stack+0x7a/0x90                                              
>  [<c0108472>] show_registers+0x152/0x1c0                                        
>  [<c01086a0>] die+0x110/0x200                                                   
>  [<c0108b99>] do_invalid_op+0xe9/0xf0                                           
>  [<c0107ed9>] error_code+0x2d/0x38                                              
>  [<c0136928>] notifier_call_chain+0x28/0x50                                     
>  [<c01405ac>] cpu_down+0x11c/0x230                                              
>  [<c02a5d98>] store_online+0x38/0x40                                            
>  [<c02a3117>] sysdev_store+0x37/0x40                                            
>  [<c01a8b8e>] flush_write_buffer+0x2e/0x40                                      
>  [<c01a8bea>] sysfs_write_file+0x4a/0x60                                        
>  [<c016b362>] vfs_write+0xa2/0x100                                              
>  [<c016b471>] sys_write+0x41/0x70                                               
>  [<c010746f>] syscall_call+0x7/0xb                                              
> Code: 0b cd 0f 6f 54 43 c0 eb 8e c7 04 24 6f 34 43 c0 b8 54 2a 12 c0 89 44 24 04
>  e8 e2 3f 00 00 0f 0b 89 00 82 d4 42 c0 e9 4a ff ff ff <0f> 0b c3 0f 6f 54 43 c0
>  e9 2c ff ff ff e8 53 87 2f 00 e9 17 ff
> 
> Nathan
> 

-- 


Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017

  parent reply	other threads:[~2004-08-17 11:38 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-16 21:37 2.6.8.1-mm1 Andrew Morton
2004-08-16 21:47 ` 2.6.8.1-mm1 Christoph Hellwig
2004-08-17 13:20   ` 2.6.8.1-mm1 Frediano Ziglio
2004-08-18 23:57   ` 2.6.8.1-mm1 Peter Osterlund
2004-08-19  9:45     ` 2.6.8.1-mm1 Christoph Hellwig
2004-08-20  5:44       ` 2.6.8.1-mm1 Peter Osterlund
2004-08-20  6:03         ` 2.6.8.1-mm1 Christoph Hellwig
2004-08-16 22:30 ` 2.6.8.1-mm1 Bartlomiej Zolnierkiewicz
2004-08-16 21:51   ` 2.6.8.1-mm1 Alan Cox
2004-08-16 23:25 ` 2.6.8.1-mm1 Arkadiusz Miskiewicz
2004-08-16 23:39 ` 2.6.8.1-mm1 Martin J. Bligh
2004-08-17  1:32   ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17  6:59     ` 2.6.8.1-mm1 Sam Ravnborg
2004-08-17  6:25       ` 2.6.8.1-mm1 Martin J. Bligh
2004-08-17  6:38         ` 2.6.8.1-mm1 Andrew Morton
2004-08-17  7:00       ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17  7:05         ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17  3:07 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17  3:09   ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17  3:19     ` 2.6.8.1-mm1 Andrew Morton
2004-08-17  3:41       ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17  4:16         ` 2.6.8.1-mm1 Nick Piggin
2004-08-17 14:38       ` 2.6.8.1-mm1 (compile stats) John Cherry
2004-08-17  5:59 ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17  7:19   ` 2.6.8.1-mm1 Rusty Russell
2004-08-17  8:45     ` [patch] new-task-fix.patch, 2.6.8.1-mm1 Ingo Molnar
2004-08-17 11:35       ` Nick Piggin
2004-08-17 11:38   ` Srivatsa Vaddagiri [this message]
2004-08-17 17:53     ` 2.6.8.1-mm1 Andrew Morton
2004-08-18  1:04       ` 2.6.8.1-mm1 Rusty Russell
2004-08-18 17:36         ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17  6:20 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17  6:40   ` 2.6.8.1-mm1 sam
2004-08-17  7:05 ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17 13:39   ` 2.6.8.1-mm1 Zwane Mwaikambo
2004-08-17 12:54 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 14:15   ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 21:59 ` ldchk -> arch/arm/Makefile? [Was: 2.6.8.1-mm1] Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040817113839.GB7005@in.ibm.com \
    --to=vatsa@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathanl@austin.ibm.com \
    --cc=rusty@rustcorp.com.au \
    --cc=zwane@linuxpower.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®