X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;fp=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=de4aab55a0f9cde742df9f9dad9ac4c0031f72e2;hb=890d27f405dcd347f4e5a1db10b914c2553d2c47;hp=cc0d235841a853e662ca48d7a01d7e5e6a8871b1;hpb=27cb731706f592c4590f7133edc4c07133a08661;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index cc0d23584..de4aab55a 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; }