From: Simone Gotti <simone.gotti@gmail.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH] msgr: Fix crash in policy.throttler->get(message_size) when message_size == 0
Date: Fri, 18 Jun 2010 15:08:06 +0200 [thread overview]
Message-ID: <4C1B6FB6.6020606@gmail.com> (raw)
Hi all,
using the unstable branch I noticed that sometimes the various servers
and the clients were crashing with this backtrace:
#0 0x00000035d02329a5 in raise () from /lib64/libc.so.6
#1 0x00000035d0234185 in abort () from /lib64/libc.so.6
#2 0x00000035d76be8cd in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib64/libstdc++.so.6
#3 0x00000035d76bca56 in ?? () from /usr/lib64/libstdc++.so.6
#4 0x00000035d76bca83 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5 0x00000035d76bcb7e in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6 0x00000000005a4b08 in ceph::__ceph_assert_fail (assertion=0x5ca23c
"c > 0", file=<value optimized out>, line=72, func=<value optimized
out>) at common/assert.cc:30
#7 0x0000000000460080 in get (this=0x7fec78001800) at
./common/Throttle.h:72
#8 SimpleMessenger::Pipe::read_message (this=0x7fec78001800) at
msg/SimpleMessenger.cc:1751
#9 0x0000000000464265 in SimpleMessenger::Pipe::reader
(this=0x7fec78001800) at msg/SimpleMessenger.cc:1499
#10 0x00000000004552ad in SimpleMessenger::Pipe::Reader::entry
(this=<value optimized out>) at msg/SimpleMessenger.h:168
#11 0x0000000000467a3a in Thread::_entry_func (arg=<value optimized
out>) at ./common/Thread.h:39
#12 0x00000035d0607761 in start_thread () from /lib64/libpthread.so.0
#13 0x00000035d02e14dd in clone () from /lib64/libc.so.6
From what I understand probably the same check for zero size messages
done for the messenger->message_throttler.get(message_size) should be
done also for the next policy.throttler->get(message_size) or it will
trigger the assert(c > 0) in Throttle::get .
Thanks!
Regards,
Simone Gotti
P.S. Sorry but I cannot reply mails for a week as I'll be on vacation.
Signed-off-by: Simone Gotti <simone.gotti@gmail.com>
---
src/msg/SimpleMessenger.cc | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc
index a30e075..c15fa04 100644
--- a/src/msg/SimpleMessenger.cc
+++ b/src/msg/SimpleMessenger.cc
@@ -1746,9 +1746,10 @@ Message *SimpleMessenger::Pipe::read_message()
<< messenger->message_throttler.get_max() << dendl;
uint64_t message_size = header.front_len + header.middle_len
+ header.data_len;
- if (message_size)
+ if (message_size) {
messenger->message_throttler.get(message_size);
- if (policy.throttler) policy.throttler->get(message_size);
+ if (policy.throttler) policy.throttler->get(message_size);
+ }
// read front
bufferlist front;
--
1.7.0.1
next reply other threads:[~2010-06-18 13:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 13:08 Simone Gotti [this message]
2010-06-18 16:05 ` [PATCH] msgr: Fix crash in policy.throttler->get(message_size) when message_size == 0 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=4C1B6FB6.6020606@gmail.com \
--to=simone.gotti@gmail.com \
--cc=ceph-devel@vger.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 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.