cmogstored dev/user discussion/issues/patches/etc
 help / color / mirror / code / Atom feed
From: Xiao Yu <xyu@automattic.com>
To: Eric Wong <e@80x24.org>
Cc: Xiao Yu <xyu@automattic.com>, Arkadi Colson <arkadi@smartbit.be>,
	cmogstored-public@yhbt.net
Subject: Re: Segfaults on http_close?
Date: Wed, 20 Jan 2021 21:13:05 +0000	[thread overview]
Message-ID: <CABfxMcVhLa5PPUAn8hHTekTnvJytSqYcawXxn4D+uefS5edBFQ@mail.gmail.com> (raw)
In-Reply-To: <20210120085745.GB29704@dcvr>

On Wed, Jan 20, 2021 at 8:57 AM Eric Wong <e@80x24.org> wrote:
>
> Xiao Yu <xyu@automattic.com> wrote:
> > Thanks for the quick response! Sorry about the delay but I ran into a
> > couple issues (sorry kinda learning gdb and compiling binaries in
> > general on the go here) and have not been able to capture more useful
> > logs yet as crashes have seem to have slowed / stopped since
> > recompiling and reloading. For the record I recompiled cmogstored with
> > the newer RH `devtoolset-9-toolchain` (9.1) and it has not crash
> > since.
>
> No worries.  Based on the toolchain change being a success, I
> more strongly suspect the tiny patch I sent you guys will fix
> the problem with all compilers.

That's good to know, would it help if I applied the patch and then
compiled with the older compiler to check?

> > Also sorry about the lack of useful logs in my initial message but
> > neither kernel logs nor messages contained anything interesting around
> > the segfaults. Making matters worse, we didn't consistently reload
> > cmogstored as various versions of the compiled binary was installed
> > across the cluster and didn't really save the debugging symbols from
> > each of the compilations so can't really reply with a more useful
> > stack trace with the current core dumps.
>
> That's fine.  One thing is I suggest is NOT using --daemonize/-d
> flag and instead rely on systemd or something similar that can
> capture stderr.
>
> The --daemonize/-d flag (unfortunately) matches Perlbal
> mogstored behavior, which causes stderr to be unconditionally
> redirected to /dev/null and hides some errors.

I noticed the lack of verbosity / logs :) so right now we're running
daemonized but also using syslog to capture logs, it's still pretty
quiet overall with nothing around when the segfaults happened and
pretty much only logs about premature EOFs when timeouts happen and
things like the following when we reload cmogstored:

```
2021-01-14T15:04:15.888261-05:00 host cmogstored[44351]: upgrade
spawned PID:27575
2021-01-14T15:04:15.891551-05:00 host cmogstored[27575]: inherited
0.0.0.0:7501 on fd=4
2021-01-14T15:04:15.891564-05:00 host cmogstored[27575]: inherited
0.0.0.0:7500 on fd=5
```

Would non-daemonized mode and capturing stderr provide more verbosity?

Thanks again, Xiao

  reply	other threads:[~2021-01-20 21:13 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
2021-01-20  5:21     ` Xiao Yu
2021-01-20  8:57       ` Eric Wong
2021-01-20 21:13         ` Xiao Yu [this message]
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=CABfxMcVhLa5PPUAn8hHTekTnvJytSqYcawXxn4D+uefS5edBFQ@mail.gmail.com \
    --to=xyu@automattic.com \
    --cc=arkadi@smartbit.be \
    --cc=cmogstored-public@yhbt.net \
    --cc=e@80x24.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.
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).