Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Spurious CI tests #1265

Closed
Xanewok opened this issue Jan 26, 2019 · 8 comments
Closed

Spurious CI tests #1265

Xanewok opened this issue Jan 26, 2019 · 8 comments

Comments

@Xanewok
Copy link
Member

Xanewok commented Jan 26, 2019

Right now we have 2 failing tests which pop up from time to time (here both are triggered):

  1. on Linux - client_deglob (previously test_deglob)
Processing message: Object({"id": Number(1100), "jsonrpc": String("2.0"), "result": Array([])})
thread 'client_deglob' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21

We sometimes don't get a response for the second deglob requests for a line with 2 glob imports

  1. on Windows - client_use_statement_completion_doesnt_suggest_arguments
Processing message: Object({"id": Number(100), "jsonrpc": String("2.0"), "result": Array([])})
thread 'client_use_statement_completion_doesnt_suggest_arguments' panicked at 'Racer autocompletion failed', src\libcore\option.rs:1038:5

Sometimes Racer autocompletion returns empty (which is weird, given we're already waiting till the project is indexed and we wait for Racer to perform its analysis) results.

It's important we tackle this issue since

  • in the past these sometimes spuriously failed in the Rust repo, flagging RLS as broken (which it wasn't)
  • about a third of our CI checks fail because of these
@h-michael
Copy link
Contributor

I use ArchLinux for developing.
But I can't reproduce first case. 🤔

@h-michael
Copy link
Contributor

I try to run test on Ubuntu 14.04 docker container.
But I can't reproduce first case.

@Xanewok
Copy link
Member Author

Xanewok commented Jan 27, 2019

I'm using Xubuntu 18.04 and unfortunately can't reproduce the first issue as well.

I'd assume we always calculate glob map correctly on the rustc side, so the second request returning empty results either mean that the analysis is not ready, but we wait for the initial build and executing those commands does not retrigger any build or modification...

Maybe VFS sometimes fails to fetch a source line? Or rls_analysis is racy and sometimes returns empty definitions? Every guess seems fine...

@Xanewok Xanewok mentioned this issue Jan 28, 2019
@kennytm
Copy link
Member

kennytm commented Feb 6, 2019

Some recent breakages:

  • Rollup of 16 pull requests rust#57568 (comment) (Windows, 2019-01-13T09:12:47Z)

    cmd_changing_workspace_lib_retains_bin_diagnostics
    ---- cmd_changing_workspace_lib_retains_bin_diagnostics stdout ----
    thread 'cmd_changing_workspace_lib_retains_bin_diagnostics' panicked at 'assertion failed: `(left == right)`
      left: `String("E0425")`,
     right: `"unused_variables"`', src\tools\rls\tests\tests.rs:402:5
    note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
    ---rls-stdout---
    Content-Length: 605
    
    {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".",":"]},"definitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{"resolveProvider":false},"documentFormattingProvider":true,"documentRangeFormattingProvider":false,"renameProvider":true,"executeCommandProvider":{"commands":["rls.applySuggestion-3252","rls.deglobImports-3252"]}}}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","title":"Building"}}Content-Length: 112
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"library","title":"Building"}}Content-Length: 122
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"library cfg(test)","title":"Building"}}Content-Length: 121
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"binary cfg(test)","title":"Building"}}Content-Length: 111
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"binary","title":"Building"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_1","title":"Building"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_0","title":"Indexing"}}Content-Length: 733
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"unused_variables","message":"unused variable: `unused`\n\nnote: #[warn(unused_variables)] on by default\nhelp: consider using `_unused` instead: `_unused`","range":{"end":{"character":30,"line":2},"start":{"character":24,"line":2}},"severity":2,"source":"rustc"},{"code":"unused_variables","message":"unused variable: `test_val`\n\nhelp: consider using `_test_val` instead: `_test_val`","range":{"end":{"character":36,"line":9},"start":{"character":28,"line":9}},"severity":2,"source":"rustc"}],"uri":"file:///C:/projects/rust/build/x86_64-pc-windows-msvc/stage2-tools/x86_64-pc-windows-msvc/rlsit/t2/simple_workspace/library/src/lib.rs"}}Content-Length: 493
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"unused_variables","message":"unused variable: `val`\n\nnote: #[warn(unused_variables)] on by default\nhelp: consider using `_val` instead: `_val`","range":{"end":{"character":27,"line":4},"start":{"character":24,"line":4}},"severity":2,"source":"rustc"}],"uri":"file:///C:/projects/rust/build/x86_64-pc-windows-msvc/stage2-tools/x86_64-pc-windows-msvc/rlsit/t2/simple_workspace/binary/src/main.rs"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_0","title":"Indexing"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","title":"Building"}}Content-Length: 122
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"library cfg(test)","title":"Building"}}Content-Length: 112
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"library","title":"Building"}}Content-Length: 121
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"binary cfg(test)","title":"Building"}}Content-Length: 111
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"binary","title":"Building"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_3","title":"Building"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_2","title":"Indexing"}}Content-Length: 681
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"E0308","message":"mismatched types\n\nexpected u32, found u64","range":{"end":{"character":62,"line":9},"start":{"character":44,"line":9}},"severity":1,"source":"rustc"},{"code":"unused_variables","message":"unused variable: `unused`\n\nnote: #[warn(unused_variables)] on by default\nhelp: consider using `_unused` instead: `_unused`","range":{"end":{"character":30,"line":2},"start":{"character":24,"line":2}},"severity":2,"source":"rustc"}],"uri":"file:///C:/projects/rust/build/x86_64-pc-windows-msvc/stage2-tools/x86_64-pc-windows-msvc/rlsit/t2/simple_workspace/library/src/lib.rs"}}Content-Length: 409
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"E0308","message":"mismatched types\n\nexpected u32, found u64","range":{"end":{"character":55,"line":4},"start":{"character":35,"line":4}},"severity":1,"source":"rustc"}],"uri":"file:///C:/projects/rust/build/x86_64-pc-windows-msvc/stage2-tools/x86_64-pc-windows-msvc/rlsit/t2/simple_workspace/binary/src/main.rs"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_2","title":"Indexing"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_5","title":"Building"}}Content-Length: 112
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_5","message":"library","title":"Building"}}Content-Length: 121
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_5","message":"binary cfg(test)","title":"Building"}}Content-Length: 111
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_5","message":"binary","title":"Building"}}Content-Length: 122
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_5","message":"library cfg(test)","title":"Building"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_5","title":"Building"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_4","title":"Indexing"}}Content-Length: 733
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"unused_variables","message":"unused variable: `unused`\n\nnote: #[warn(unused_variables)] on by default\nhelp: consider using `_unused` instead: `_unused`","range":{"end":{"character":30,"line":2},"start":{"character":24,"line":2}},"severity":2,"source":"rustc"},{"code":"unused_variables","message":"unused variable: `test_val`\n\nhelp: consider using `_test_val` instead: `_test_val`","range":{"end":{"character":36,"line":9},"start":{"character":28,"line":9}},"severity":2,"source":"rustc"}],"uri":"file:///C:/projects/rust/build/x86_64-pc-windows-msvc/stage2-tools/x86_64-pc-windows-msvc/rlsit/t2/simple_workspace/library/src/lib.rs"}}Content-Length: 444
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"E0425","message":"cannot find function `fetch_u32` in module `library`\n\nnot found in `library`","range":{"end":{"character":53,"line":4},"start":{"character":44,"line":4}},"severity":1,"source":"rustc"}],"uri":"file:///C:/projects/rust/build/x86_64-pc-windows-msvc/stage2-tools/x86_64-pc-windows-msvc/rlsit/t2/simple_workspace/binary/src/main.rs"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_4","title":"Indexing"}}
    ---------------
    
    
    failures:
        cmd_changing_workspace_lib_retains_bin_diagnostics
    
    test result: FAILED. 12 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
    
    error: test failed, to rerun pass '--test tests'
    
  • Prepare beta 1.33.0, take 2 rust#57696 (comment) (Linux, 2019-01-17T18:20:11Z)

    cmd_changing_workspace_lib_retains_bin_diagnostics
    ---- cmd_changing_workspace_lib_retains_bin_diagnostics stdout ----
    thread 'cmd_changing_workspace_lib_retains_bin_diagnostics' panicked at 'expected bin error diagnostic', src/libcore/option.rs:1038:5
    note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
    ---rls-stdout---
    Content-Length: 605
    
    {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".",":"]},"definitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{"resolveProvider":false},"documentFormattingProvider":true,"documentRangeFormattingProvider":false,"renameProvider":true,"executeCommandProvider":{"commands":["rls.applySuggestion-1346","rls.deglobImports-1346"]}}}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","title":"Building"}}Content-Length: 122
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"library cfg(test)","title":"Building"}}Content-Length: 112
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"library","title":"Building"}}Content-Length: 111
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"binary","title":"Building"}}Content-Length: 121
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_1","message":"binary cfg(test)","title":"Building"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_1","title":"Building"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_0","title":"Indexing"}}Content-Length: 493
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"unused_variables","message":"unused variable: `val`\n\nnote: #[warn(unused_variables)] on by default\nhelp: consider using `_val` instead: `_val`","range":{"end":{"character":27,"line":4},"start":{"character":24,"line":4}},"severity":2,"source":"rustc"}],"uri":"file:///checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/rlsit/t2/simple_workspace/binary/src/main.rs"}}Content-Length: 733
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"unused_variables","message":"unused variable: `unused`\n\nnote: #[warn(unused_variables)] on by default\nhelp: consider using `_unused` instead: `_unused`","range":{"end":{"character":30,"line":2},"start":{"character":24,"line":2}},"severity":2,"source":"rustc"},{"code":"unused_variables","message":"unused variable: `test_val`\n\nhelp: consider using `_test_val` instead: `_test_val`","range":{"end":{"character":36,"line":9},"start":{"character":28,"line":9}},"severity":2,"source":"rustc"}],"uri":"file:///checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/rlsit/t2/simple_workspace/library/src/lib.rs"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_0","title":"Indexing"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","title":"Building"}}Content-Length: 112
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"library","title":"Building"}}Content-Length: 111
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"binary","title":"Building"}}Content-Length: 121
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"binary cfg(test)","title":"Building"}}Content-Length: 122
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_3","message":"library cfg(test)","title":"Building"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_3","title":"Building"}}Content-Length: 92
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"id":"progress_2","title":"Indexing"}}Content-Length: 444
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"E0425","message":"cannot find function `fetch_u32` in module `library`\n\nnot found in `library`","range":{"end":{"character":53,"line":4},"start":{"character":44,"line":4}},"severity":1,"source":"rustc"}],"uri":"file:///checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/rlsit/t2/simple_workspace/binary/src/main.rs"}}Content-Length: 681
    
    {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"unused_variables","message":"unused variable: `unused`\n\nnote: #[warn(unused_variables)] on by default\nhelp: consider using `_unused` instead: `_unused`","range":{"end":{"character":30,"line":2},"start":{"character":24,"line":2}},"severity":2,"source":"rustc"},{"code":"E0308","message":"mismatched types\n\nexpected u32, found u64","range":{"end":{"character":62,"line":9},"start":{"character":44,"line":9}},"severity":1,"source":"rustc"}],"uri":"file:///checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/rlsit/t2/simple_workspace/library/src/lib.rs"}}Content-Length: 104
    
    {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_2","title":"Indexing"}}
    ---------------
    
    
    failures:
        cmd_changing_workspace_lib_retains_bin_diagnostics
    
    test result: FAILED. 12 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
    

@Xanewok
Copy link
Member Author

Xanewok commented Jun 9, 2019

I believe this is fixed with #1482 so closing.

@Xanewok Xanewok closed this as completed Jun 9, 2019
@mati865
Copy link
Contributor

mati865 commented Jun 11, 2019

Still not fixed after upgrading RLS in Rust repo.
This time client_completion_suggests_arguments_in_statements failed: https://api.travis-ci.com/v3/job/206910225/log.txt

@RalfJung
Copy link
Member

See rust-lang/rust#62225 for a dozen more occurrences of this since the issue got closed. Definitely not fixed.

@Centril
Copy link

Centril commented Jun 29, 2019

I think rust-lang/rust#62209 (comment) is also an instance of this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants