linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] deadlock during lvm snapshot
Date: Tue, 29 Nov 2016 09:38:11 +0100	[thread overview]
Message-ID: <b7987159-2cce-6323-e170-7c7dea53f3b4@redhat.com> (raw)
In-Reply-To: <59a4ab68-65cc-5205-65c6-6cd7ea41f582@topit.si>

Dne 28.11.2016 v 12:58 Tomaz Beltram napsal(a):
> Hi,
>
> I'm doing backup of a running mongodb using LVM snapshot. Sometimes I
> run into a deadlock situation and kernel reports blocked tasks for jbd2,
> mongod, dmeventd and my tar doing backup.
>
> This happens very rarely (one in a thousand) but the effect is rather
> severe as mongodb stops working. I also can't remove and unmount the
> snapshot. I have attached syslog of two occurrences. The stack traces of
> the blocked tasks are very similar so I suspect a potential race
> condition between the affected tasks.
>
> Sep 15 17:06:53 dss2 kernel: [719277.567904] INFO: task jbd2/dm-2-8:9048
> blocked for more than 120 seconds.
> Sep 15 17:06:53 dss2 kernel: [719277.568130] INFO: task mongod:23239
> blocked for more than 120 seconds.
> Sep 15 17:06:53 dss2 kernel: [719277.568267] INFO: task mongod:23242
> blocked for more than 120 seconds.
> Sep 15 17:06:53 dss2 kernel: [719277.568350] INFO: task mongod:23243
> blocked for more than 120 seconds.
> Sep 15 17:06:53 dss2 kernel: [719277.568397] INFO: task dmeventd:12427
> blocked for more than 120 seconds.
> Sep 15 17:06:53 dss2 kernel: [719277.568523] INFO: task
> kworker/u16:2:31890 blocked for more than 120 seconds.
> Sep 15 17:06:53 dss2 kernel: [719277.568713] INFO: task tar:12446
> blocked for more than 120 seconds.
> Sep 15 17:08:53 dss2 kernel: [719397.567614] INFO: task jbd2/dm-2-8:9048
> blocked for more than 120 seconds.
> Sep 15 17:08:53 dss2 kernel: [719397.567731] INFO: task mongod:23239
> blocked for more than 120 seconds.
> Sep 15 17:08:53 dss2 kernel: [719397.567870] INFO: task mongod:23240
> blocked for more than 120 seconds.
>
> Nov 25 17:10:56 dss2 kernel: [282360.865020] INFO: task jbd2/dm-4-8:878
> blocked for more than 120 seconds.
> Nov 25 17:10:56 dss2 kernel: [282360.865624] INFO: task mongod:1652
> blocked for more than 120 seconds.
> Nov 25 17:10:56 dss2 kernel: [282360.866279] INFO: task mongod:1655
> blocked for more than 120 seconds.
> Nov 25 17:10:56 dss2 kernel: [282360.866771] INFO: task mongod:1656
> blocked for more than 120 seconds.
> Nov 25 17:10:56 dss2 kernel: [282360.867294] INFO: task dmeventd:3504
> blocked for more than 120 seconds.
> Nov 25 17:10:56 dss2 kernel: [282360.867783] INFO: task
> kworker/u16:2:8016 blocked for more than 120 seconds.
> Nov 25 17:10:56 dss2 kernel: [282360.868351] INFO: task tar:3560 blocked
> for more than 120 seconds.
> Nov 25 17:10:56 dss2 kernel: [282360.868865] INFO: task
> kworker/u16:1:5561 blocked for more than 120 seconds.
> Nov 25 17:12:56 dss2 kernel: [282480.868656] INFO: task jbd2/dm-4-8:878
> blocked for more than 120 seconds.
> Nov 25 17:12:56 dss2 kernel: [282480.869015] INFO: task mongod:1652
> blocked for more than 120 seconds.
>
> Full syslogs of two occurrences are attached.
>
> I have Ubuntu 16.04.1 (lvm2 2.02.133-1ubuntu10) with mongod 3.2.9 on a
> 64bit system.
>


Please switch to newer version of lvm2.

Sequence with  snapshot activation had been reworked to minimize possibility 
to hit this kernel race - race is still there even with the latest kernel,
but in the real world you should not have a much chance to hit it.
If you still do - please report again - we will take more closer look and your 
workflow.

Regards

Zdenek

  reply	other threads:[~2016-11-29  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 11:58 [linux-lvm] deadlock during lvm snapshot Tomaz Beltram
2016-11-29  8:38 ` Zdenek Kabelac [this message]
2016-11-29 10:28 ` Tomaz Beltram
2016-11-29 15:59   ` [linux-lvm] deadlock during lvm snapshot target Zdenek Kabelac

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=b7987159-2cce-6323-e170-7c7dea53f3b4@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=linux-lvm@redhat.com \
    /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).