From b990fb305fc450f97b87b78a797ca6a847b7dac9 Mon Sep 17 00:00:00 2001 From: "erwan.viollet" Date: Fri, 26 Jun 2026 15:59:10 +0200 Subject: [PATCH 1/4] Fix artifact upload permissions in musl aarch64 CI job Docker containers create files as root, causing permission denied errors when GitHub Actions tries to read them during artifact zip creation. Add explicit chmod steps after container execution to ensure files are readable by the runner user. --- .github/workflows/test_workflow.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index 9b6032c7b0..c7758f0f0d 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -572,6 +572,13 @@ jobs: echo "musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64" >> failures_musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt exit 1 fi + - name: Fix permissions for artifact upload + if: always() + run: | + # Files created by Docker container may have restrictive permissions + # that prevent GitHub Actions from reading them during artifact creation + sudo chmod -R +r build/ 2>/dev/null || true + sudo find build/ -type d -exec chmod +x {} \; 2>/dev/null || true - name: Generate Unwinding Report if: success() && matrix.config == 'debug' run: | @@ -580,6 +587,9 @@ jobs: \"${{ github.sha }}\" \"musl/${{ matrix.java_version }}-${{ matrix.config }}-aarch64\" \ \"${{ matrix.config }}\" \"${{ env.JAVA_HOME }}\" \"${{ env.JAVA_TEST_HOME }}\" " + # Fix permissions after Docker container execution + sudo chmod -R +r ddprof-test/build/reports/ 2>/dev/null || true + sudo find ddprof-test/build/reports/ -type d -exec chmod +x {} \; 2>/dev/null || true - name: Add Unwinding Report to Job Summary if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != '' run: | From c1ba65d1b28fbb92fe3de401b2b137c7a7c9f18d Mon Sep 17 00:00:00 2001 From: "erwan.viollet" Date: Fri, 26 Jun 2026 16:29:37 +0200 Subject: [PATCH 2/4] Fix permissions on all build directories after Docker execution The unwinding report generation creates files in both top-level build/ and subproject build directories. Ensure all are readable by the runner. --- .github/workflows/test_workflow.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index c7758f0f0d..2b97140f66 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -577,8 +577,8 @@ jobs: run: | # Files created by Docker container may have restrictive permissions # that prevent GitHub Actions from reading them during artifact creation - sudo chmod -R +r build/ 2>/dev/null || true - sudo find build/ -type d -exec chmod +x {} \; 2>/dev/null || true + sudo chmod -R +r build/ ddprof-test/build/ ddprof-lib/build/ 2>/dev/null || true + sudo find build/ ddprof-test/build/ ddprof-lib/build/ -type d -exec chmod +x {} \; 2>/dev/null || true - name: Generate Unwinding Report if: success() && matrix.config == 'debug' run: | @@ -587,9 +587,9 @@ jobs: \"${{ github.sha }}\" \"musl/${{ matrix.java_version }}-${{ matrix.config }}-aarch64\" \ \"${{ matrix.config }}\" \"${{ env.JAVA_HOME }}\" \"${{ env.JAVA_TEST_HOME }}\" " - # Fix permissions after Docker container execution - sudo chmod -R +r ddprof-test/build/reports/ 2>/dev/null || true - sudo find ddprof-test/build/reports/ -type d -exec chmod +x {} \; 2>/dev/null || true + # Fix permissions after Docker container execution (both top-level and subproject builds) + sudo chmod -R +r build/ ddprof-test/build/ 2>/dev/null || true + sudo find build/ ddprof-test/build/ -type d -exec chmod +x {} \; 2>/dev/null || true - name: Add Unwinding Report to Job Summary if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != '' run: | From 09d00187d2795be1c1612bc296692660ffde4584 Mon Sep 17 00:00:00 2001 From: "erwan.viollet" Date: Sun, 28 Jun 2026 14:49:18 +0200 Subject: [PATCH 3/4] Remove silent error suppression and align chmod coverage - Remove 2>/dev/null to make chmod failures visible in logs - Add ddprof-lib/build/ to second chmod block for consistency - Keep || true for graceful handling of missing paths --- .github/workflows/test_workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index 2b97140f66..862a686e87 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -577,8 +577,8 @@ jobs: run: | # Files created by Docker container may have restrictive permissions # that prevent GitHub Actions from reading them during artifact creation - sudo chmod -R +r build/ ddprof-test/build/ ddprof-lib/build/ 2>/dev/null || true - sudo find build/ ddprof-test/build/ ddprof-lib/build/ -type d -exec chmod +x {} \; 2>/dev/null || true + sudo chmod -R +r build/ ddprof-test/build/ ddprof-lib/build/ || true + sudo find build/ ddprof-test/build/ ddprof-lib/build/ -type d -exec chmod +x {} \; || true - name: Generate Unwinding Report if: success() && matrix.config == 'debug' run: | @@ -588,8 +588,8 @@ jobs: \"${{ matrix.config }}\" \"${{ env.JAVA_HOME }}\" \"${{ env.JAVA_TEST_HOME }}\" " # Fix permissions after Docker container execution (both top-level and subproject builds) - sudo chmod -R +r build/ ddprof-test/build/ 2>/dev/null || true - sudo find build/ ddprof-test/build/ -type d -exec chmod +x {} \; 2>/dev/null || true + sudo chmod -R +r build/ ddprof-test/build/ ddprof-lib/build/ || true + sudo find build/ ddprof-test/build/ ddprof-lib/build/ -type d -exec chmod +x {} \; || true - name: Add Unwinding Report to Job Summary if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != '' run: | From 8a678daf103fe561a49e757f17ba857c1f86a392 Mon Sep 17 00:00:00 2001 From: "erwan.viollet" Date: Mon, 29 Jun 2026 16:34:08 +0200 Subject: [PATCH 4/4] Use umask-independent chmod and consolidate commands - Use 'a+rX' instead of '+r' (umask-independent) - Capital X adds execute only to directories - Consolidates two chmod commands into one - Update comments to explain the approach --- .github/workflows/test_workflow.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index 862a686e87..32274fb2b4 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -576,9 +576,9 @@ jobs: if: always() run: | # Files created by Docker container may have restrictive permissions - # that prevent GitHub Actions from reading them during artifact creation - sudo chmod -R +r build/ ddprof-test/build/ ddprof-lib/build/ || true - sudo find build/ ddprof-test/build/ ddprof-lib/build/ -type d -exec chmod +x {} \; || true + # that prevent GitHub Actions from reading them during artifact creation. + # Use a+rX (umask-independent) where X adds execute only to directories. + sudo chmod -R a+rX build/ ddprof-test/build/ ddprof-lib/build/ || true - name: Generate Unwinding Report if: success() && matrix.config == 'debug' run: | @@ -587,9 +587,9 @@ jobs: \"${{ github.sha }}\" \"musl/${{ matrix.java_version }}-${{ matrix.config }}-aarch64\" \ \"${{ matrix.config }}\" \"${{ env.JAVA_HOME }}\" \"${{ env.JAVA_TEST_HOME }}\" " - # Fix permissions after Docker container execution (both top-level and subproject builds) - sudo chmod -R +r build/ ddprof-test/build/ ddprof-lib/build/ || true - sudo find build/ ddprof-test/build/ ddprof-lib/build/ -type d -exec chmod +x {} \; || true + # Fix permissions after Docker container execution (both top-level and subproject builds). + # Use a+rX (umask-independent) where X adds execute only to directories. + sudo chmod -R a+rX build/ ddprof-test/build/ ddprof-lib/build/ || true - name: Add Unwinding Report to Job Summary if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != '' run: |