about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-06 23:15:20 +0100
committerGitHub <noreply@github.com>2022-01-06 23:15:20 +0100
commit0c9cf9a9ea10fdabf4b0866ccb2870bf6fdcc28f (patch)
tree5c2aea30cd95e3cb6f843561ea05867cf3bc768e
parent1591dcb659917de87254297073b078b9ade56612 (diff)
parent014f22abaf2ff2e08a4f03540756068426a63f49 (diff)
downloadrust-0c9cf9a9ea10fdabf4b0866ccb2870bf6fdcc28f.tar.gz
rust-0c9cf9a9ea10fdabf4b0866ccb2870bf6fdcc28f.zip
Rollup merge of #92589 - ChrisDenton:break-loop, r=Mark-Simulacrum
Break the loop

A missing break statement lead to an infinite loop in bootstrap.py.

I also added a short sleep so it's not constantly running at 100%. But I can remove that if it's not wanted.

Fixes #76661
-rw-r--r--src/bootstrap/bootstrap.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 5235a6b8180..7c36bb264c4 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -13,7 +13,7 @@ import sys
 import tarfile
 import tempfile
 
-from time import time
+from time import time, sleep
 
 # Acquire a lock on the build directory to make sure that
 # we don't cause a race condition while building
@@ -42,8 +42,10 @@ def acquire_lock(build_dir):
             while True:
                 try:
                     curs.execute("BEGIN EXCLUSIVE")
+                    break
                 except sqlite3.OperationalError:
                     pass
+                sleep(0.25)
             return curs
     except ImportError:
         print("warning: sqlite3 not available in python, skipping build directory lock")