Skip to contentSkip to conversation

Fix: per-pid ust buffers flush race with application unregister

PATCH Jérémie Galarneau 1 participant 1 message Feb 24, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Merged in master and stable-2.7, thanks!

Jérémie

Quoted 32 lines · Mathieu Desnoyers

If an application exits between the moment we create the ust app session (shadow copy) and the moment we send channels to the application, sending channels may fail. If the application unregisters between the the end of ust app session creation and the destroy that follows (ust app session lock is released in between), we may see is_sent being false.

This assert was initially there in the early days of lttng-tools when the application was responsible for doing the flush. Now that the flush has been moved to the consumer daemon, we don't need this assertion anymore.

---
 src/bin/lttng-sessiond/ust-app.c | 1 -
 1 file changed, 1 deletion(-)
src/bin/lttng-sessiond/ust-app.c +0 -2
index 8c45a89..160a156 100644
@@ -4469,7 +4469,6 @@ int ust_app_flush_app_session(struct ust_app *app,
                cds_lfht_for_each_entry(ua_sess->channels->ht, &iter.iter, ua_chan,
                                node.node) {
                        health_code_update();
-                       assert(ua_chan->is_sent);
                        ret = consumer_flush_channel(socket, ua_chan->key);
                        if (ret) {
                                ERR("Error flushing consumer channel");
--

2.1.4

Signature · 8 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev