Skip to content

Investigate high extension install error rate #190233

Closed

Description

Damon Tivel (@dtivel) discovered that we are having a high error rate of extension install.

Here are some kusto queries with interesting results:

RawEventsVSCode
| where ServerUploadTimestamp < ago(1d)
| where EventName == 'monacoworkbench/extensiongallery:install'
| summarize total_count = count(), failure_count = countif(Measures["success"] == 0.0) by bin(ServerUploadTimestamp, 1d)
| extend failure_percentage = todouble(failure_count) / total_count * 100
| project ServerUploadTimestamp, failure_percentage
| render timechart

Screenshot 2023-08-11 at 10 47 34

And here is the ErrorCodeDetail

RawEventsVSCode
| where ServerUploadTimestamp > ago(60d)
| where EventName == 'monacoworkbench/extensiongallery:install'
| where Measures["success"] == 0.0
| summarize count() by tostring(Properties["errorcode"])
| order by count_ desc

Properties_errorcode count_
Internal 10,542,542
Download 5,688,506
CorruptZip 3,909,848
Incompatible 2,331,489
Extract 780,667
IncompatiblePreRelease 453,860
Signature 227,637
incompatible 120,565
EPERM 88,294
EACCES 74,313
unknown 67,296
Invalid 51,401
Delete 28,992
downloading 27,435
ReleaseVersionNotFound 20,460
  8,735
gallery

Sandeep Somavarapu (@sandy081) why do we have such a high failure rate? What is the Internal error code?
It looks like there is a high error rate on work days when there is a higher load on MP service so it also might be influenced by the service.

I can not go back more in time than 10 months to check if we always had these error rates.
Error rates on extension update are considerably lower.

fyi João Moreno (@joaomoreno)

Activity

  1. added
    extensions
    on Aug 11, 2023
  2. changed the title [-]High extension error rate[/-] [+]High extension install error rate[/+] on Aug 11, 2023
  3. sandy081 commented on Aug 28, 2023

    @sandy081
    Member

    Internal errors are uncaught errors and hence cannot be classified. They stood the most (50%). I will try to see if there are places in the code where we can catch more error and classify them. The remaining are classified and can be explained by the error code name. Download errors could be network or service related and corrupt zips are service related.

  4. isidorn commented on Sep 18, 2023

    @isidorn
    Author

    Thanks for looking into this. Being able to further classify the internal errors would greatly help here.

  5. juancampa commented on Nov 29, 2023

    @juancampa

    I just hit this. It doesn't fix itself even after a restart.

    A corrupted file is stored in CachedExtensionVSIXs and never re-downloaded (I guess there's no checksum being checked anywhere).
    The cached vsix, instead of being a zip, it's an HTML with the following content:

    Screenshot 2023-11-29 at 6 36 45 PM

    Located in /Users/<username>/Library/Application Support/Code/CachedExtensionVSIXs/membrane.membrane-1.6.1-darwin-arm64.

    An easy bandaid fix might be to delete the file once the CorruptZip error is thrown so that it gets redownloaded.

    Update

    Deleting the corrupted file indeed fixes the issue.

  6. sandy081 commented on Nov 30, 2023

    @sandy081
    Member

    An easy bandaid fix might be to delete the file once the CorruptZip error is thrown so that it gets redownloaded

    It should be doing this already. Can you please confirm if this is not happening? Please share the log - F1 > Open View... > Shared

  7. juancampa commented on Nov 30, 2023

    @juancampa

    Sandeep Somavarapu (@sandy081) Perhaps is broken in MacOS?

    Here are the logs. Notice the timestamp difference after the CorruptZip error, that was the install after I manually deleted the corrupt file.

    2023-11-29 17:44:16.548 [info] Deleted uninstalled extension from disk github.copilot /Users/juan/.vscode/extensions/github.copilot-1.138.0
    2023-11-29 17:44:16.549 [info] Deleted uninstalled extension from disk rust-lang.rust-analyzer /Users/juan/.vscode/extensions/rust-lang.rust-analyzer-0.3.1740-darwin-arm64
    2023-11-29 17:44:16.551 [info] Deleted uninstalled extension from disk timonwong.shellcheck /Users/juan/.vscode/extensions/timonwong.shellcheck-0.34.0-darwin-arm64
    2023-11-29 17:44:16.552 [info] Deleted uninstalled extension from disk ms-vscode-remote.remote-ssh /Users/juan/.vscode/extensions/ms-vscode-remote.remote-ssh-0.107.0
    2023-11-29 17:44:16.552 [info] Deleted uninstalled extension from disk llvm-vs-code-extensions.vscode-clangd /Users/juan/.vscode/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24
    2023-11-29 17:44:29.300 [info] Getting Manifest... membrane.membrane
    2023-11-29 17:44:29.303 [info] Installing extension: membrane.membrane
    2023-11-29 17:44:29.900 [error] Error while installing the extension: membrane.membrane
    2023-11-29 17:44:29.903 [error] Failed to install extension. membrane.membrane
    2023-11-29 17:44:29.903 [error] CorruptZip: end of central directory record signature not found
        at d.download (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:109:141)
        at async ee.x (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:109:19904)
        at async ee.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:109:17947)
    2023-11-29 17:44:29.903 [error] [uncaught exception in sharedProcess]: end of central directory record signature not found: CorruptZip: end of central directory record signature not found
        at d.download (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:109:141)
        at async ee.x (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:109:19904)
        at async ee.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:109:17947)
    2023-11-29 18:40:24.887 [info] Getting Manifest... membrane.membrane
    2023-11-29 18:40:24.893 [info] Installing extension: membrane.membrane
    2023-11-29 18:40:27.007 [info] Extension signature is verified: membrane.membrane
    2023-11-29 18:40:27.172 [info] Extracted extension to file:///Users/juan/.vscode/extensions/membrane.membrane-1.6.1-darwin-arm64: membrane.membrane
    2023-11-29 18:40:27.182 [info] Renamed to /Users/juan/.vscode/extensions/membrane.membrane-1.6.1-darwin-arm64
    2023-11-29 18:40:27.183 [info] Extracting extension completed. membrane.membrane
    2023-11-29 18:40:27.193 [info] Extension installed successfully: membrane.membrane
    

    About Visual Studio Code:

    Version: 1.84.2
    Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
    Date: 2023-11-09T10:52:57.054Z
    Electron: 25.9.2
    ElectronBuildId: 24603566
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Darwin arm64 23.1.0
    
  8. sandy081 commented on Nov 30, 2023

    @sandy081
    Member

    Juan Campa (@juancampa) You are right, there is a bug in cleaning up the downloaded VSIX where it is a corrupt zip. Can you pleas file a separate issue?

  9. 21 remaining items

  10. sandy081 commented on Jun 18, 2024

    @sandy081
    Member

    Here are the error code results from 1.90.0.

    Outcome: Able to resolve the reason for internal errors. Seems majority errors are happening while updating metadata. Added additional telemetry data to further understand about metadata update errors.

    Image

  11. sandy081 commented on Aug 19, 2024

    @sandy081
    Member

    Capturing the latest charts.

    Image

    Error percentages are coming down gradually. It is averaging around 10% in last 3 weeks.

    Image

    I am able to resolve/fix internal & update metadata errors almost completely. The next bigger percentage of errors falls under Extract category.

  12. sandy081 commented on Nov 29, 2024

    @sandy081
    Member

    Closing this. Lets create new issues for new findings

  13. locked and limited conversation to collaborators on Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debtextensions

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions