From: Tommi Virtanen <tommi.virtanen@dreamhost.com>
To: Fyodor Ustinov <ufm@ufm.su>
Cc: ceph-devel@vger.kernel.org
Subject: Re: crash on umount
Date: Fri, 3 Jun 2011 08:39:05 -0700 [thread overview]
Message-ID: <20110603153905.GA22186@dreamer> (raw)
In-Reply-To: <4DE8BA2C.6030309@ufm.su>
On Fri, Jun 03, 2011 at 01:40:44PM +0300, Fyodor Ustinov wrote:
> Hi!
>
> kernel 2.6.39
> ceph - 0.28.2
>
> In sysctl.conf set
> vm.min_free_kbytes=262144
>
> Jun 2 03:08:17 amanda kernel: [35398.757055] libceph: msg_new can't
> allocate 4096 bytes
... so first you run out of memory ...
> Jun 3 13:33:10 amanda kernel: [159291.960881] ------------[ cut
> here ]------------
> Jun 3 13:33:10 amanda kernel: [159291.960930] kernel BUG at
> mm/mempool.c:186!
...
> Jun 3 13:33:10 amanda kernel: [159291.970496] Call Trace:
> Jun 3 13:33:10 amanda kernel: [159291.970496] [<ffffffffa02a59e2>]
> ceph_msgpool_destroy+0x12/0x20 [libceph]
> Jun 3 13:33:10 amanda kernel: [159291.970496] [<ffffffffa02a7fc3>]
> ceph_osdc_stop+0x83/0xb0 [libceph]
> Jun 3 13:33:10 amanda kernel: [159291.970496] [<ffffffffa02a158d>]
> ceph_destroy_client+0x1d/0x60 [libceph]
And then, the mempool destroy goes wrong. And that's because...
/**
* mempool_destroy - deallocate a memory pool
* @pool: pointer to the memory pool which was allocated via
* mempool_create().
*
* this function only sleeps if the free_fn() function sleeps. The caller
* has to guarantee that all elements have been returned to the pool (ie:
* freed) prior to calling mempool_destroy().
*/
void mempool_destroy(mempool_t *pool)
{
/* Check for outstanding elements */
BUG_ON(pool->curr_nr != pool->min_nr);
free_pool(pool);
}
We didn't empty the pool before trying to release it. It's either one
of these
ceph_msgpool_destroy(&osdc->msgpool_op);
ceph_msgpool_destroy(&osdc->msgpool_op_reply);
but I can't easily tell which one.
Summary so far: we're leaking msgpool_op or msgpool_op_reply entries
when unmounting kclient while out of memory.
devs: If anyone else has a good idea where this is heading, please
take over.
--
:(){ :|:&};:
next prev parent reply other threads:[~2011-06-03 15:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 10:40 crash on umount Fyodor Ustinov
2011-06-03 15:39 ` Tommi Virtanen [this message]
2011-06-03 16:13 ` Fyodor Ustinov
2011-06-03 16:26 ` Sage Weil
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=20110603153905.GA22186@dreamer \
--to=tommi.virtanen@dreamhost.com \
--cc=ceph-devel@vger.kernel.org \
--cc=ufm@ufm.su \
/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.