It's totally possible that a start failed for a specific app but the
started flag is set for the global session making a stop trace possible
on a failed started session.
The assert is no longer valid since this code flow is possible.
Signed-off-by: David Goulet <dgoulet@efficios.com>
/*
* If started = 0, it means that stop trace has been called for a session
- * that was never started. This is a code flow error and should never
- * happen.
+ * that was never started. It's possible since we can have a fail start
+ * from either the application manager thread or the command thread. Simply
+ * indicate that this is a stop error.
*/
- assert(ua_sess->started == 1);
+ if (ua_sess->started == 1) {
+ goto error_rcu_unlock;
+ }
health_code_update(&health_thread_cmd);