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

extension may stuck in activating state if dispose are never ending #9445

Open
axel7083 opened this issue Oct 17, 2024 · 3 comments
Open

extension may stuck in activating state if dispose are never ending #9445

axel7083 opened this issue Oct 17, 2024 · 3 comments

Comments

@axel7083
Copy link
Contributor

Bug description

Reading carefully the logs in #9370 (comment) we have the following

Activating extension podman-desktop.podman failed error:Error: Extension podman-desktop.podman activation timed out after 20 seconds

which correspond to the following console.log

console.log(`Activating extension ${extension.id} failed error:${err}`);

However; a per the user state: we never the extension state to failed, still on activate, meaning something went wrong in those lines

console.log(`Activating extension ${extension.id} failed error:${err}`);
// dispose resources
for (const subscription of extensionContext.subscriptions) {
try {
subscription.dispose();
} catch (err: unknown) {
console.error('Something went wrong while trying to dispose extension subscription', err);
}
}
this.extensionState.set(extension.id, 'failed');

We are iterating in the subscriptions, and disposing them in a try catch, but here is the catch... we do not set timeout to them, but... they are not promises, they should not take too much time ??

Podman is adding tons of disposales, some of them very heavy

const disposable = extensionApi.Disposable.create(() => {
podmanProcess.kill();
});

Operating system

Windows 11

Installation Method

Other

Version

next (development version)

Steps to reproduce

#9370

Relevant log output

No response

Additional context

No response

@axel7083 axel7083 added the kind/bug 🐞 Something isn't working label Oct 17, 2024
@axel7083
Copy link
Contributor Author

If the problem is coming from disposal never ending, this is tricky, and bad. But we could work around by appliying a race condition between a setTimeout and the disposals, or moving the setState error above, but we could have a state where some resources are yet not disposed, and the extension may restarted.

IMO the timeout race is an acceptable solution :/

@jeffmaury
Copy link
Contributor

I have a reproducer:

  • have 2 podman machine started
  • start podman desktop
  • the podman extension will display a dialog about the podman default connection not in sync with the podman machine
  • wait at least 20 seconds to answer to the dialog --> extension start elapsed

@odockal
Copy link
Contributor

odockal commented Oct 17, 2024

I have a reproducer:

* have 2 podman machine started

* start podman desktop

* the podman extension will display a dialog about the podman default connection not in sync with the podman machine

* wait at least 20 seconds to answer to the dialog --> extension start elapsed

Moreover, in this state extension cannot be activated anymore in running Podman Desktop. The error says:

Activating extension podman-desktop.podman failed error:Error: command 'podman.onboarding.checkInstalledCommand' already exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants