Skip to content
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

Make output handling thread-local #4405

Merged
merged 1 commit into from
May 15, 2023

Conversation

cgwalters
Copy link
Member

This is needed because for transactions (which are always run in a thread today) we want output to go to the transaction's DBus progress. But for other methods which are not transactions, we don't have a channel for status reporting, so output needs to
continue to go to the journal. If we mix these two things due to
concurrent method invocations, the client may get confused and crash.

Closes: #4284

This is needed because for transactions (which are always run in
a thread today) we want output to go to the transaction's DBus
progress.  But for other methods which are not transactions, we don't
have a channel for status reporting, so output needs to
continue to go to the journal.   If we mix these two things due to
concurrent method invocations, the client may get confused and crash.

Closes: coreos#4284
@@ -313,6 +313,99 @@ transaction_gpg_verify_result_cb (OstreeRepo *repo, const char *checksum,
g_strdup (checksum));
}

static void
transaction_output_cb (RpmOstreeOutputType type, void *data, void *opaque)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function mostly just moved from sysroot_output_cb, with just some tweaks in the first section because we no longer need to check for a transaction being present, because we now only call this when we have a running one.

Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jmarrero jmarrero enabled auto-merge May 11, 2023 20:13
@cgwalters
Copy link
Member Author

CI failure is not related
/override ci/prow/fcos-e2e

@openshift-ci
Copy link

openshift-ci bot commented May 15, 2023

@cgwalters: Overrode contexts on behalf of cgwalters: ci/prow/fcos-e2e

In response to this:

CI failure is not related
/override ci/prow/fcos-e2e

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jmarrero jmarrero merged commit 4222172 into coreos:main May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

thread 'tokio-runtime-worker' panicked at 'assertion failed: !(self.ptype == ProgressType::Task)'
2 participants