<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/111061>111061</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [lldb] TestDAP_optimized.test_optimized_variable intermittently fails
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lldb-dap
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          augusto2112
      </td>
    </tr>
</table>

<pre>
    The mentioned test will almost always fail with the following stack trace:

```
Traceback (most recent call last):
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py", line 45, in test_optimized_variable
    optimized_variable = self.dap_server.get_local_variable("argc")
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 492, in get_local_variable
    locals = self.get_local_variables(
 File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 482, in get_local_variables
    return self.get_scope_variables(
 File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 467, in get_scope_variables
    variables_response = self.request_variables(varRef, is_hex=is_hex)
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 1095, in request_variables
    return self.send_recv(command_dict)
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 326, in send_recv
    raise ValueError(desc)
ValueError: no response for "variables"
Config=x86_64-/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/lldb-build/bin/clang
======================================================================
ERROR: test_optimized_variable (TestDAP_optimized.TestDAP_optimized)
   Test optimized variable value contains error.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2030, in tearDown
    Base.tearDown(self)
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1100, in tearDown
    hook()  # try the plain call and hope it works
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py", line 401, in cleanup
 self.dap_server.request_disconnect(terminateDebuggee=True)
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 674, in request_disconnect
    return self.send_recv(command_dict)
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 320, in send_recv
    self.send_packet(command)
  File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py", line 275, in send_packet
    self.send.flush()
BrokenPipeError: [Errno 32] Broken pipe
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkmEGP6jYQxz-NuVigZAwkOeSw-7JIPXW12vaKHGdI_DB2ajvw6KevHAJBsEit9KRutyu0cuxhkv_P45kh3DlZa8ScLJ7JopjwzjfG5ryrO-cNxDFMSlMd8_cG6Q61l0ZjRT06Tw9SKcrVzjhPuTrwo6MbLhU9SN9Q3yDdGKXMQeqaOs_FlnrLBRL2RKKCROf_y2j49JfvwaQMxgT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