)]}'
{
  "commit": "cbf8d4776281443192b1cb34f52e2bb2b0d7984b",
  "tree": "e3999ce07f0b47271c83e267caa974316696abe2",
  "parents": [
    "a12fee9956e5e073ede9c32f2ee6bf21f0c83162"
  ],
  "author": {
    "name": "Fabian Meumertzheim",
    "email": "fabian@meumertzhe.im",
    "time": "Mon Oct 26 10:50:49 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Oct 26 10:52:33 2026 -0700"
  },
  "message": "Fix three causes of spurious shell integration test failures (#32056)\n\n### Description\n\nThis fixes three causes of spurious failures of `//src/test/shell/bazel:external_integration_test`:\n\n* `test_deferred_download_smoke` and `test_deferred_download_two_parallel_downloads` serve fixed payloads with a known checksum. Once a run has stored them in a repository cache that outlives it, later runs get them from the cache without contacting the test server, so the test blocks forever writing to the fifo that the server would have read and times out. The payloads now contain a random suffix.\n* `test_http_timeout` depends on what the kernel does with connections beyond the listen backlog of the single-threaded test server, whose only handler never returns. Linux and macOS 15 drop them silently, so Bazel reports a connect timeout. On macOS 27, which has SYN cookies enabled by default, the handshake completes and the connection is then reset, so every download attempt fails with \"Connection reset by peer\" and \"timed out\" never appears in the log. In `timeout` mode, the server now handles every connection in its own thread so that each attempt times out reading the response.\n* Bash builds that use libintl, such as Homebrew\u0027s bash 5.3, can crash with SIGSEGV in a forked subshell when they restore their own locale after a temporary assignment such as `LC_ALL\u003dC cmd`, since libintl then looks up the preferred languages through CoreFoundation, which isn\u0027t fork-safe. This happens in the `timestamp` function of `unittest.bash`, which then fails the test without any output before `set_up` runs, and in the same way in `generate-xml.sh`. Both now set `LC_ALL` via `env`, which leaves the locale of bash itself untouched.\n\n### Motivation\n\nAll three fail locally on macOS 27 with `--test_env\u003dREPOSITORY_CACHE\u003d$(bazel info repository_cache)`: the first two tests every time, the bash crash intermittently. In a stress test, 4 of 48 Homebrew bash processes crashed in every subshell that ran `LC_ALL\u003dC python3 -c pass` in a function, and none did with `env LC_ALL\u003dC`. CI wipes the repository cache before every job, so there the deferred download tests can only hang when a flaky attempt is retried within the same job.\n\n### Build API Changes\n\nNo\n\n### Release Notes\n\nRELNOTES: None\n\nCloses #32056\n\nCOPYBARA_INTEGRATE_REVIEW\u003dhttps://github.com/bazelbuild/bazel/pull/32056 from fmeum:fix-local-external-test-failures 70c6cdbd450bf2ab16101922009ba5ab2ea950d9\nPiperOrigin-RevId: 1007393679\nChange-Id: Ib62aabbc5ad716a4650af643af7c4136c9cff56f\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7e9b7ed1a00edb783b493e42d6269a7801b81229",
      "old_mode": 33261,
      "old_path": "src/test/shell/bazel/external_integration_test.sh",
      "new_id": "dc2c959ea084306d209df2e41a5b886ad1f6cccc",
      "new_mode": 33261,
      "new_path": "src/test/shell/bazel/external_integration_test.sh"
    },
    {
      "type": "modify",
      "old_id": "76210fb2e3ea1b1b19c3203a5a6bd0a22196bfb2",
      "old_mode": 33188,
      "old_path": "src/test/shell/bazel/testing_server.py",
      "new_id": "4e2a106c8502c751ca4b8a531237e2291088276d",
      "new_mode": 33188,
      "new_path": "src/test/shell/bazel/testing_server.py"
    },
    {
      "type": "modify",
      "old_id": "7066ebea31c804ea37ac696c11295ca11c159fa1",
      "old_mode": 33188,
      "old_path": "src/test/shell/unittest.bash",
      "new_id": "f5bd827f8e1a9330e287d5df9fb37e0e899170ae",
      "new_mode": 33188,
      "new_path": "src/test/shell/unittest.bash"
    },
    {
      "type": "modify",
      "old_id": "5829aca05120d922b8db6ab056cdd412bfef3786",
      "old_mode": 33261,
      "old_path": "tools/test/generate-xml.sh",
      "new_id": "3b58dec8973037b668ae2fc35068a672e482a1fa",
      "new_mode": 33261,
      "new_path": "tools/test/generate-xml.sh"
    }
  ]
}
