From: Martin Wilck <mwilck@suse.com>
To: Benjamin Marzinski <bmarzins@redhat.com>,
device-mapper development <dm-devel@redhat.com>
Cc: Guan Junxiong <guanjunxiong@huawei.com>
Subject: Re: [PATCH 12/12] multipathd: marginal path code fixes
Date: Thu, 07 Dec 2017 23:15:16 +0100 [thread overview]
Message-ID: <1512684916.22250.10.camel@suse.com> (raw)
In-Reply-To: <1512672546-12785-13-git-send-email-bmarzins@redhat.com>
On Thu, 2017-12-07 at 12:49 -0600, Benjamin Marzinski wrote:
> There are a couple of issues I noticed with the marginal paths code.
>
> In hit_io_err_recheck_time() there are some problems with the initial
> checks. We should always recover the path if there are no other
> usable
> paths to the device, so this check should be first. Also, we just
> checked that io_err_disable_reinstate isn't zero before calling this
> function, so we don't need to check again here (and it doesn't make
> any
> sense to continue disabling the path if io_err_disable_reinstate is
> set
> to zero). Finally, the only kind of errors we can get while calling
> clock_gettime() are going to happen on every call. So, if we can't
> get
> the time, assume that the timeout has passed.
>
> The multipath.conf.5 description of marginal_path_err_sample_time,
> states that sampling is stopped for marginal_path_err_rate_threshold
> seconds, when it should be marginal_path_err_recheck_gap_time
> seconds.
>
> Lastly, there is a race that can cause multipathd to access freed
> memory
> on shutdown. io_err_stat_thr is started as a detached thread. This
> means
> that stop_io_err_stat_thread() can't know when it has actually
> stopped,
> after pthread_cancel() and pthread_kill() are called. To be safe, it
> should not start the thread in a deteched state, and call join to
> verify
> that it has stopped before freeing the memory it uses. But more
> importantly, stop_io_err_stat_thread() was being called before the
> checker and uevent threads were being canceled. Both of these threads
> access data that is freed in stop_io_err_stat_thread(). To avoid the
> chance of these threads accessing freed memory, child() should wait
> until these threads are stopped before calling
> stop_io_err_stat_thread().
>
> Cc: Guan Junxiong <guanjunxiong@huawei.com>
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
Reviewed-by: Martin Wilck <mwilck@suse.com>
--
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2017-12-07 22:15 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 18:48 [PATCH 00/12] Misc fixes Benjamin Marzinski
2017-12-07 18:48 ` [PATCH 01/12] multipath: add "ghost_delay" parameter Benjamin Marzinski
2017-12-07 22:08 ` Martin Wilck
2017-12-07 18:48 ` [PATCH 02/12] kpartx: don't delete partitions from partitions Benjamin Marzinski
2017-12-07 22:09 ` Martin Wilck
2017-12-07 18:48 ` [PATCH 03/12] multipath: fix hwhandler check in select_action Benjamin Marzinski
2017-12-07 22:09 ` Martin Wilck
2017-12-07 18:48 ` [PATCH 04/12] libmultipath: cleanup features handling code Benjamin Marzinski
2017-12-07 22:10 ` Martin Wilck
2017-12-08 15:24 ` Martin Wilck
2017-12-08 21:12 ` Benjamin Marzinski
2017-12-07 18:48 ` [PATCH 05/12] multipathd: move helper functions to libmultipath Benjamin Marzinski
2017-12-07 22:11 ` Martin Wilck
2017-12-07 18:49 ` [PATCH 06/12] multipathd: fix device creation issues Benjamin Marzinski
2017-12-08 17:26 ` Martin Wilck
2018-01-30 16:51 ` Martin Wilck
2018-01-30 18:34 ` Benjamin Marzinski
2018-01-30 19:02 ` Martin Wilck
2017-12-07 18:49 ` [PATCH 07/12] multipathd: remove select_* from setup_multipath Benjamin Marzinski
2017-12-08 20:08 ` Martin Wilck
2017-12-07 18:49 ` [PATCH 08/12] libmultipath: __setup_multipath param cleanup Benjamin Marzinski
2017-12-08 20:13 ` Martin Wilck
2017-12-07 18:49 ` [PATCH 09/12] multipathd: move recovery mode code to function Benjamin Marzinski
2017-12-07 22:13 ` Martin Wilck
2017-12-07 18:49 ` [PATCH 10/12] multipathd: clean up set_no_path_retry Benjamin Marzinski
2017-12-07 22:14 ` Martin Wilck
2017-12-07 18:49 ` [PATCH 11/12] multipath: check failed path dmstate in check_path Benjamin Marzinski
2017-12-07 22:14 ` Martin Wilck
2017-12-07 18:49 ` [PATCH 12/12] multipathd: marginal path code fixes Benjamin Marzinski
2017-12-07 22:15 ` Martin Wilck [this message]
2018-01-13 9:19 ` [PATCH 00/12] Misc fixes Christophe Varoqui
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=1512684916.22250.10.camel@suse.com \
--to=mwilck@suse.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=guanjunxiong@huawei.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 NNTP newsgroup(s).