Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 1ddd3438 by Simon Jakobi at 2026-07-24T13:54:40-04:00 ci: Use shallow submodule clones by default Limit submodule clones to depth one to reduce CI checkout costs. Keep fetching full submodule history for the submodule lint jobs, which inspect commits across a range. Assisted-by: gpt-5.6-sol via Codex CLI - - - - - 878455b2 by Duncan Coutts at 2026-07-24T13:54:41-04:00 Fix flaky test T3994 on FreeBSD On current FreeBSD versions, calling getpgid on a zombie process fails. In T3994, if we're really unlucky with delays and scheduling then we can end up in exactly that situation. Just catch that specific exception and ignore it. It's rare, and not our fault. - - - - - f0ae5111 by Cheng Shao at 2026-07-24T13:54:42-04:00 ci: add missing workaround for docker permissions in lint jobs Some lint jobs use ci-images with default user `ghc`, and the gitlab ci docker executor requires the `sudo chown` workaround to fix workspace directory permission issue. This patch adds the missing workarounds for the lint jobs. Fixes #27554. Co-authored-by: Codex <codex@openai.com> - - - - - 2 changed files: - .gitlab-ci.yml - testsuite/tests/process/T3994.hs Changes: ===================================== .gitlab-ci.yml ===================================== @@ -23,6 +23,10 @@ variables: # Always start with a fresh clone to avoid non-hermetic builds GIT_STRATEGY: clone + # Shallow submodule clones. Overridden by individual jobs that need deeper + # submodule history. + GIT_SUBMODULE_DEPTH: 1 + # Overridden by individual jobs CONFIGURE_ARGS: "" @@ -262,7 +266,8 @@ lint-changelog: GIT_SUBMODULE_STRATEGY: none before_script: - export PATH="/opt/toolchain/bin:$PATH" - - git config --global --add safe.directory "$CI_PROJECT_DIR" + # workaround for docker permissions + - sudo chown ghc:ghc -R . script: - .gitlab/ci.sh lint_changelog dependencies: [] @@ -279,6 +284,9 @@ lint-linters: variables: GIT_DEPTH: 1 GIT_SUBMODULE_STRATEGY: none + before_script: + # workaround for docker permissions + - sudo chown ghc:ghc -R . script: - mypy testsuite/tests/linters/regex-linters/*.py dependencies: [] @@ -290,6 +298,9 @@ lint-testsuite: variables: GIT_DEPTH: 1 GIT_SUBMODULE_STRATEGY: none + before_script: + # workaround for docker permissions + - sudo chown ghc:ghc -R . script: - make -Ctestsuite list_broken TEST_HC=$GHC dependencies: [] @@ -301,6 +312,9 @@ typecheck-testsuite: variables: GIT_DEPTH: 1 GIT_SUBMODULE_STRATEGY: none + before_script: + # workaround for docker permissions + - sudo chown ghc:ghc -R . script: - mypy testsuite/driver/runtests.py dependencies: [] @@ -313,6 +327,7 @@ typecheck-testsuite: extends: .lint-params variables: BUILD_FLAVOUR: default + GIT_SUBMODULE_DEPTH: 0 # full history script: - .gitlab/ci.sh configure - .gitlab/ci.sh run_hadrian stage0:exe:lint-submodule-refs @@ -330,6 +345,9 @@ lint-author: extends: .lint variables: GIT_SUBMODULE_STRATEGY: none + before_script: + # workaround for docker permissions + - sudo chown ghc:ghc -R . script: - git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)" ===================================== testsuite/tests/process/T3994.hs ===================================== @@ -1,7 +1,10 @@ module Main where import Control.Concurrent +import Control.Exception +import Control.Monad import System.IO +import System.IO.Error import System.Process main :: IO () @@ -9,14 +12,24 @@ main = do (_,Just hout,_,p) <- createProcess (proc "./T3994app" ["start", "10000 { std_out = CreatePipe, create_group = True } start <- hGetLine hout putStrLn start - interruptProcessGroupOf p - t <- myThreadId - -- timeout - forkIO $ do - threadDelay 5000000 - putStrLn "Interrupting a Running Process Failed" - hFlush stdout - killThread t - waitForProcess p + + -- On FreeBSD if we're _really_ unlucky with scheduling, then the + -- call to interruptProcessGroupOf can fail due to the process + -- having already terminated (despite it running for at least 10ms!) + -- If so, we just skip doing anything rather than fail the test, + -- since this isn't our fault and is rare and scheduling dependent. + -- See #27512 and https://reviews.freebsd.org/D58393 + handleJust (guard . isDoesNotExistError) (\_ -> return ()) $ do + interruptProcessGroupOf p + t <- myThreadId + -- timeout + forkIO $ do + threadDelay 5000000 + putStrLn "Interrupting a Running Process Failed" + hFlush stdout + killThread t + waitForProcess p + return () + putStrLn "end" return () View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/801a42be8fdb807ee59f694707a0d90... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/801a42be8fdb807ee59f694707a0d90... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help