golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.27k stars 17.7k forks source link

x/tools/gopls/internal/regtest/workspace: failures with ‘Unmet: completed work "diagnosing initial workspace load"’ #50582

Open bcmills opened 2 years ago

bcmills commented 2 years ago
--- FAIL: TestFilters (27.91s)
    --- FAIL: TestFilters/module_root (27.91s)
        --- FAIL: TestFilters/module_root/experimental (25.12s)
            runner.go:316: waiting on:
                    Unmet: completed work "diagnosing initial workspace load" 1 times

                err:context deadline exceeded

                state:
                #### log messages (see RPC logs for full text):
                    Info: "2022/01/12 18:58:13 go env for C:\\Users\\gopher\\...
                    Info: "2022/01/12 18:58:31 go/packages.Load\n\tsnapshot=0...

                #### diagnostics:

                #### outstanding work:
                    Load: 0.00
                    diagnosing initial workspace load: 0.00
                    Setting up workspace: 0.00
                #### completed work:
            runner.go:312: closing editor: Shutdown: context deadline exceeded

greplogs --dashboard -md -l -e 'FAIL: TestFilters'

2022-01-12T19:47:40-d7a4bb4-f005df8/windows-arm64-10

And then there are a whole lot of openbsd-386 failures on the builders affected by #49209, which IMO we can safely ignore:

