Client/Server and output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been having problems with the client/server mode of fio where
occasionally I will get CRC errors or packet mismatches.

I think the source of the problem is that the file descriptor for the
socket is 1 or 2 and something is writing to stdout or stderr.  After
I cleaned up some problems with my plugin the problem seems to have
gone away.

It looks like there are a few places where this can happen:

In fio.h fio_assert writes to stderr ... Maybe this should use f_err?

The debug malloc also writes to stderr if it detects memory corruption...

Also in  json_object_add_client_info, if no hostname is specified,
client->hostname is NULL so we'll dump core...

iff --git a/client.c b/client.c
index 1f52734..78a957e 100644
--- a/client.c
+++ b/client.c
@@ -825,7 +825,8 @@ static void convert_gs(struct group_run_stats
*dst, struct group_run_stats *src)
 static void json_object_add_client_info(struct json_object *obj,
 struct fio_client *client)
 {
-       json_object_add_value_string(obj, "hostname", client->hostname);
+       const char *hostname = client->hostname ? client->hostname : "";
+       json_object_add_value_string(obj, "hostname", hostname);
        json_object_add_value_int(obj, "port", client->port);
 }
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux