All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Chris Worley <worleys@gmail.com>, fio@vger.kernel.org
Subject: Re: client/server mode fails with Assertion `client->eta_in_flight = eta' failed
Date: Tue, 13 Sep 2016 09:04:50 -0600	[thread overview]
Message-ID: <43640b9a-b49c-eee8-ef6a-66333a649930@kernel.dk> (raw)
In-Reply-To: <CANWz5fhXDTu=zKLtHuoecVWcMzvditqs6AqHK-Y-RfsJscJ=GA@mail.gmail.com>

On 08/30/2016 09:28 AM, Chris Worley wrote:
> Was there ever a solution?  I'm seeing this a lot on v2.9.

Chris/Srinivasa, can you try the below patch? Looks like we're racing
sometimes on the ETA command. And if we don't find a reply tag, we
already decremented the ETA count, so we should just ignore it.

diff --git a/client.c b/client.c
index 3456665009b8..c8069a0159ac 100644
--- a/client.c
+++ b/client.c
@@ -1183,7 +1183,7 @@ void fio_client_sum_jobs_eta(struct jobs_eta *dst, 
struct jobs_eta *je)
  	strcpy((char *) dst->run_str, (char *) je->run_str);
  }

-static void remove_reply_cmd(struct fio_client *client, struct 
fio_net_cmd *cmd)
+static bool remove_reply_cmd(struct fio_client *client, struct 
fio_net_cmd *cmd)
  {
  	struct fio_net_cmd_reply *reply = NULL;
  	struct flist_head *entry;
@@ -1199,12 +1199,13 @@ static void remove_reply_cmd(struct fio_client 
*client, struct fio_net_cmd *cmd)

  	if (!reply) {
  		log_err("fio: client: unable to find matching tag (%llx)\n", 
(unsigned long long) cmd->tag);
-		return;
+		return false;
  	}

  	flist_del(&reply->list);
  	cmd->tag = reply->saved_tag;
  	free(reply);
+	return true;
  }

  int fio_client_wait_for_reply(struct fio_client *client, uint64_t tag)
@@ -1653,7 +1654,8 @@ int fio_handle_client(struct fio_client *client)
  	case FIO_NET_CMD_ETA: {
  		struct jobs_eta *je = (struct jobs_eta *) cmd->payload;

-		remove_reply_cmd(client, cmd);
+		if (!remove_reply_cmd(client, cmd))
+			break;
  		convert_jobs_eta(je);
  		handle_eta(client, cmd);
  		break;

-- 
Jens Axboe



  reply	other threads:[~2016-09-13 15:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16  8:19 client/server mode fails with Assertion `client->eta_in_flight = eta' failed Srinivasa Chamarthy
2016-02-17 20:28 ` Jens Axboe
2016-02-18  4:30   ` Srinivasa Chamarthy
2016-08-30 15:28     ` Chris Worley
2016-09-13 15:04       ` Jens Axboe [this message]
2016-09-13 15:09         ` Jens Axboe
2016-09-14  9:25           ` Srinivasa Chamarthy

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=43640b9a-b49c-eee8-ef6a-66333a649930@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=worleys@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.