[2022-01-12T01:49:33-d7a4bb4-3d3f5d9/openbsd-386-70-n2d](https://build.golang.org/log/ba6033e36e9b70f08d1cc83b137fd2820f6307ce) [2022-01-11T18:17:05-d7a4bb4-a20724d/openbsd-386-70-n2d](https://build.golang.org/log/15936899afb20cb7626151a82e8714ec2963a225) [2022-01-11T01:22:53-52e9527-9de1ac6/openbsd-386-70-n2d](https://build.golang.org/log/cb9383d07563a6fb6f483f1160185aaa5c335cb9) [2022-01-10T04:23:42-94bfe68-6df0957/openbsd-386-70-n2d](https://build.golang.org/log/ef7e2f7309ac4143b74db81abea52d6fc1abdcd0) [2022-01-09T18:43:51-94bfe68-2639f2f/openbsd-386-70-n2d](https://build.golang.org/log/86f225bdcc411ad6e7fe0c75eefad6aa5b5e5a3f) [2022-01-08T00:24:25-94bfe68-90860e0/openbsd-386-70-n2d](https://build.golang.org/log/a8b5ab88fda29ae0bf94d7792ba609b583689889) [2022-01-07T17:27:56-94bfe68-9de1ac6/openbsd-386-70-n2d](https://build.golang.org/log/8402c1c72c1642928ee4dede4e1f863ba42fa457) [2022-01-07T06:34:04-351aaa6-11b28e7/openbsd-386-70-n2d](https://build.golang.org/log/c46f8b8326d500cdf704e517f535eb9d058120a1) [2022-01-07T05:34:58-351aaa6-9de1ac6/openbsd-386-70-n2d](https://build.golang.org/log/bf60418e658f6ac775f0869226aba50f437c8b97) [2022-01-07T01:36:17-a1300ed-c1e7c51/openbsd-386-70-n2d](https://build.golang.org/log/c450d89f86b542476ad5cc9dd993db4708c5feb2) [2022-01-06T21:41:55-a1300ed-9de1ac6/openbsd-386-70-n2d](https://build.golang.org/log/2b32bb2017cee46e56d17c0af936d51607703145) [2022-01-06T16:18:51-4754748-dbdf055/openbsd-386-70-n2d](https://build.golang.org/log/5758fd4f32d0d5267ff775a0b411e8dd56e9feea) [2022-01-06T00:26:47-04daf88-b5bfaf4/openbsd-386-70-n2d](https://build.golang.org/log/36bbe386484bfc7cc8be86f171448bbf98cf1588) [2022-01-05T21:22:03-04daf88-2b39d86/openbsd-386-70-n2d](https://build.golang.org/log/899d870c18f25b08d7485421350b9a05656152b6) [2022-01-05T09:50:29-15409b5-2c58bb2/openbsd-386-70-n2d](https://build.golang.org/log/69e1fa6402eb61108b3188de4073651cecab1273) [2022-01-05T01:53:39-15409b5-301db3f/openbsd-386-70-n2d](https://build.golang.org/log/fd09ab6bd0b402a767bc17f3d1b1937b82110e13) [2022-01-04T20:54:25-15409b5-1242f43/openbsd-386-70-n2d](https://build.golang.org/log/e804273ee759822a3b9b241b6ad6c32ad54a6c96) [2022-01-03T23:45:12-ee1ca4f-95b240b/openbsd-386-70-n2d](https://build.golang.org/log/e0e915a8907207850ed2bba58aa263bc26ee6c97) [2022-01-02T14:27:43-ee1ca4f-c886143/openbsd-386-70](https://build.golang.org/log/3daa7fa153ea7aab7a62bdd45d2069c592c28b28) [2021-12-29T20:20:32-ee1ca4f-6178d25/openbsd-386-70-n2d](https://build.golang.org/log/44617b2f48496a8a8ff58243efa092b0e802ac3f) [2021-12-28T19:29:29-ee1ca4f-1242f43/openbsd-386-70-n2d](https://build.golang.org/log/cb3dde9eea05c4ee3d0fa8f8c45dc4067db49988) [2021-12-23T20:03:38-8d38310-b357b05/openbsd-386-70-n2d](https://build.golang.org/log/003bd8937f807b33c6d658545454526aff880777) [2021-12-23T18:58:36-8d38310-af3b8cf/openbsd-386-70-n2d](https://build.golang.org/log/4f9d31fbacb0461966066566f4ae77ea0bb32b25) [2021-12-22T18:43:55-8d38310-0f3becf/openbsd-386-70-n2d](https://build.golang.org/log/ca9d694b0b9448e969e0328b118f70d8e6ceb5fb) [2021-12-16T11:15:33-8d38310-de690c2/openbsd-386-70-n2d](https://build.golang.org/log/1e1e396875a9e2895693670045bea5fb509d59e2) [2021-12-15T23:51:57-c6ae451-6e7c691/openbsd-386-70-n2d](https://build.golang.org/log/b3ec4a1efd8211189b08ae6431c108f30f67a09d) [2021-12-15T16:50:15-c6ae451-de690c2/openbsd-386-70-n2d](https://build.golang.org/log/9599b725eee92ec040d2b2cfb22720791df68edd) [2021-12-15T00:33:55-27fc764-9d0ca26/openbsd-386-70](https://build.golang.org/log/74ed671a4bf7f49835e06c8d8269484850a91423) [2021-12-15T00:33:55-27fc764-9d0ca26/openbsd-386-70-n2d](https://build.golang.org/log/9fb7931fe2955d3c6b9e30b75ded2c1e6f02b5b3) [2021-12-13T22:45:26-27fc764-5b9207f/openbsd-386-70-n2d](https://build.golang.org/log/286598bbdea832f1cdbe155172cf2c866c95764a) [2021-12-12T06:14:07-27fc764-9c6e8f6/openbsd-386-70-n2d](https://build.golang.org/log/aeeefb23f624775686e5e73e9b8ee3667931157a) [2021-12-10T19:26:50-27fc764-766f89b/openbsd-386-70-n2d](https://build.golang.org/log/8fc1e3ca708830b491f38b16cb1b56a0cf81a72d) [2021-12-09T17:16:12-27fc764-78b4518/openbsd-386-70-n2d](https://build.golang.org/log/704d90aa1df13279764609dda07eda9640cfcb92) [2021-12-09T15:47:16-27fc764-de690c2/openbsd-386-70-n2d](https://build.golang.org/log/be6a3193a7def47263a17ef43efaf82335d752c3) [2021-12-09T13:07:36-3fca6a0-48d9489/openbsd-386-70-n2d](https://build.golang.org/log/237d0ea571207ed4fe2be24bdb97c8e324cf01b5) [2021-12-08T23:38:20-3fca6a0-d6c4583/openbsd-386-70-n2d](https://build.golang.org/log/511027b003ab69f7212c3f48573975ca2ebed456) [2021-12-08T18:30:00-3fca6a0-61011de/openbsd-386-70-n2d](https://build.golang.org/log/9b7f46e58ee143c806fd657d9d9ff38bb0b94590) [2021-12-08T16:15:56-3fca6a0-61317ef/openbsd-386-70-n2d](https://build.golang.org/log/37ffe78007658c586843d7563b60e130f224639b) [2021-12-08T04:14:00-fd2bfb7-a19e72c/openbsd-386-70-n2d](https://build.golang.org/log/8b1432d31018b4e606e40957f6db0556290bbe3a) [2021-12-07T20:13:17-d3358c1-61317ef/openbsd-386-70-n2d](https://build.golang.org/log/2b9a96f2926bed6394154e2c0c62d1044b04bc36) [2021-12-07T03:44:02-feb39d0-dc65c48/openbsd-386-70-n2d](https://build.golang.org/log/9f6812ad213003fd937720d7cb96e2ffbc2b9b36) [2021-12-06T16:11:25-feb39d0-0f2d0d0/openbsd-386-70-n2d](https://build.golang.org/log/0b6adc7b7582c44b3d7bddd3c5ceb7c988dbf601) [2021-12-04T04:50:55-c882a49-549cfef/openbsd-386-70-n2d](https://build.golang.org/log/6e161dae09438d9d89d69e13add14e3d6b3137e3) [2021-12-03T18:55:11-c882a49-c4a8550/openbsd-386-70-n2d](https://build.golang.org/log/265646dc41ddd50db555788145660b48eec36bb4) [2021-12-03T18:55:11-c882a49-0f2d0d0/openbsd-386-70-n2d](https://build.golang.org/log/ffe4d2dcdfcc926df7a8f24c34ad6a40546f414d) [2021-12-03T01:09:21-e212aff-0985990/openbsd-386-70-n2d](https://build.golang.org/log/fa0361a4b607ef6955983756aae176343a684c8b) [2021-12-02T20:02:34-e212aff-0f2d0d0/openbsd-386-70-n2d](https://build.golang.org/log/f834d80a58502249eeb6d4e86785687a45373962) [2021-12-02T16:48:07-e212aff-36be0be/openbsd-386-70-n2d](https://build.golang.org/log/ed9580197658354b8033f6be88a4666dfea138b1) [2021-12-01T19:09:57-d99d6fa-0103fd2/openbsd-386-70-n2d](https://build.golang.org/log/da5f1c0514456882f3c2f6cbc8b6cee818b864e3) [2021-12-01T15:05:46-615f9a6-b7651e5/openbsd-386-70-n2d](https://build.golang.org/log/d316c4970ef0ab03a93b21d8ea771bf2074a37de) [2021-11-30T22:42:17-1fd30d2-b7651e5/openbsd-386-70-n2d](https://build.golang.org/log/f314ca6a18255077cbf9ac9d4022813ad90605b0) [2021-11-30T22:42:17-1fd30d2-7ccbcc9/openbsd-386-70-n2d](https://build.golang.org/log/ed767b3da193caf8bebf2f1c9411e4bfe7e1681a) [2021-11-30T18:09:02-2c9b078-931d80e/openbsd-386-70-n2d](https://build.golang.org/log/6aa0ce68e288fbe1c151020adb8bfaae33fc7189) [2021-11-30T16:43:31-2c9b078-682435d/openbsd-386-70-n2d](https://build.golang.org/log/35508b23416d96f4e27b9ea254461d599c59c305) [2021-11-29T20:12:13-6e52f51-b7651e5/openbsd-386-70-n2d](https://build.golang.org/log/9c559f16a7925e562c940d1726ef1371dccda806) [2021-11-25T00:07:28-cb80a01-f7e34e7/openbsd-386-70](https://build.golang.org/log/7d895cad05da0697c25f7868da93d0d8ad6d905d)

CC @findleyr

bcmills commented 2 years ago

This appears to be more builder-specific than test-specific; maybe it's a bug in the test-runner infrastructure?

--- FAIL: TestClearAnalysisDiagnostics (35.55s)
    --- FAIL: TestClearAnalysisDiagnostics/experimental (20.07s)
        runner.go:316: waiting on:
                Unmet: completed work "diagnosing initial workspace load" 1 times

            err:context deadline exceeded

            state:
            #### log messages (see RPC logs for full text):
                Info: "2022/01/18 18:08:15 go env for C:\\Users\\gopher\\...

            #### diagnostics:

            #### outstanding work:
                diagnosing initial workspace load: 0.00
                Setting up workspace: 0.00
                Load: 0.00
            #### completed work:
        runner.go:312: closing editor: Shutdown: io: read/write on closed pipe
FAIL
FAIL    golang.org/x/tools/gopls/internal/regtest/workspace 138.379s

greplogs --dashboard -md -l -e 'Unmet: completed work "diagnosing initial workspace load"' --since=2022-01-12

2022-01-18T18:56:51-f29bdf1-75bcdd5/windows-arm64-10

findleyr commented 2 years ago

This means that gopls' initial workspace load is timing out on these builders:

Consider the following excerpt from the logs:

[Trace - 18:08:14.808 PM] Received notification '$/progress'.
Params: {"token":"6426100070888298971","value":{"kind":"begin","title":"Load","message":"Loading query=[builtin mod.com/...]"}}

...

[Trace - 18:08:32.828 PM] Received notification '$/progress'.
Params: {"token":"7981306761429961588","value":{"kind":"end","message":"Finished loading packages."}}

I think a reasonable next step is to add additional instrumentation around loading: how long did go list take vs other phases in loading.

gopherbot commented 2 years ago

Change https://golang.org/cl/380497 mentions this issue: internal/lsp/regtest: eliminate arbitrary timeouts