[llvm] Allow specifying libcxx builder image. (PR #110303)

Louis Dionne via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 09:14:16 PDT 2024


ldionne wrote:

@Michael137 The LLDB data formatter tests are failing with this patch, see https://github.com/llvm/llvm-project/actions/runs/11484654125/job/31974962709?pr=110303. Gist of the error:

```
AssertionError: False is not true : launch failed (Cannot launch '/__w/.../lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.test_subtleFrames/a.out': personality set failed: Operation not permitted)
```

<details>
  <summary>Full error</summary>

  ```shell
  -- Testing: 1208 tests, 32 workers --
    Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
    FAIL: lldb-api :: tools/lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.py (1207 of 1208)
    ******************** TEST 'lldb-api :: tools/lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.py' FAILED ********************
    Script:
    --
    /usr/bin/python3.10 /__w/llvm-project/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/__w/llvm-project/llvm-project/build/bootstrapping-build/./lib --env LLVM_INCLUDE_DIR=/__w/llvm-project/llvm-project/build/bootstrapping-build/include --env LLVM_TOOLS_DIR=/__w/llvm-project/llvm-project/build/bootstrapping-build/./bin --libcxx-include-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/include/c++/v1 --libcxx-include-target-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/include/x86_64-pc-linux-gnu/c++/v1 --libcxx-library-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/./lib/x86_64-pc-linux-gnu --arch x86_64 --build-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex --lldb-module-cache-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /__w/llvm-project/llvm-project/build/bootstrapping-build/./bin/lldb --compiler /__w/llvm-project/llvm-project/build/bootstrapping-build/./bin/clang --dsymutil /__w/llvm-project/llvm-project/build/bootstrapping-build/./bin/dsymutil --make /usr/bin/make --llvm-tools-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/./bin --lldb-obj-root /__w/llvm-project/llvm-project/build/bootstrapping-build/tools/lldb --lldb-libs-dir /__w/llvm-project/llvm-project/build/bootstrapping-build/./lib --category libc++ /__w/llvm-project/llvm-project/lldb/test/API/tools/lldb-dap/stackTrace/subtleFrames -p TestDAP_subtleFrames.py
    --
    Exit Code: 1
    
    Command Output (stdout):
    --
    lldb version 20.0.0git (https://github.com/llvm/llvm-project revision f114c52ffa919748cbe034d6e9acd971aa2d783a)
      clang revision f114c52ffa919748cbe034d6e9acd971aa2d783a
      llvm revision f114c52ffa919748cbe034d6e9acd971aa2d783a
    Skipping the following test categories: ['dsym', 'gmodules', 'debugserver', 'objc']
    ========= DEBUG ADAPTER PROTOCOL LOGS =========
    1729721465.380973816 --> 
    Content-Length: 344
    
    {
      "arguments": {
        "adapterID": "lldb-native",
        "clientID": "vscode",
        "columnsStartAt1": true,
        "linesStartAt1": true,
        "locale": "en-us",
        "pathFormat": "path",
        "sourceInitFile": false,
        "supportsRunInTerminalRequest": true,
        "supportsStartDebuggingRequest": true,
        "supportsVariablePaging": true,
        "supportsVariableType": true
      },
      "command": "initialize",
      "seq": 1,
      "type": "request"
    }
    1729721465.383299589 <-- 
    Content-Length: 1585
    
    {
      "body": {
        "__lldb": {
          "version": "lldb version 20.0.0git (https://github.com/llvm/llvm-project revision f114c52ffa919748cbe034d6e9acd971aa2d783a)\n  clang revision f114c52ffa919748cbe034d6e9acd971aa2d783a\n  llvm revision f114c52ffa919748cbe034d6e9acd971aa2d783a"
        },
        "completionTriggerCharacters": [
          ".",
          " ",
          "\t"
        ],
        "exceptionBreakpointFilters": [
          {
            "default": false,
            "filter": "cpp_catch",
            "label": "C++ Catch"
          },
          {
            "default": false,
            "filter": "cpp_throw",
            "label": "C++ Throw"
          },
          {
            "default": false,
            "filter": "objc_catch",
            "label": "Objective-C Catch"
          },
          {
            "default": false,
            "filter": "objc_throw",
            "label": "Objective-C Throw"
          }
        ],
        "supportTerminateDebuggee": true,
        "supportsCompletionsRequest": true,
        "supportsConditionalBreakpoints": true,
        "supportsConfigurationDoneRequest": true,
        "supportsDataBreakpoints": true,
        "supportsDelayedStackTraceLoading": true,
        "supportsDisassembleRequest": true,
        "supportsEvaluateForHovers": true,
        "supportsExceptionInfoRequest": true,
        "supportsExceptionOptions": true,
        "supportsFunctionBreakpoints": true,
        "supportsGotoTargetsRequest": false,
        "supportsHitConditionalBreakpoints": true,
        "supportsInstructionBreakpoints": true,
        "supportsLoadedSourcesRequest": false,
        "supportsLogPoints": true,
        "supportsModulesRequest": true,
        "supportsProgressReporting": true,
        "supportsReadMemoryRequest": true,
        "supportsRestartFrame": false,
        "supportsRestartRequest": true,
        "supportsRunInTerminalRequest": true,
        "supportsSetVariable": true,
        "supportsStepBack": false,
        "supportsStepInTargetsRequest": true,
        "supportsSteppingGranularity": true,
        "supportsValueFormattingOptions": true
      },
      "command": "initialize",
      "request_seq": 1,
      "seq": 0,
      "success": true,
      "type": "response"
    }
    1729721465.383833170 --> 
    Content-Length: 900
    
    {
      "arguments": {
        "commandEscapePrefix": null,
        "disableASLR": true,
        "displayExtendedBacktrace": false,
        "enableAutoVariableSummaries": false,
        "enableSyntheticChildDebugging": false,
        "initCommands": [
          "settings clear -all",
          "settings set symbols.enable-external-lookup false",
          "settings set target.inherit-tcc true",
          "settings set target.disable-aslr false",
          "settings set target.detach-on-error false",
          "settings set target.auto-apply-fixits false",
          "settings set plugin.process.gdb-remote.packet-timeout 60",
          "settings set symbols.clang-modules-cache-path \"/__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"",
          "settings set use-color false"
        ],
        "program": "/__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex/tools/lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.test_subtleFrames/a.out"
      },
      "command": "launch",
      "seq": 2,
      "type": "request"
    }
    1729721465.384315491 <-- 
    Content-Length: 106
    
    {
      "body": {
        "category": "console",
        "output": "Running initCommands:\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384341478 <-- 
    Content-Length: 111
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings clear -all\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384360790 <-- 
    Content-Length: 141
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set symbols.enable-external-lookup false\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384387016 <-- 
    Content-Length: 128
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set target.inherit-tcc true\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384403944 <-- 
    Content-Length: 130
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set target.disable-aslr false\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384418964 <-- 
    Content-Length: 133
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set target.detach-on-error false\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384435415 <-- 
    Content-Length: 135
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set target.auto-apply-fixits false\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384450674 <-- 
    Content-Length: 148
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384467602 <-- 
    Content-Length: 249
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set symbols.clang-modules-cache-path \"/__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.384484768 <-- 
    Content-Length: 120
    
    {
      "body": {
        "category": "console",
        "output": "(lldb) settings set use-color false\n"
      },
      "event": "output",
      "seq": 0,
      "type": "event"
    }
    1729721465.475079060 <-- 
    Content-Length: 320
    
    {
      "command": "launch",
      "message": "Cannot launch '/__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex/tools/lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.test_subtleFrames/a.out': personality set failed: Operation not permitted",
      "request_seq": 2,
      "seq": 0,
      "success": false,
      "type": "response"
    }
    1729721465.475131273 <-- 
    Content-Length: 46
    
    {
      "event": "initialized",
      "seq": 0,
      "type": "event"
    }
    1729721465.482665062 --> 
    Content-Length: 88
    
    {
      "arguments": {
        "terminateDebuggee": true
      },
      "command": "disconnect",
      "seq": 3,
      "type": "request"
    }
    1729721465.483467817 <-- 
    Content-Length: 1290
    
    {
      "event": "terminated",
      "seq": 0,
      "statistics": {
        "commands": "{\"settings clear\":1}",
        "memory": "{\"strings\":{\"bytesTotal\":1011712,\"bytesUnused\":977290,\"bytesUsed\":34422}}",
        "targets": "[{\"breakpoints\":[],\"dyldPluginName\":\"posix-dyld\",\"expressionEvaluation\":{\"failures\":0,\"successes\":0},\"frameVariable\":{\"failures\":0,\"successes\":0},\"launchOrAttachTime\":0.093175982000000004,\"moduleIdentifiers\":[93901650622048],\"signals\":[],\"sourceMapDeduceCount\":0,\"sourceRealpathAttemptCount\":0,\"sourceRealpathCompatibleCount\":0,\"stopCount\":1,\"summaryProviderStatistics\":[],\"targetCreateTime\":0.00026899999999999998,\"totalBreakpointResolveTime\":0,\"totalSharedLibraryEventHitCount\":0}]",
        "totalDebugInfoByteSize": 105315,
        "totalDebugInfoEnabled": 1,
        "totalDebugInfoIndexLoadedFromCache": 0,
        "totalDebugInfoIndexSavedToCache": 0,
        "totalDebugInfoIndexTime": 0.0022790000000000002,
        "totalDebugInfoParseTime": 0.00053600000000000002,
        "totalModuleCount": 1,
        "totalModuleCountHasDebugInfo": 1,
        "totalModuleCountWithIncompleteTypes": 0,
        "totalModuleCountWithVariableErrors": 0,
        "totalSymbolTableIndexTime": 0.00069200000000000002,
        "totalSymbolTableParseTime": 0.00090600000000000001,
        "totalSymbolTableStripped": 0,
        "totalSymbolTablesLoadedFromCache": 0,
        "totalSymbolTablesSavedToCache": 0
      },
      "type": "event"
    }
    1729721465.483519793 <-- 
    Content-Length: 81
    
    {
      "command": "disconnect",
      "request_seq": 3,
      "seq": 0,
      "success": true,
      "type": "response"
    }
    
    ========= END =========
    
    --
    Command Output (stderr):
    --
    FAIL: LLDB (/__w/llvm-project/llvm-project/build/bootstrapping-build/bin/clang-x86_64) :: test_subtleFrames (TestDAP_subtleFrames.TestDAP_subtleFrames)
    ======================================================================
    FAIL: test_subtleFrames (TestDAP_subtleFrames.TestDAP_subtleFrames)
      Internal stack frames (such as the ones used by `std::function`) are marked as "subtle".
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/__w/llvm-project/llvm-project/lldb/test/API/tools/lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.py", line 20, in test_subtleFrames
        self.build_and_launch(program)
      File "/__w/llvm-project/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py", line 485, in build_and_launch
        return self.launch(
      File "/__w/llvm-project/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py", line 442, in launch
        self.assertTrue(
    AssertionError: False is not true : launch failed (Cannot launch '/__w/llvm-project/llvm-project/build/bootstrapping-build/lldb-test-build.noindex/tools/lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.test_subtleFrames/a.out': personality set failed: Operation not permitted)
    Config=x86_64-/__w/llvm-project/llvm-project/build/bootstrapping-build/bin/clang
    ----------------------------------------------------------------------
    Ran 1 test in 1.726s
    
    FAILED (failures=1)
    Failures per category:
    libc++ - 1
    lldb-dap - 1
    
    --
    
    ********************
    Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
    ********************
    Failed Tests (1):
      lldb-api :: tools/lldb-dap/stackTrace/subtleFrames/TestDAP_subtleFrames.py
  ```
</details>

What's special about this patch is that we're running the CI inside a Docker VM that's running inside another Docker VM.

https://github.com/llvm/llvm-project/pull/110303


More information about the llvm-commits mailing list