cmogstored dev/user discussion/issues/patches/etc
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Xiao Yu <xyu@automattic.com>, Arkadi Colson <arkadi@smartbit.be>
Cc: cmogstored-public@yhbt.net
Subject: Re: Segfaults on http_close?
Date: Sun, 17 Jan 2021 09:51:09 +0000	[thread overview]
Message-ID: <20210117095109.GA28219@dcvr> (raw)
In-Reply-To: <20210111212621.GA12555@dcvr>

Eric Wong <e@80x24.org> wrote:
> Xiao Yu <xyu@automattic.com> wrote:
> > Howdy, we are running a 96 node cmogstored cluster and have noticed
> > that when the cluster is busy with lots of writes we occasionally get
> > segfaults in cmogstored. This has happened 7 times in the past week
> > each time on a random and different cmogstored node. Looking at the
> > abrt backtrace of the core dump shows something similar to the
> > following in each instance:
> 
> Thanks for the bug report, sorry this caused you trouble
> and I wonder if this is the same issue Arkadi was hitting
> last year...

Hi Xiao and Arkadi: Can either of you try the 1-line patch
below to disable pthread_attr_setstacksize?

I took another look at the code and couldn't find any other
culprits... (though I admit I'm not mentally as sharp given
pandemic-induced stress and anxiety :<).

Given the mysterious nature of this problem and my inability to
reproduce it; I wonder if there's stack corruption with certain
compilers/glibc happening and blowing past the 4K guard page...

@Arkadi: Xiao recently brought up this (or similar) issue again:
  https://yhbt.net/cmogstored-public/20210111212621.GA12555@dcvr/T/

diff --git a/thrpool.c b/thrpool.c
index bc67ea0..bd71f95 100644
--- a/thrpool.c
+++ b/thrpool.c
@@ -141,7 +141,7 @@ thrpool_add(struct mog_thrpool *tp, unsigned size, unsigned long *nr_eagain)
 
 	CHECK(int, 0, pthread_attr_init(&attr));
 
-	if (stacksize > 0)
+	if (0 && stacksize > 0)
 		CHECK(int, 0, pthread_attr_setstacksize(&attr, stacksize));
 
 	thr = &tp->threads[tp->n_threads].thr;



In retrospect, running a small stack is unnecessary on 64-bit
systems due to practically unlimited virtual address space and
lazy allocation.  It may still make sense for 32-bit (some
embedded systems), though they can set RLIMIT_STACK before
launching.

  reply	other threads:[~2021-01-17  9:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 20:48 Segfaults on http_close? Xiao Yu
2021-01-11 21:26 ` Eric Wong
2021-01-17  9:51   ` Eric Wong [this message]
2021-01-20  5:21     ` Xiao Yu
2021-01-20  8:57       ` Eric Wong
2021-01-20 21:13         ` Xiao Yu
2021-01-20 21:22           ` Eric Wong
2021-01-25 17:36             ` Xiao Yu
2021-01-25 17:47               ` Eric Wong
2021-01-25 19:27                 ` Xiao Yu
2021-02-12  6:54                   ` Eric Wong
2021-02-12 21:18                     ` Xiao Yu
2021-02-13  2:19                       ` Eric Wong

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

  List information: https://yhbt.net/cmogstored/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210117095109.GA28219@dcvr \
    --to=e@80x24.org \
    --cc=arkadi@smartbit.be \
    --cc=cmogstored-public@yhbt.net \
    --cc=xyu@automattic.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.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/cmogstored.git/

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).