All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Harper <james.harper@bendigoit.com.au>
To: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Xen blktap driver for Ceph RBD : Anybody wants to test ? :p
Date: Mon, 12 Aug 2013 23:26:00 +0000	[thread overview]
Message-ID: <6035A0D088A63A46850C3988ED045A4B638915F2__25709.1698157184$1376350117$gmane$org@BITCOM1.int.sbss.com.au> (raw)
In-Reply-To: <CAF6-1L502OZGbPHp37vWzEU3H-wsK5z904ZtS7SEUmuM-GhLyA@mail.gmail.com>

> >> > > tapdisk[9180]: segfault at 7f7e3a5c8c10 ip 00007f7e387532d4 sp
> >> > 00007f7e3a5c8c10 error 4 in libpthread-2.13.so[7f7e38748000+17000]
> >> > > tapdisk:9180 blocked for more than 120 seconds.
> >> > > tapdisk         D ffff88043fc13540     0  9180      1 0x00000000
> 
> You can try generating a core file by changing the ulimit on the running
> process
> 
> A backtrace would be useful :)
> 

I found it was actually dumping core in /, but gdb doesn't seem to work nicely and all I get is this:

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Cannot find new threads: generic error
Core was generated by `tapdisk'.
Program terminated with signal 11, Segmentation fault.
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:163
163     ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory.

Even when I attach to a running process.

One VM segfaults on startup, pretty much everytime except never when I attach strace to it, meaning it's probably a race condition and may not actually be in your code...

> 
> > Actually maybe not. What I was reading only applies for large number of
> > bytes written to the pipe, and even then I got confused by the double
> > negatives. Sorry for the noise.
> 
> Yes, as you discovered but size < PIPE_BUF, they should be atomic even
> in non-blocking mode. But I could still add assert() there to make
> sure it is.

Nah I got that completely backwards. I see now you are only passing a pointer so yes it should never be non-atomic.

> I did find a bug where it could "leak" requests which may lead to
> hang. But it shouldn't crash ...
> 
> Here's an (untested yet) patch in the rbd error path:
> 

I'll try that later this morning when I get a minute.

I've done the poor-mans-debugger thing and riddled the code with printf's but as far as I can determine every routine starts and ends. My thinking at the moment is that it's either a race (the VM's most likely to crash have multiple disks), or a buffer overflow that trips it up either immediately, or later.

I have definitely observed multiple VM's crash when something in ceph hiccup's (eg I bring a mon up or down), if that helps.

I also followed through the rbd_aio_release idea on the weekend - I can see that if the read returns failure it means the callback was never called so the release is then the responsibility of the caller.

Thanks

James

  reply	other threads:[~2013-08-12 23:26 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 15:05 Xen blktap driver for Ceph RBD : Anybody wants to test ? :p Sylvain Munaut
2013-04-18 19:35 ` Wido den Hollander
2013-04-19 14:37   ` Sylvain Munaut
2013-04-19 14:40     ` Bernard Grymonpon
2013-04-23 10:02       ` Sylvain Munaut
2013-04-23 14:56         ` Bernard Grymonpon
2013-04-23 15:06           ` Sylvain Munaut
2013-04-23 19:13             ` Bernard Grymonpon
2013-04-23 16:38         ` Nick Couchman
2013-04-23 18:51           ` Sylvain Munaut
2013-04-23 20:09             ` Nick Couchman
2013-04-26 13:07               ` Sylvain Munaut
2013-04-26 15:51                 ` Sage Weil
2013-04-26 17:10                   ` Sylvain Munaut
2013-04-19  6:45 ` Pasi Kärkkäinen
2013-04-19 14:41   ` [Xen-devel] " Sylvain Munaut
2013-11-29 11:05     ` James Harper
2013-11-29 15:11       ` Sylvain Munaut
2013-12-01  4:08         ` James Harper
2013-12-03 15:46           ` Sylvain Munaut
2013-04-19 14:41   ` Sylvain Munaut
2013-08-01  2:12   ` James Harper
2013-08-05  9:41     ` Sylvain Munaut
2013-08-05  9:41     ` [Xen-devel] " Sylvain Munaut
2013-08-05  9:45       ` James Harper
2013-08-05  9:45       ` [Xen-devel] " James Harper
2013-08-05 11:01         ` Sylvain Munaut
2013-08-05 11:01         ` [Xen-devel] " Sylvain Munaut
2013-08-05 11:03           ` James Harper
2013-08-05 11:03           ` James Harper
2013-08-05 11:12           ` Pasi Kärkkäinen
2013-08-05 12:03             ` [Xen-devel] " Sylvain Munaut
2013-08-05 13:35               ` George Dunlap
2013-08-05 13:55                 ` Sylvain Munaut
2013-08-05 14:04                   ` George Dunlap
2013-08-05 15:18                     ` Wei Liu
2013-08-05 15:20                       ` George Dunlap
2013-08-05 15:32                         ` Wei Liu
2013-08-05 15:32                         ` [Xen-devel] " Wei Liu
2013-08-05 15:20                       ` George Dunlap
2013-08-05 15:18                     ` Wei Liu
2013-08-05 14:04                   ` George Dunlap
2013-08-05 13:55                 ` Sylvain Munaut
2013-08-05 13:35               ` George Dunlap
2013-08-05 12:03             ` Sylvain Munaut
2013-08-09  0:12       ` [Xen-devel] " James Harper
2013-08-09  9:21         ` Sylvain Munaut
2013-08-09  9:21         ` [Xen-devel] " Sylvain Munaut
2013-08-11  0:51           ` James Harper
2013-08-11  1:02             ` James Harper
2013-08-11  1:02             ` [Xen-devel] " James Harper
2013-08-12 14:13               ` Sylvain Munaut
2013-08-12 23:26                 ` James Harper [this message]
2013-08-12 23:26                 ` James Harper
2013-08-13  0:39                 ` James Harper
2013-08-13  8:32                   ` Sylvain Munaut
2013-08-13  8:32                   ` [Xen-devel] " Sylvain Munaut
2013-08-13  9:12                     ` James Harper
2013-08-13  9:20                       ` Sylvain Munaut
2013-08-13 14:59                         ` Frederik Thuysbaert
2013-08-13 14:59                         ` [Xen-devel] " Frederik Thuysbaert
     [not found]                         ` <520A4945.1030907@gmail.com>
