X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=72a3223c1fa53baa0bf8f413e9e9e99d7e6d335d;hb=000baf6aa0ad8d7a985f147f1f47337b564150ca;hp=41a321f0a3a8dc5a10d1c7d15eca79bca621241c;hpb=50adc26400482c07210afcda8ef1d3322f75871d;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 41a321f0a..72a3223c1 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -481,6 +481,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; }