All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: Ilya Dryomov <ilya.dryomov@inktank.com>
Cc: Hannes Landeholm <hannes@jumpstarter.io>,
	Ceph Development <ceph-devel@vger.kernel.org>,
	Thorwald Lundqvist <thorwald@jumpstarter.io>
Subject: Re: crash in rbd_img_request_create
Date: Sun, 11 May 2014 23:34:56 -0500	[thread overview]
Message-ID: <53704F70.3090800@ieee.org> (raw)
In-Reply-To: <CALFYKtBXLKhm1HvwK=FGQpJdx_TMaWE_7a0s6Qo7=9vdcsjkkw@mail.gmail.com>

On 05/11/2014 04:33 AM, Ilya Dryomov wrote:
> On Sun, May 11, 2014 at 7:11 AM, Alex Elder <elder@ieee.org> wrote:
>> On 05/10/2014 05:18 PM, Hannes Landeholm wrote:
>>> Hello,
>>>
>>> I have a development machine that I have been running stress tests on
>>> for a week as I'm trying to reproduce some hard to reproduce failures.
>>> I've mentioned the same machine previously in the thread "rbd unmap
>>> deadlock". I just now noticed that some processes had completely
>>> stalled. I looked in the system log and saw this crash about 9 hours
>>> ago:
>>
>> Are you still running kernel rbd as a client of ceph
>> services running on the same physical machine?
>>
>> I personally believe that scenario may be at risk of
>> deadlock in any case--we haven't taken great care to
>> avoid it in this case.
>>
>> Anyway...
>>
>> I can build v3.14.1 but I don't know what kernel configuration
>> you are using.  Knowing that could be helpful.  I built it using
>> a config I have though, and it's *possible* you crashed on
>> this line, in rbd_segment_name():
>>         ret = snprintf(name, CEPH_MAX_OID_NAME_LEN + 1, name_format,
>>                         rbd_dev->header.object_prefix, segment);
>> And if so, the only reason I can think that this failed is if
>> rbd_dev->header.object_prefix were null (or an otherwise bad
>> pointer value).  But at this point it's a lot of speculation.
> 
> More precisely, it crashed on
> 
> segment = offset >> rbd_dev->header.obj_order;

After looking more closely at this tonight I can say I concur.

kernel: BUG: unable to handle kernel paging request at ffff87ff3fbcdc58
RAX: ffff87ff3fbcdc00

    2483:       00 00 00 be             movzbl 0x58(%rax),%ecx

Unfortunately that's about all I can say right now.

Since the stack includes rbd_request_fn() we know it's a
request that came from the block layer--which means that
the rbd_img_request_create() call was not being done for
a parent image request.  On the other hand, if you're right
about use-after-free, it could still involve an image request
created through that path through the code (if a parent image
request were freed while it was still in use).

Hannes indicated layered images were involved.

More later...

					-Alex

> while loading obj_order.  rbd_dev is ffff87ff3fbcdc00, which suggests
> a use after free of some sort.  (This is the first rbd_dev deref after
> grabbing it from img_request at the top of rbd_img_request_fill(),
> which got it from request_queue::queuedata in rbd_request_fn().)
> 
> Thanks,
> 
>                 Ilya
> 


  reply	other threads:[~2014-05-12  4:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-10 22:18 crash in rbd_img_request_create Hannes Landeholm
2014-05-11  3:11 ` Alex Elder
2014-05-11  9:33   ` Ilya Dryomov
2014-05-12  4:34     ` Alex Elder [this message]
2014-05-12 17:28       ` Hannes Landeholm
2014-05-13 12:35         ` Alex Elder
2014-05-13 17:17           ` Hannes Landeholm
2014-05-13 17:18             ` Alex Elder
2014-05-13 20:58             ` Sage Weil
2014-05-13 21:39               ` Hannes Landeholm
2014-05-11 16:33   ` Hannes Landeholm

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=53704F70.3090800@ieee.org \
    --to=elder@ieee.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=hannes@jumpstarter.io \
    --cc=ilya.dryomov@inktank.com \
    --cc=thorwald@jumpstarter.io \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.