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

Multiple executionContext/create messages prevent app startup #9993

Closed
2 tasks done
hubertp opened this issue May 17, 2024 · 10 comments
Closed
2 tasks done

Multiple executionContext/create messages prevent app startup #9993

hubertp opened this issue May 17, 2024 · 10 comments
Assignees
Labels
--bug Type: bug --regression Important: regression -gui

Comments

@hubertp
Copy link
Collaborator

hubertp commented May 17, 2024

Discord username

No response

What type of issue is this?

Permanent – Occurring repeatably

Is this issue blocking you from using Enso?

  • Yes, I can't use Enso because of this issue.

Is this a regression?

  • Yes, previous version of Enso did not have this issue.

What issue are you facing?

Somewhere between 08/05 and 17/05 a regression was introduced that leads to multiple executionContext/create requests being sent by GUI when creating a new project (likely also when opening an existing project).

See screenshot.

Expected behaviour

No failures on startup on a hello world example.

How we can reproduce it?

Try to open a new project with latest nightly.

Screenshots or screencasts

Screenshot from 2024-05-17 18-08-05

Logs

error: 
{code: 2004, message: "Invalid stack item"}

Enso Version

17/05 nightly

Browser or standalone distribution

Standalone distribution (local project)

Browser Version or standalone distribution

standalone

Operating System

Linux

Operating System Version

No response

Hardware you are using

No response

@hubertp
Copy link
Collaborator Author

hubertp commented May 18, 2024

I don't see any issues in nightly from 14/05 (no nightiles between 14th and 17th, so can't triage that one easily).

@hubertp hubertp changed the title Multiple executionContext/create prevent app startup Multiple executionContext/create messages prevent app startup May 18, 2024
@hubertp
Copy link
Collaborator Author

hubertp commented May 19, 2024

It appears to be only(?) reproducible for less powerful machines. Still, I think we should discuss retries that GUI is making as some of the sent messages are not idempotent.

@farmaazon
Copy link
Contributor

It appears to be only(?) reproducible for less powerful machines. Still, I think we should discuss retries that GUI is making as some of the sent messages are not idempotent.

I'm aware of the problem with retries, but honestly I haven't expected we hit it so early :)

Technically, on problems like "timeout" we have no idea what is the engine's state. One solution would be marking the execution context as "broken" and try to destroy it and recreate on every single failure in its creation or frame change. Perhaps visualization as well? To avoid unnecessary visualizations nobody listens to. Here the problem is, that even slight connectivity issue would destroy all caches.

So better solution would be to have an ability to read the current engine's state. Then, after a timeout, we could read the state first to check if last call was actually applied or not. But that requires adding new methods to engine.

@hubertp
Copy link
Collaborator Author

hubertp commented May 20, 2024

Are you sure something wasn't broken recently? I built my own nightlies and narrowed it down to somewhere between 14th and 15th, i.e. 52b8ed4...c437721.

@hubertp
Copy link
Collaborator Author

hubertp commented May 20, 2024

I'm afraid I narrowed it down to your commit, @vitvakatu, 52b8ed4. It's weird though, it looks innocent.
To verify you can build IDE with 43c80da8a313f48bc7b492f37cc9c651cf7dea71 and 52b8ed4d3a01711a70ef65c1f53d9a33adbe0509 with a fixed nightly backend. The former will be fine with a simple Hello World project, the latter not.

@farmaazon
Copy link
Contributor

farmaazon commented May 22, 2024

Let's also see if it gets fixed by #9951 as it fixes the same project being initialized twice.

@hubertp
Copy link
Collaborator Author

hubertp commented Jun 12, 2024

Still seeing the problem. It's actually a combination of multiple executionContext/create and executionContext/push.

@hubertp
Copy link
Collaborator Author

hubertp commented Jun 13, 2024

This issue should be visible once the other PR gets merged.

mergify bot pushed a commit that referenced this issue Jun 14, 2024
A quick and dirty workaround for slow processing in a similar spirit to PR #9858.
Long compilation of stdlib holds a write compilation lock, while opening the file needs to set module sources and requires read compilation lock and file lock. The expectation was that setting module sources is instantaneous except not, because of locks.

This PR adds soft retries.

Partially closes #10231. There are still problems related to #9993 once this PR is merged.

# Important Notes
We need to figure out a more fine-grained lock system or, ideally, make it lock free to avoid such hacks.
@AdRiley AdRiley modified the milestones: Beta Release, 2024-07 Release Jun 15, 2024
@farmaazon farmaazon self-assigned this Jun 27, 2024
@farmaazon farmaazon moved this from ❓New to ⚙️ Design in Issues Board Jun 27, 2024
@hubertp
Copy link
Collaborator Author

hubertp commented Jul 9, 2024

@farmaazon noticed a similar issue when trying it out with electron app and connecting to cloud:
Screenshot from 2024-07-09 14-04-27

EDIT: changed my mind. Those are similar issues but not exactly the same. Filed #10495. This is reproducible when connecting to cloud project via electron app.

@sylwiabr sylwiabr removed the triage label Jul 24, 2024
@AdRiley AdRiley removed this from the 2024-09 Release milestone Sep 26, 2024
@AdRiley AdRiley added this to the 2024-10 Release milestone Sep 26, 2024
@farmaazon
Copy link
Contributor

Fixed by #11739

@github-project-automation github-project-automation bot moved this from ⚙️ Design to 🟢 Accepted in Issues Board Dec 10, 2024
@farmaazon farmaazon moved this from 🟢 Accepted to 🗄️ Archived in Issues Board Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--bug Type: bug --regression Important: regression -gui
Projects
Status: 🗄️ Archived
Development

No branches or pull requests

4 participants