All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem Jan Withagen <wjw@digiware.nl>
To: Ceph Development <ceph-devel@vger.kernel.org>
Subject: Hard to debug problem with ceph_erasure_code
Date: Thu, 31 Mar 2016 19:10:45 +0200	[thread overview]
Message-ID: <56FD5A15.1080507@digiware.nl> (raw)

Hi,

I have this problem that testing ceph_erasure_code sometimes crashes in:

	ceph_erasure_code --debug-osd 20 --plugin_exists jerasure

If I just run this in a while loop on the command line then it crashes 
only once every few hundert runs.
Running it in the testset it crashes just about every time.

The crash from the core is an invalid point in the assertion code I 
added to log/Entry.h

#7  0x000000000077984d in ceph::log::Entry::hint_size (this=0x80405cf00) 
at log/Entry.h:70
70            assert( *m_exp_len != -1 );
(gdb) l
65        }
66
67        // function improves estimate for expected size of message
68        void hint_size() {
69          if (m_exp_len != NULL) {
70            assert( *m_exp_len != -1 );
71            assert( 0 <= *m_exp_len );
72            assert( *m_exp_len <= 100000 );
73            size_t size = m_streambuf.size();
74            if (size > __atomic_load_n(m_exp_len, __ATOMIC_RELAXED)) {
(gdb) p m_exp_len
$1 = (size_t *) 0x8045ec5c0
(gdb) p &m_exp_len
$2 = (size_t **) 0x80405cf90

the address in m_exp_len 0x8045ec5c0 is outside of the heap, and gives 
an illegal access.
And thus the program gets a SIGSEGV

Now my problem is that I can run this under gdb and watch the memory. 
But that rarely goes wrong.
Running it from 'make recheck' goes wrong just about every time but it 
will be hard to run that
trhu gdb and actually catch the code that is writting the illegal 
address into m_exp_len.

Does anybody have suggestions as how to track/debug this?

Thanx,
--WjW

             reply	other threads:[~2016-03-31 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 17:10 Willem Jan Withagen [this message]
2016-04-01  5:12 ` Hard to debug problem with ceph_erasure_code Mykola Golub
2016-04-01  9:34   ` Willem Jan Withagen
2016-04-01 12:22     ` Willem Jan Withagen

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=56FD5A15.1080507@digiware.nl \
    --to=wjw@digiware.nl \
    --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.