-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Staging test fixes #24
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a deleted flag within the ust app session which is raised (with ust app session lock held) at delete, and checked within each RCU traversal, again with ust app session lock held. This takes care of races between teardown of an application (unregister) and execution of commands which are accessing the app session concurrently. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
We should not report an error when creating a channel if the application is exiting concurrently. Also, remove an inappropriate assert() in ust_app_create_event_glb: it is possible to have a channel lookup fail if channel/event creation occurs concurrently with an application exit. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
The UST app session has a reference on the consumer output object, but it belongs to the UST session. Implement a refcounting scheme to ensure it is not freed before all users are done using it. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
The ownership and reference counting of the relay daemon is unclear and buggy in many ways. It is the cause of memory corruptions, double-free, leaks, segmentation faults, observed in various conditions. Fix this situation by introducing a clear ownership and reference counting scheme for this daemon. See doc/relayd-architecture.txt for details. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
We need to unlock the registry while we push metadata to break a circular dependency between the consumerd metadata lock and the sessiond registry lock. Indeed, pushing metadata to the consumerd awaits that it gets pushed all the way to relayd, but doing so requires grabbing the metadata lock. If a concurrent metadata request is being performed by consumerd, this can try to grab the registry lock on the sessiond while holding the metadata lock on the consumer daemon. Those push and pull schemes are performed on two different bidirectionnal communication sockets. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
We only do a single rcu_barrier() on teardown of sessiond. Therefore, if we chain call_rcu, they may not all be executed before exit. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fixes RCU race where objects are accessed by this thread under RCU read-side lock after free. Since this thread is not a registered RCU reader, the read-side lock has no effect. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sample the "closed" flag with session lock held. Also, if the session connection is closed while we attach to it, reply with HUP, because there are risks of attaching to an incomplete session (e.g. the metadata stream could be already closed). Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Only used in a single compilation unit. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Many threads can access the application socket (cmd handling thread and application handling thread) concurrently. Therefore, we need to protect it with a mutex. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Test closed streams for content to check for HUP. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Only needed in get next index. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
We only care about this when we get the next index. There may be new metadata that appears between get next index and get packet, but it should not matter. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.