public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Cc: "linux-kernel mlist" <linux-kernel@vger.kernel.org>,
	"linux-stable mlist" <stable@kernel.org>,
	"Hervé Commowick" <hcommowick@exosec.fr>,
	seto.hidetoshi@jp.fujitsu.com
Subject: Re: [stable] 2.6.32.21 - uptime related crashes?
Date: Sat, 30 Apr 2011 11:36:05 +0200	[thread overview]
Message-ID: <20110430093605.GA10529@1wt.eu> (raw)
In-Reply-To: <20110429100200.GB23293@pcnci.linuxbox.cz>

Hello Nikola,

On Fri, Apr 29, 2011 at 12:02:00PM +0200, Nikola Ciprich wrote:
> (another CC added)
> 
> Hello Willy!
> 
> I made some statistics of our servers regarding kernel version and uptime.
> Here are some my thoughts:
> - I'm 100% sure this problem wasn't present in kernels <= 2.6.30.x (we've got a lot of boxes with uptimes >600days)
> - I'm 90% sure this problem also wasn't present in 2.6.32.16 (we've got 6 boxes running for 235 to 280days)

OK those are all precious information.

> What I'm not sure is, whether this is present in 2.6.19, I have:
> 2 boxes running 2.6.32.19 for 238days and one 2.6.32.20 for 216days.
> I also have a bunch ov 2.6.32.23 boxes, which are now getting close to 200days uptime.
> But I suspect this really is first problematic version, more on it later. 
> First regarding Your question about CONFIG_HZ - we use 250HZ setting, which leads me to following:
> 250 * 60 * 60 * 24 * 199 = 4298400000 which is value a little over 2**32! So maybe some unsingned long variable
> might overflow? Does this make sense?

Yes of course it makes sense, that was also my worries. 2^32 jiffies at
250 Hz is slightly less than 199 days. Maybe an overflow somewhere keeps
propagating wrong results on some computations. I remember having encountered
a lot of funny things when trying to get 2.4 get past the 497 days limit
using the jiffies64 patch. So I would not be surprized at all that we're
in a similar situation here.

Also, I've checked the Debian kernel config where we had the divide overflow
and it was running at 250 Hz too.

> And to my suspicion about 2.6.32.19, there is one commit which maybe is related:
> 
> commit 0cf55e1ec08bb5a22e068309e2d8ba1180ab4239
> Author: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> Date:   Wed Dec 2 17:28:07 2009 +0900
> 
>     sched, cputime: Introduce thread_group_times()
>     
>     This is a real fix for problem of utime/stime values decreasing
>     described in the thread:
>     
>        http://lkml.org/lkml/2009/11/3/522
>     
>     Now cputime is accounted in the following way:
>     
>      - {u,s}time in task_struct are increased every time when the thread
>        is interrupted by a tick (timer interrupt).
>     
>      - When a thread exits, its {u,s}time are added to signal->{u,s}time,
>        after adjusted by task_times().
>     
>      - When all threads in a thread_group exits, accumulated {u,s}time
>        (and also c{u,s}time) in signal struct are added to c{u,s}time
>        in signal struct of the group's parent.
> .
> .
> .
> 
> I haven't studied this into detail yet, but it seems to me it might really be related. Hidetoshi-san - do You have some opinion about this?
> Could this somehow either create or invoke the problem with overflow of some variable which would lead to division by zero or similar problems?
> 
> Any other thoughts?

There was a kernel parameter in the past that was used to make jiffies wrap
a few minutes after boot, maybe we should revive it to try to reproduce
without waiting 7 new months :-/

Last, the "advantage" with a suspected regression in a stable series is that 
there are a lot less patches to test.

Regards,
Willy


  reply	other threads:[~2011-04-30  9:36 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28  8:26 2.6.32.21 - uptime related crashes? Nikola Ciprich
2011-04-28 18:34 ` [stable] " Willy Tarreau
2011-04-29 10:02   ` Nikola Ciprich
2011-04-30  9:36     ` Willy Tarreau [this message]
2011-04-30 11:22       ` Henrique de Moraes Holschuh
2011-04-30 11:54         ` Willy Tarreau
2011-04-30 12:32           ` Henrique de Moraes Holschuh
2011-04-30 12:02       ` Nikola Ciprich
2011-04-30 15:57         ` Greg KH
2011-04-30 16:08           ` Randy Dunlap
2011-04-30 16:49             ` Willy Tarreau
2011-04-30 18:14               ` Henrique de Moraes Holschuh
2011-04-30 17:39       ` Faidon Liambotis
2011-04-30 20:14         ` Willy Tarreau
2011-05-14 19:04           ` Nikola Ciprich
2011-05-14 20:45             ` Willy Tarreau
2011-05-14 20:59               ` Ben Hutchings
2011-05-14 23:13               ` Nicolas Carlier
2011-05-15 22:56             ` Faidon Liambotis
2011-05-16  6:49               ` Apollon Oikonomopoulos
2011-06-28  2:25         ` john stultz
2011-06-28  5:17           ` Willy Tarreau
2011-06-28  6:19             ` Apollon Oikonomopoulos
2011-07-06  6:15           ` Andrew Morton
2011-07-12  1:18             ` MINOURA Makoto / 箕浦 真
2011-07-12  1:40               ` john stultz
2011-07-12  2:49                 ` MINOURA Makoto / 箕浦 真
2011-07-12  4:19                   ` Willy Tarreau
2011-07-15  0:35                     ` john stultz
2011-07-15  8:30                       ` Peter Zijlstra
2011-07-15 10:02                         ` Peter Zijlstra
2011-07-15 18:03                           ` john stultz
2011-07-15 10:01                       ` Peter Zijlstra
2011-07-15 17:59                         ` john stultz
2011-07-21  7:22                           ` Ingo Molnar
2011-07-21 12:24                             ` Peter Zijlstra
2011-07-21 12:50                               ` Nikola Ciprich
2011-07-21 12:53                                 ` Peter Zijlstra
2011-07-21 18:45                                   ` Ingo Molnar
2011-07-21 19:32                                     ` Nikola Ciprich
2011-08-25 18:56                                     ` Faidon Liambotis
2011-08-30 22:38                                       ` [stable] " Greg KH
2011-09-04 23:26                                         ` Faidon Liambotis
2011-10-23 18:31                                           ` Ruben Kerkhof
2011-10-23 22:07                                             ` Greg KH
2011-10-25 22:44                                             ` john stultz
2011-10-25 23:25                                               ` Willy Tarreau
2011-12-02 23:45                                                 ` Greg KH
2011-12-03  0:02                                                   ` john stultz
2011-12-03  1:02                                                     ` Greg KH
2011-12-03  7:00                                                       ` Willy Tarreau
2011-12-05 16:53                                                       ` Ingo Molnar
2011-10-26 18:21                                               ` Ruben Kerkhof
2011-07-21 19:25                                   ` Nikola Ciprich
2011-07-21 19:37                                     ` john stultz
2011-07-21 19:53                             ` john stultz
2011-05-06  3:12     ` [stable] " Hidetoshi Seto
2011-05-13 22:08   ` Nicolas Carlier

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=20110430093605.GA10529@1wt.eu \
    --to=w@1wt.eu \
    --cc=hcommowick@exosec.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikola.ciprich@linuxbox.cz \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=stable@kernel.org \
    /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