X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=58b8080b56dff398d82e7262257e770682f1afcc;hb=9e794c1115c765ab8481c5666cfaddf5962a8974;hp=cb3a2747b131c614572378e40ac0f597e1c2fd54;hpb=97813c5867b167ae74015a9703744e17e2a7f029;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index cb3a2747b..58b8080b5 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -464,6 +464,20 @@ push_data: ret = consumer_push_metadata(socket, registry->metadata_key, metadata_str, len, offset); if (ret < 0) { + /* + * There is an acceptable race here between the registry metadata key + * assignment and the creation on the consumer. The session daemon can + * concurrently push metadata for this registry while being created on + * the consumer since the metadata key of the registry is assigned + * *before* it is setup to avoid the consumer to ask for metadata that + * could possibly be not found in the session daemon. + * + * The metadata will get pushed either by the session being stopped or + * the consumer requesting metadata if that race is triggered. + */ + if (ret == -LTTCOMM_CONSUMERD_CHANNEL_FAIL) { + ret = 0; + } ret_val = ret; goto error_push; }