Skip to content

Possible race in persistent storage. #8984

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

Closed
ericsnowcurrently opened this issue Dec 10, 2019 · 0 comments
Closed

Possible race in persistent storage. #8984

ericsnowcurrently opened this issue Dec 10, 2019 · 0 comments
Labels
area-internal Label for non-user facing issues bug Issue identified by VS Code Team member as probable bug

Comments

@ericsnowcurrently
Copy link

See: https://dev.azure.com/ms/vscode-python/_build/results?buildId=53561&view=logs

Error 2019-12-09 22:06:53: Failed to activate a workspace, Class name = p, completed in 18331ms, Arg 1: <Uri:d:\a\1\s\src\testMultiRootWkspc\smokeTests>, Return Value: undefined TypeError: Cannot read property 'fileHash' of undefined
    at C.updateCachedInterpreterInformation (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:75:1186987)
    at C.getInterpreterDetails (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:75:1185338)
    at C.activate (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:68:64400)
    at async Promise.all (index 0)
    at p.activateWorkspace (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:68:60843)
Error 2019-12-09 22:06:53: sendStartupTelemetry() failed. TypeError: Cannot read property 'fileHash' of undefined
    at C.updateCachedInterpreterInformation (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:75:1186987)
    at C.getInterpreterDetails (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:75:1185338)
    at C.activate (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:68:64400)
    at async Promise.all (index 0)
    at p.activateWorkspace (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:68:60843)
Error 2019-12-09 22:06:53: Failure during activation. TypeError: Cannot read property 'fileHash' of undefined
    at C.updateCachedInterpreterInformation (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:75:1186987)
    at C.getInterpreterDetails (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:75:1185338)
    at C.activate (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:68:64400)
    at async Promise.all (index 0)
    at p.activateWorkspace (d:\a\1\s\tmp\ext\smokeTestExtensionsFolder\out\client\extension.js:68:60843)
TypeError: Cannot read property 'fileHash' of undefined
TypeError: Cannot read property 'fileHash' of undefined

From what I can tell in InterpreterService.getInterpreterCache(), the returned state.value will always be set (never undefined). So in updateCachedInterpreterInformation() the lookup on state.value.fileHash should never faile like it did in the above logs. The only explanation I can think of is that there is either a race or a silenced error in the persistent state code (or the underlying Memento implementation).

See:

  • src/client/interpreter/interpreterService.ts
  • src/client/common/persistentState.ts
@ericsnowcurrently ericsnowcurrently added bug Issue identified by VS Code Team member as probable bug needs PR labels Dec 10, 2019
@luabud luabud added area-internal Label for non-user facing issues and removed feature-* labels May 13, 2020
@luabud luabud closed this as completed Mar 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-internal Label for non-user facing issues bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants