Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932423Ab1COVTN (ORCPT ); Tue, 15 Mar 2011 17:19:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59863 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932335Ab1COVTL (ORCPT ); Tue, 15 Mar 2011 17:19:11 -0400 Date: Tue, 15 Mar 2011 22:08:55 +0100 From: Oleg Nesterov To: David Rientjes Cc: Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org, Rik van Riel , KOSAKI Motohiro Subject: Re: Linux 2.6.38 Message-ID: <20110315210855.GI21640@redhat.com> References: <20110314213331.24229139.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1820 Lines: 68 On 03/14, David Rientjes wrote: > > He also presented a test case on linux-mm that caused the oom killer to > avoid acting if a thread is ptracing a thread in the exit path with > PTRACE_O_TRACEEXIT. That should be fixed with > > http://marc.info/?l=linux-mm&m=129997893430351 I don't think it can fix this. I didn't verify this, but the slightly different test-case below should have the same effect. But this doesn't matter. We can fix this particular case, and we have the problems with the coredump anyway. What I can't understand is what exactly the first patch tries to fix. When I ask you, you tell me that for_each_process() can miss the group leader because it can exit before sub-threads. This must not happen, or we have some serious bug triggered by your workload. So, once again. Could you please explain the original problem and how this patch helps? Oleg. #include #include #include #include #include #include #include void *tfunc(void* arg) { if (arg) { ptrace(PTRACE_TRACEME, 0,0,0); raise(SIGSTOP); pthread_kill(*(pthread_t*)arg, SIGQUIT); } pause(); } int main(void) { int pid; if (!fork()) { pthread_t thread1, thread2; pthread_create(&thread1, NULL, tfunc, NULL); pthread_create(&thread2, NULL, tfunc, &thread1); pause(); return 0; } assert((pid = waitpid(-1, NULL, __WALL)) > 0); assert(ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_TRACEEXIT) == 0); assert(ptrace(PTRACE_CONT, pid, 0, 0) == 0); wait(NULL); pause(); return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/