linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Long Gao <gaolong@kylinos.com.cn>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Patch for lost wakeups
Date: Fri, 9 Aug 2013 15:28:51 +0200	[thread overview]
Message-ID: <20130809132851.GA31901@redhat.com> (raw)
In-Reply-To: <CA+55aFwAnWZGkXbyLmL3RxQGW-dX_jjDBPfA5PjxeVWn==a6tA@mail.gmail.com>

On 08/08, Linus Torvalds wrote:
>
> > Name:    Xorg
> > State:    S (sleeping)
> > Tgid:    2597
> > Pid:    2597
> > PPid:    2595
> > TracerPid:    0
> > Uid:    0    0    0    0
> > Gid:    0    0    0    0
> > FDSize:    64
> > Groups:
> > VmPeak:       44640 kB
> > VmSize:       31232 kB
> > VmLck:           0 kB
> > VmHWM:       20560 kB
> > VmRSS:       20016 kB
> > VmData:        5728 kB
> > VmStk:         160 kB
> > VmExe:        1952 kB
> > VmLib:       11296 kB
> > VmPTE:         128 kB
> > VmSwap:           0 kB
> > Threads:    1
> > SigQ:    1/15809
> > SigPnd:    00000000000000000000000000000000
> > ShdPnd:    00000000000000000000000000200000
> > SigBlk:    00000000000000000000000000000000
> > SigIgn:    80000000000000000000000006001000
> > SigCgt:    000000000000000000000001e020eecf

OK, given that Threads == 1 this is wrong in any case.

Could you please reproduce with the trivial patch below ? (please also
should /proc/pid/stack).

If (with this patch) SigQ: should "1" at the end, then we have a scheduler
race or someone does set_tsk_thread_flag(non-current-task, TIF_SIGPENDING)
without locking/wakeup.

Otherwise we should identify the wrong clear_flag(TIF_SIGPENDING).

Oleg.


diff --git a/fs/proc/array.c b/fs/proc/array.c
index cbd0f1b..d4a8cbb 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -286,7 +286,7 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
 	}
 
 	seq_printf(m, "Threads:\t%d\n", num_threads);
-	seq_printf(m, "SigQ:\t%lu/%lu\n", qsize, qlim);
+	seq_printf(m, "SigQ:\t%lu/%lu %d\n", qsize, qlim, !!signal_pending(p));
 
 	/* render them all */
 	render_sigset_t(m, "SigPnd:\t", &pending);


  parent reply	other threads:[~2013-08-09 13:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_26310211398C21034BD3B2F9@qq.com>
2013-08-08 18:19 ` Patch for lost wakeups Linus Torvalds
2013-08-08 19:17   ` Oleg Nesterov
2013-08-08 19:51     ` Linus Torvalds
2013-08-09 13:04       ` Oleg Nesterov
2013-08-09 18:21         ` Linus Torvalds
2013-08-11 17:25           ` Oleg Nesterov
2013-08-11 17:27             ` Oleg Nesterov
     [not found]           ` <tencent_293B72F26D71A4191C7C999A@qq.com>
2013-08-11 17:39             ` Oleg Nesterov
2013-08-11 23:52               ` James Bottomley
2013-08-12 17:02           ` [PATCH] sched: fix the theoretical signal_wake_up() vs schedule() race Oleg Nesterov
2013-08-13  7:55             ` Peter Zijlstra
2013-08-13 14:33               ` Oleg Nesterov
2013-08-16 18:46                 ` [tip:sched/core] sched: Fix the theoretical signal_wake_up() vs. " tip-bot for Oleg Nesterov
2013-08-17 15:05                   ` Oleg Nesterov
2013-08-19  7:13                     ` Ingo Molnar
2013-08-09 15:18     ` [PATCH 0/1] dlm: kill the unnecessary and wrong device_close()->recalc_sigpending() Oleg Nesterov
2013-08-09 15:19       ` [PATCH 1/1] " Oleg Nesterov
2013-08-12 20:26         ` David Teigland
2013-08-09 13:28   ` Oleg Nesterov [this message]
2013-08-09 15:31   ` block_all_signals() must die (Was: Patch for lost wakeups) Oleg Nesterov

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=20130809132851.GA31901@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=gaolong@kylinos.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).