2013-08-13 15:39                           ` Sylvain Munaut
2013-08-13 23:39                             ` James Harper
2013-08-13 23:43                               ` Sylvain Munaut
2013-08-13 23:43                               ` [Xen-devel] " Sylvain Munaut
2013-08-13 23:51                                 ` James Harper
2013-08-13 23:59                                   ` James Harper
2013-08-13 23:59                                   ` [Xen-devel] " James Harper
2013-08-14 13:13                                     ` Sylvain Munaut
2013-08-14 13:13                                     ` [Xen-devel] " Sylvain Munaut
2013-08-14 13:16                                       ` James Harper
2013-08-14 13:16                                       ` [Xen-devel] " James Harper
2013-08-15  7:20                                       ` James Harper
2013-08-15  7:20                                       ` [Xen-devel] " James Harper
2013-08-16  1:02                                       ` James Harper
2013-08-16  1:02                                       ` [Xen-devel] " James Harper
2013-08-13 23:51                                 ` James Harper
2013-08-13 23:39                             ` James Harper
2013-08-14  8:43                             ` Frederik Thuysbaert
2013-08-14  8:43                             ` [Xen-devel] " Frederik Thuysbaert
2013-08-14 15:03                               ` Sylvain Munaut
2013-08-14 15:03                               ` [Xen-devel] " Sylvain Munaut
2013-08-16  8:27                                 ` Frederik Thuysbaert
2013-08-16  8:27                                 ` Frederik Thuysbaert
2013-08-14  8:47                             ` Frederik Thuysbaert
2013-08-14  8:47                             ` [Xen-devel] " Frederik Thuysbaert
2013-08-13 15:39                           ` Sylvain Munaut
2013-08-13 21:47                         ` James Harper
2013-08-13 21:47                         ` [Xen-devel] " James Harper
2013-08-13  9:20                       ` Sylvain Munaut
2013-08-13  9:12                     ` James Harper
2013-08-13  0:39                 ` James Harper
2013-08-12 14:13               ` Sylvain Munaut
2013-08-11  0:51           ` James Harper
2013-08-09  0:12       ` James Harper
  -- strict thread matches above, loose matches on Subject: below --
2013-04-18 15:05 Sylvain Munaut

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='6035A0D088A63A46850C3988ED045A4B638915F2__25709.1698157184$1376350117$gmane$org@BITCOM1.int.sbss.com.au' \
    --to=james.harper@bendigoit.com.au \
    --cc=ceph-devel@vger.kernel.org \
    --cc=s.munaut@whatever-company.com \
    --cc=xen-devel@lists.xen.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.