cool-easter-32542
01/27/2024, 1:21 AMpantsd crashes on Linux but not when using the same repository on a Mac
Pants version
v2.18.1
OS
Are you encountering the bug on MacOS, Linux, or both?
Both
Additional info
I posed the issue on slack. When running
pants -ldebug run archipelago/src/archipelago/__main__.py
On Linux, I'll make a change to a random file, e.g. capstan/src/capstan/pubsub_client.py, and see
01:15:55.75 [DEBUG] notify invalidating {"capstan/src/capstan/pubsub_client.py"} because of Modify(Data(Any))
01:15:55.75 [INFO] notify invalidation: cleared 1 and dirtied 2 nodes for: {"capstan/src/capstan/pubsub_client.py"}
01:15:55.75 [DEBUG] notify invalidating {"capstan/src/capstan/pubsub_client.py"} because of Modify(Data(Any))
01:15:55.75 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {"capstan/src/capstan/pubsub_client.py"}
01:15:55.75 [DEBUG] notify invalidating {"capstan/src/capstan/pubsub_client.py"} because of Modify(Data(Any))
01:15:55.75 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {"capstan/src/capstan/pubsub_client.py"}
01:15:55.75 [DEBUG] notify invalidating {"capstan/src/capstan/pubsub_client.py"} because of Modify(Data(Any))
01:15:55.75 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {"capstan/src/capstan/pubsub_client.py"}
01:15:55.75 [DEBUG] Dependency DigestFile(capstan/src/capstan/pubsub_client.py) of Some("Snapshot(!*.pyc, !__pycache__/, .gitignore, archipelago/src, archipelago/src/**, capstan/src, capstan/src/**, [more directories], pants.toml, pants.toml/**, [more directories])") changed.
01:15:55.75 [DEBUG] notify invalidating {"capstan/src/capstan", "capstan/src/capstan/pubsub_client.py"} because of Access(Close(Write))
01:15:55.75 [INFO] notify invalidation: cleared 2 and dirtied 199 nodes for: {"capstan/src/capstan", "capstan/src/capstan/pubsub_client.py"}
01:15:55.75 [DEBUG] notify invalidating {"capstan/src/capstan/pubsub_client.py", "capstan/src/capstan"} because of Access(Close(Write))
01:15:55.75 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {"capstan/src/capstan/pubsub_client.py", "capstan/src/capstan"}
01:15:55.76 [DEBUG] Dependency Snapshot(!*.pyc, !__pycache__/, .gitignore, archipelago/src, archipelago/src/**, capstan/src, capstan/src/**, [more-directories], pants.toml, pants.toml/**, [more-directories]) of Some("Snapshot") changed.
01:15:55.76 [DEBUG] computed 1 nodes in 0.195103 seconds. there are 3150 total nodes.
01:15:55.76 [ERROR] saw filesystem changes covered by invalidation globs: SnapshotDiff(our_unique_files=(), our_unique_dirs=(), their_unique_files=(), their_unique_dirs=(), changed_files=('capstan/src/capstan/pubsub_client.py',)). terminating the daemon.
01:15:56.43 [ERROR] service failure for <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7fa27716e310>.
On Mac I see
17:19:03.07 [DEBUG] notify invalidating {"capstan/src/capstan/pubsub_client.py"} because of Modify(Data(Content))
17:19:03.07 [DEBUG] notify invalidating {"capstan/src/capstan/pubsub_client.py"} because of Modify(Data(Content))
17:19:03.07 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {"capstan/src/capstan/pubsub_client.py"}
17:19:03.07 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {"capstan/src/capstan/pubsub_client.py"}
TLDR The issue is because the shebang in ../nce/.../bin/pants is too long (#!/home/yjabri/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.18.1/bin/python3.9 -sE) and the -sE gets cut off. This causes scie-pants to pass my .env (PYTHONPATH=...) to python which includes it in sys.path and therefore the invalidation_globs
pantsbuild/pantscool-easter-32542
02/02/2024, 6:05 AM