From: Dave Jones <davej@redhat.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: trinity@vger.kernel.org
Subject: Re: Fwd: Trinity 1.4 tarball release.
Date: Tue, 13 May 2014 10:00:06 -0400 [thread overview]
Message-ID: <20140513140006.GA32674@redhat.com> (raw)
In-Reply-To: <1399963428.2395.2.camel@concordia>
On Tue, May 13, 2014 at 04:43:48PM +1000, Michael Ellerman wrote:
> I'm consistently ending up with a watchdog that is spinning using 100% cpu.
>
> We are bailing out of __check_main() before clearing shm->mainpid because we
> see that we are already exiting.
>
> if (ret == -1) {
> /* Are we already exiting ? */
> if (shm->exit_reason != STILL_RUNNING)
> return FALSE;
>
> /* No. Check what happened. */
> if (errno == ESRCH) {
>
>
> 161 if (shm->exit_reason != STILL_RUNNING)
> (gdb) print shm->exit_reason
> $6 = EXIT_FORK_FAILURE
>
> It looks like the only other place shm->mainpid is written is in
> trinity.c:main(), which is dead. So we are stuck forever as far as I can tell.
Argh. I hit this exactly once a few weeks back, and thought I had fixed it.
> The last thing in trinity.log is:
>
> [main] couldn't create child! (Cannot allocate memory)
>
> >From main.c:69:
>
> output(0, "couldn't create child! (%s)\n", strerror(errn o));
> shm->exit_reason = EXIT_FORK_FAILURE;
> exit(EXIT_FAILURE);
>
>
> So we exited directly and didn't let the code in main() clear shm->mainpid.
>
> Not sure what the correct fix is.
I think just clearing mainpid before we call exit is the right thing to
do here. I'll audit all the other exit() calls too, as this might be a
problem in other paths.
> We could drop the check of shm->exit_reason
> in __check_main(), but presumably that is there for a good reason.
It's mostly cosmetic. It would previously end up in that path on a
successful exit, and then complain that main had "disappeared".
Dave
next prev parent reply other threads:[~2014-05-13 14:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 17:43 Fwd: Trinity 1.4 tarball release Dave Jones
2014-05-13 6:43 ` Michael Ellerman
2014-05-13 14:00 ` Dave Jones [this message]
2014-05-14 7:26 ` Michael Ellerman
2014-05-14 13:35 ` Dave Jones
2014-05-22 2:40 ` Michael Ellerman
2014-05-22 3:40 ` Dave Jones
2014-05-22 3:43 ` Michael Ellerman
2014-05-22 3:41 ` Michael Ellerman
2014-05-22 3:50 ` Dave Jones
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=20140513140006.GA32674@redhat.com \
--to=davej@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=trinity@vger.kernel.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 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 NNTP newsgroup(s).