Skip to content

Deadlock error (Errno::EDEADLK) when it tries to make a completion. #760

@CiiDub

Description

@CiiDub

Solargraph 0.51.2 with BBEdit 15.1.4 as the client.

I can't think of a change I made to my system or configuration before this started happening.

I thought it might have to do with my config but I removed it and the same problem persists.

Here I am editing a file on my desktop. Every time Solargraph tries to do a completion my editor locks up for a 5 or 10 seconds.

The log records this:

2025-02-26 21:43:54.694: Error returned from LSP completion request: Error Domain=LSPResponseError Code=-32603 "[Errno::EDEADLK] Resource deadlock avoided - /Users/chris/Library/Mobile Documents/com~apple~system~spotlight/mdlabels/com.apple.finder.legacy.mdlabels" UserInfo={NSLocalizedDescription=[Errno::EDEADLK] Resource deadlock avoided - /Users/chris/Library/Mobile Documents/com~apple~system~spotlight/mdlabels/com.apple.finder.legacy.mdlabels}
2025-02-26 21:55:15.760: stderr output from server: [WARN] Error processing request: [Errno::EDEADLK] Resource deadlock avoided - /Users/chris/Library/Mobile Documents/com~apple~system~spotlight/mdlabels/com.apple.finder.legacy.mdlabels
[WARN] <internal:dir>:223:in `[]'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:175:in `block in process_globs'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:174:in `each'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:174:in `flat_map'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:174:in `process_globs'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:33:in `included'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:24:in `initialize'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:40:in `new'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:40:in `config'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:203:in `require_plugins'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:35:in `initialize'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/library.rb:22:in `new'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/library.rb:22:in `initialize'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:106:in `new'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:106:in `generic_library'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:100:in `generic_library_for'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:43:in `library_for'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host.rb:518:in `completions_at'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/message/text_document/completion.rb:14:in `process'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host.rb:112:in `receive'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/message_worker.rb:53:in `tick'
/Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/message_worker.rb:44:in `block in start'

2025-02-26 21:55:15.760: completion results for partial symbol: hel 
 (null)

2025-02-26 21:55:15.760: Error returned from LSP completion request: Error Domain=LSPResponseError Code=-32603 "[Errno::EDEADLK] Resource deadlock avoided - /Users/chris/Library/Mobile Documents/com~apple~system~spotlight/mdlabels/com.apple.finder.legacy.mdlabels" UserInfo={NSLocalizedDescription=[Errno::EDEADLK] Resource deadlock avoided - /Users/chris/Library/Mobile Documents/com~apple~system~spotlight/mdlabels/com.apple.finder.legacy.mdlabels}

Here is the server startup:

2025-02-26 21:39:51.701: Application startup: 15.1.4 (15B64)
2025-02-26 21:39:51.701: macOS version 15.3.1 (24D70)
2025-02-26 21:39:51.701: Stopping server for configuration change.
2025-02-26 21:39:51.703: No workspaces found, will use startup document parent folder: file:///Users/chris/Desktop/
2025-02-26 21:39:51.704: Initialization parameters sent to server: {
    capabilities =     {
        textDocument =         {
            codeAction =             {
                codeActionLiteralSupport =                 {
                    codeActionKind =                     {
                        valueSet =                         (
                            info,
                            quickfix,
                            refactor,
                            source
                        );
                    };
                };
            };
            completion =             {
                completionItem =                 {
                    deprecatedSupport = 1;
                    documentationFormat =                     (
                        markdown,
                        plaintext
                    );
                    insertReplaceSupport = 1;
                    insertTextModeSupport =                     {
                        valueSet =                         (
                            1,
                            2
                        );
                    };
                    preselectSupport = 1;
                    snippetSupport = 1;
                };
            };
            documentSymbol =             {
                hierarchicalDocumentSymbolSupport = 1;
                labelSupport = 1;
            };
            hover =             {
                contentFormat =                 (
                    markdown,
                    plaintext
                );
            };
            onTypeFormatting =             {
            };
            publishDiagnostics =             {
                categorySupport = 1;
                codeActionsInline = 1;
                codeDescription = 1;
                dataSupport = 1;
                relatedInformation = 1;
            };
            rename =             {
                prepareSupport = 1;
                prepareSupportDefaultBehavior = 1;
            };
            signatureHelp =             {
                signatureInformation =                 {
                    activeParameterSupport = 1;
                    documentationFormat =                     (
                        markdown,
                        plaintext
                    );
                    parameterInformation =                     {
                        labelOffsetSupport = 1;
                    };
                };
            };
            synchronization =             {
                didSave = 1;
                willSave = 1;
            };
        };
        workspace =         {
            applyEdit = 1;
            configuration = 1;
            workspaceEdit =             {
                documentChanges = 0;
                failureHandling = abort;
            };
            workspaceFolders = 1;
        };
    };
    clientInfo =     {
        name = BBEdit;
        version = "15.1.4";
    };
    initializationOptions =     {
        diagnostics = 1;
    };
    rootUri = "file:///Users/chris/Desktop/";
    trace = verbose;
    workspaceFolders =     (
    );
}
2025-02-26 21:39:51.704: Starting server, command: solargraph, arguments: (
    stdio
)
2025-02-26 21:39:51.704: Waiting for server startup to complete...
2025-02-26 21:39:52.144: stderr output from server: Solargraph is listening on stdio PID=4792

2025-02-26 21:39:52.197: server startup response: {
    capabilities =     {
        completionProvider =         {
            resolveProvider = 1;
            triggerCharacters =             (
                ".",
                ":",
                "@"
            );
        };
        definitionProvider = 1;
        documentHighlightProvider = 1;
        documentSymbolProvider = 1;
        foldingRangeProvider = 1;
        hoverProvider = 1;
        referencesProvider = 1;
        renameProvider =         {
            prepareProvider = 1;
        };
        signatureHelpProvider =         {
            triggerCharacters =             (
                "(",
                ","
            );
        };
        textDocumentSync = 2;
        workspace =         {
            workspaceFolders =             {
                changeNotifications = 1;
                supported = 1;
            };
        };
        workspaceSymbolProvider = 1;
    };
}
2025-02-26 21:39:52.197: ...completed server startup.
2025-02-26 21:40:07.006: stderr output from server: #<Thread:0x00000001284e7248 /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/diagnoser.rb:45 run> terminated with exception (report_on_exception is true):
<internal:dir>:223:in `[]': Resource deadlock avoided - /Users/chris/Library/Mobile Documents/com~apple~system~spotlight/mdlabels/com.apple.finder.legacy.mdlabels (Errno::EDEADLK)
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:175:in `block in process_globs'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:174:in `each'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:174:in `flat_map'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:174:in `process_globs'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:33:in `included'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace/config.rb:24:in `initialize'

2025-02-26 21:40:07.006: stderr output from server: 	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:40:in `new'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:40:in `config'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:203:in `require_plugins'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/workspace.rb:35:in `initialize'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/library.rb:22:in `new'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/library.rb:22:in `initialize'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:106:in `new'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:106:in `generic_library'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:100:in `generic_library_for'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/dispatch.rb:43:in `library_for'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host.rb:211:in `diagnose'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/diagnoser.rb:66:in `tick'
	from /Users/chris/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/solargraph-0.51.2/lib/solargraph/language_server/host/diagnoser.rb:47:in `block in start'

My config:

include:
- "**/*.rb"
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
- ".bundle/**/*"
require: []
domains: []
reporters:
- rubocop
# - require_not_found
formatter:
  rubocop:
    cops: safe
    except: []
    only: []
    extra_args: []
require_paths: []
plugins: []
max_files: 5000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions