hail-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Project Hail List <hail-devel@vger.kernel.org>,
	Jeff Darcy <jdarcy@redhat.com>
Subject: Re: [Patch 2/7] tabled: fix the endless recusion when reading long objects
Date: Tue, 06 Apr 2010 13:02:10 -0400	[thread overview]
Message-ID: <4BBB6912.3030706@garzik.org> (raw)
In-Reply-To: <20100401195116.32142697@redhat.com>

On 04/01/2010 09:51 PM, Pete Zaitcev wrote:
> At certain network and disk speeds, tabled can blow its stack by
> filling it with (essentially) endless recursion:
>
> #2  0x000000000040c077 in cli_write_free (cli=<value optimized out>, tmp=
>      0x7bb910, done=<value optimized out>) at server.c:397
> #3  0x000000000040ca55 in cli_writable (cli=0x686e90) at server.c:525
> #4  0x000000000040da65 in cli_write_start (cli=0x686e90) at server.c:561
> #5  0x0000000000408ad5 in object_get_poke (cli=0x686e90) at object.c:1039
> #6  0x000000000040c077 in cli_write_free (cli=<value optimized out>, tmp=
>      0x7bb8d0, done=<value optimized out>) at server.c:397
> #7  0x000000000040ca55 in cli_writable (cli=0x686e90) at server.c:525
> #8  0x000000000040da65 in cli_write_start (cli=0x686e90) at server.c:561
> #9  0x0000000000408ad5 in object_get_poke (cli=0x686e90) at object.c:1039
> #10 0x000000000040c077 in cli_write_free (cli=<value optimized out>, tmp=
>      0x7bb890, done=<value optimized out>) at server.c:397
>
> The fix is to deliver callbacks only from the top level.
>
> Callbacks must be delivered every time a send is completed,
> which amounts to every call to is_writeable(). Since there
> is a large number of callers to it, we found it advantageous
> to run callbacks from every source of events. In other words,
> every function that is passed to event_set must invoke
> cli_write_run_compl. Mind that storage.c contains calls to
> event_set.
>
> Signed-off-by: Pete Zaitcev<zaitcev@redhat.com>
>
> ---
>   server/object.c |    4 +++
>   server/server.c |   52 +++++++++++++++++++++++++++++++++++-----------
>   server/tabled.h |    6 +++++
>   3 files changed, 50 insertions(+), 12 deletions(-)

applied 2-7


      reply	other threads:[~2010-04-06 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02  1:51 [Patch 2/7] tabled: fix the endless recusion when reading long objects Pete Zaitcev
2010-04-06 17:02 ` Jeff Garzik [this message]

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=4BBB6912.3030706@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=jdarcy@redhat.com \
    --cc=zaitcev@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).