<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>60310</bug_id>
          
          <creation_ts>2026-08-28 16:02:31 +0300</creation_ts>
          <short_desc>ocamllsp --stdio не отвечает на LSP-запрос initialize, падает с Deadlock</short_desc>
          <delta_ts>2026-08-29 23:33:56 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>ocaml-lsp</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Цой Павел Денисович">tsojpd</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>293301</commentid>
    <comment_count>0</comment_count>
    <who name="Цой Павел Денисович">tsojpd</who>
    <bug_when>2026-08-28 16:02:31 +0300</bug_when>
    <thetext>Пакеты:
ocaml-lsp-1.27.0-alt1
ocaml-5.5.0-alt1
dune-3.24.2-alt1

Стенды:
Server 11.1
Workstation 11.2
Workstation K 11.4
Education KDE 11.2
Education XFCE 11.2

Шаги воспроизведения:
1. $ mkdir -p /tmp/lsp-test/src &amp;&amp; cd /tmp/lsp-test
2. $ printf &apos;(lang dune 3.22)\n(name lsp-test)\n&apos; &gt; dune-project
3. $ printf &apos;(executables (names main))\n&apos; &gt; src/dune
4. $ printf &apos;let () = Printf.printf &quot;Hello\\n&quot;\n&apos; &gt; src/main.ml
5. $ dune build
6. $ (echo &apos;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;initialize&quot;,&quot;params&quot;:{&quot;processId&quot;:null,&quot;rootUri&quot;:&quot;file:///tmp/lsp-test&quot;,&quot;capabilities&quot;:{}}}&apos;; sleep 5) | timeout 8 ocamllsp --stdio

Ожидаемый результат: Возвращает JSON-RPC ответ с capabilities и initialize

Реальный результат:  сервер падает с Deadlock в stdune при старте/обработке initialize, не возвращая ответ. 
/-----------------------------------------------------------------------
| Internal error: Uncaught exception.
| (&quot;Deadlock&quot;, {})
| Raised at Stdune__Code_error.raise in file &quot;otherlibs/stdune/src/code_error.ml&quot;, line 10, characters 30-62
| Called from Stdune__Exn_with_backtrace.try_with in file &quot;otherlibs/stdune/src/exn_with_backtrace.ml&quot;, line 9, characters 8-12
\-----------------------------------------------------------------------</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293494</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2026-08-29 23:33:56 +0300</bug_when>
    <thetext>ocaml-lsp-1.27.0-alt2 -&gt; sisyphus:

Sun Aug 30 2026 Anton Farygin &lt;rider@altlinux&gt; 1.27.0-alt2
- added requirement on ocamlformat-rpc: without it ocamllsp deadlocks on
  session shutdown before initialize (closes: 60310)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>