Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: jonathan.rajotte-julien@efficios.com (Jonathan Rajotte)
Subject: [lttng-dev] [RFC PATCH v2 00/13] Sessiond teardown overhaul
Date: Mon, 18 Sep 2017 18:51:53 -0400	[thread overview]
Message-ID: <20170918225206.17725-1-jonathan.rajotte-julien@efficios.com> (raw)

Hi,

This series objective is to review how the sessiond teardown is conducted. This is
the result of stress testing the teardown code path using [1] and the discussion
following previous proposed fixes [2][3].

The main problematic is that applications could hang on
application-initiated communication via the notify socket. This would end up
causing multiple deadlock scenarios where sessiond would wait on communications
for an already stuck application. This is caused by the absence of certain
threads at the moment the application is communicating and data handling race
during the teardown. I propose to impose a teardown order for thread to prevent
such issue.

The teardown mechanisms were revolving around the use of the
thread_quit_pipe. Most thread would listen on this pipe for the go signal of
termination. This result is a non-deterministic teardown code path and result in
scenarios quite hard to reproduce.

This series mostly introduce specialized quit pipes offering better control
over the lifetime of important/interdependent(data-wise) threads.

It also includes fixes to problems found along the way.

[1] https://github.com/PSRCode/lttng-stress
[2] https://lists.lttng.org/pipermail/lttng-dev/2017-August/027366.html
[3] https://lists.lttng.org/pipermail/lttng-dev/2017-August/027365.html




             reply	other threads:[~2017-09-18 22:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 22:51 Jonathan Rajotte [this message]
2017-09-18 22:51 ` [lttng-dev] [RFC PATCH v2 01/13] Extend health thread lifetime Jonathan Rajotte
2017-09-18 22:51 ` [lttng-dev] [RFC PATCH v2 02/13] Reorder pthread_join for easier ordering later on Jonathan Rajotte
2017-09-18 22:51 ` [lttng-dev] [RFC PATCH v2 03/13] Terminate dispatch thread after reg_apps_thread is terminated Jonathan Rajotte
2017-09-18 22:51 ` [lttng-dev] [RFC PATCH v2 04/13] Order termination of thread_manage_apps after dispatch_thread Jonathan Rajotte
2017-09-18 22:51 ` [lttng-dev] [RFC PATCH v2 05/13] Control thread_apps_notify lifetime with specialized quit pipe Jonathan Rajotte
2017-09-18 22:51 ` [lttng-dev] [RFC PATCH v2 06/13] Fix: unregister app notify socket on sessiond tear down Jonathan Rajotte
2017-09-18 22:52 ` [lttng-dev] [RFC PATCH v2 07/13] Always reply to an inquiring app Jonathan Rajotte
2017-09-18 22:52 ` [lttng-dev] [RFC PATCH v2 08/13] Fix: perform lookup then test for condition Jonathan Rajotte
2017-09-18 22:52 ` [lttng-dev] [RFC PATCH v2 09/13] Perform ust_app_unregister on thread_manage_apps teardown Jonathan Rajotte
2017-09-18 22:52 ` [lttng-dev] [RFC PATCH v2 10/13] Teardown apps_notify_thread before thread_manage_apps Jonathan Rajotte
2017-09-18 22:52 ` [lttng-dev] [RFC PATCH v2 11/13] Comments update Jonathan Rajotte
2017-09-18 22:52 ` [lttng-dev] [RFC PATCH v2 12/13] Fix: delay termination on consumerd to allow metadata flushing Jonathan Rajotte
2017-09-18 22:52 ` [lttng-dev] [RFC PATCH v2 13/13] Fix: quit early if instructed to Jonathan Rajotte

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=20170918225206.17725-1-jonathan.rajotte-julien@efficios.com \
    --to=jonathan.rajotte-julien@efficios.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