CEPH filesystem development
 help / color / mirror / Atom feed
From: Andreas Bluemle <andreas.bluemle@itxperts.de>
To: Matthew Anderson <manderson8787@gmail.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: [ceph-users] Help needed porting Ceph to RSockets
Date: Tue, 13 Aug 2013 07:53:12 +0200	[thread overview]
Message-ID: <20130813075312.7cac0d46@andylap> (raw)
In-Reply-To: <CAJA05U=KqzYis14sYXusbpk-T-F=uqvNz1XPurutmdeRz6BAdg@mail.gmail.com>

Hi Matthew,

I can confirm the beahviour whichi you describe.
I too believe that the problem is on the client side (ceph command).
My log files show the very same symptom, i.e. the client side
not being able to shutdown the pipes properly.

(Q: I had problems yesterday to send a mail to ceph-users list
with the log files attached to it because of the size of 
the attachments exceeding some limit; I hadnÄt been subscribed
to the list at that point. Is the uses of pastebin.com the better
way to provide such lengthy information in general?


Best Regards

Andreas Bluemle

On Tue, 13 Aug 2013 11:59:36 +0800
Matthew Anderson <manderson8787@gmail.com> wrote:

> Moving this conversation to ceph-devel where the dev's might be able
> to shed some light on this.
> 
> I've added some additional debug to my code to narrow the issue down
> a bit and the reader thread appears to be getting locked by
> tcp_read_wait() because rpoll never returns an event when the socket
> is shutdown. A hack way of proving this was to lower the timeout in
> rpoll to 5 seconds. When command like 'ceph osd tree' completes you
> can see it block for 5 seconds until rpoll times out and returns 0.
> The reader thread is then able to join and the pipe can be reaped.
> 
> Ceph log is here - http://pastebin.com/rHK4vYLZ
> Mon log is here - http://pastebin.com/WyAJEw0m
> 
> What's particularly weird is that the monitor receives a POLLHUP
> event when the ceph command shuts down it's socket but the ceph
> command never does. When using regular sockets both sides of the
> connection receive a POLLIN | POLLHUP | POLRDHUP event when the
> sockets are shut down. It would seem like there is a bug in rsockets
> that causes the side that calls shutdown first not to receive the
> correct rpoll events.
> 
> Can anyone comment on whether the above seems right?
> 
> Thanks all
> -Matt
> 
> 
> On Tue, Aug 13, 2013 at 12:06 AM, Andreas Bluemle <
> andreas.bluemle@itxperts.de> wrote:
> 
> > Hi Matthew,
> >
> > I am not quite sure about the POLLRDHUP.
> > On the server side (ceph-mon), tcp_read_wait does see the
> > POLLHUP - which should be the indicator that the
> > the other side is shutting down.
> >
> > I have also taken a brief look at the client side (ceph mon stat).
> > It initiates a shutdown - but never finishes. See attached log file
> > from "ceph --log-file ceph-mon-stat.rsockets --debug-ms 30 mon
> > stat". I have also attached the corresponding log file for regualr
> > TCP/IP sockets.
> >
> > It looks to me that in the rsockets case, the reaper is able to
> > cleanup even though there is still sth. left to do - and hence the
> > shutdown never completes.
> >
> >
> > Best Regards
> >
> > Andreas Bluemle
> >
> >
> > On Mon, 12 Aug 2013 15:11:47 +0800
> > Matthew Anderson <manderson8787@gmail.com> wrote:
> >
> > > Hi Andreas,
> > >
> > > I think we're both working on the same thing, I've just changed
> > > the function calls over to rsockets in the source instead of
> > > using the pre-load library. It explains why we're having the
> > > exact same problem!
> > >
> > > From what I've been able to tell the entire problem revolves
> > > around rsockets not supporting POLLRDHUP. As far as I can tell
> > > the pipe will only be removed when tcp_read_wait returns -1. With
> > > rsockets it never receives the POLLRDHUP event after
> > > shutdown_socket() is called so the rpoll call blocks until
> > > timeout (900 seconds) and the pipe stays active.
> > >
> > > The question then would be how can we destroy a pipe without
> > > relying on POLLRDHUP? shutdown_socket() always gets called when
> > > the socket should be closed so could there might be a way to trick
> > > tcp_read_wait() into returning -1 by doing somethere in
> > > shutdown_socket() but I'm not sure how to go about it.
> > >
> > > Any ideas?
> > >
> >



-- 
Andreas Bluemle                     mailto:Andreas.Bluemle@itxperts.de
Heinrich Boell Strasse 88           Phone: (+49) 89 4317582
D-81829 Muenchen (Germany)          Mobil: (+49) 177 522 0151
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-08-13  5:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJA05UmTDGze7S50_j8RgHmPFYonk2Z94Fi6CQtxND9QxgRr3g@mail.gmail.com>
     [not found] ` <CAJA05Umgio7XftGZtQdRzyWq70pXBb3oEx2jrT3BxcBr6MLoVQ@mail.gmail.com>
2013-08-09 17:08   ` Help needed porting Ceph to RSockets Kasper Dieter
     [not found]   ` <20130812075513.43c338e1@andylap>
     [not found]     ` <CAJA05U=i22jHy2xbvCUk+UVN0+hOFDgt-JMSHTWKmr1+DZu0Dg@mail.gmail.com>
     [not found]       ` <20130812180644.447ca089@andylap>
     [not found]         ` <CAJA05U=KqzYis14sYXusbpk-T-F=uqvNz1XPurutmdeRz6BAdg@mail.gmail.com>
2013-08-13  4:27           ` [ceph-users] " Matthew Anderson
2013-08-13  5:53           ` Andreas Bluemle [this message]
2013-08-13 14:06             ` Andreas Bluemle
2013-08-13 14:35               ` Atchley, Scott
     [not found]                 ` <1978D1F9-C675-4A37-AA57-C7E1158B2F72-1Heg1YXhbW8@public.gmane.org>
2013-08-13 21:44                   ` Hefty, Sean
2013-08-14  7:21                     ` Andreas Bluemle
2013-08-14 13:05                       ` Atchley, Scott
2013-08-14 17:04                       ` Hefty, Sean
2013-08-17  0:07                       ` Hefty, Sean
2013-08-19 17:10                       ` Hefty, Sean
2013-08-20  7:21                         ` Andreas Bluemle
2013-08-20 10:30                           ` Andreas Bluemle
2013-08-20 15:04                             ` Hefty, Sean
     [not found]                               ` <1828884A29C6694DAF28B7E6B8A8237388CA6F25-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-08-21 11:44                                 ` Matthew Anderson
2013-08-23  0:35 Hefty, Sean
2013-09-10 13:48 ` Andreas Bluemle
2013-09-12 10:20   ` Gandalf Corvotempesta
     [not found]     ` <CAJH6TXg94x+jcc=1MQQoQaF5JcGKuxbG_SzLEMt3EVQOrFeNjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-12 12:12       ` Andreas Bluemle
2013-09-16 13:29         ` Gandalf Corvotempesta
2013-09-20 23:47   ` Hefty, Sean
2013-10-30 23:25   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A8237388CF3072-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-02-05 13:58       ` Gandalf Corvotempesta

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=20130813075312.7cac0d46@andylap \
    --to=andreas.bluemle@itxperts.de \
    --cc=ceph-devel@vger.kernel.org \
    --cc=manderson8787@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox