<#21778 pants export triggers a \"Permission denie...
# github-notifications
c
#21778 pants export triggers a \"Permission denied (os error 313) in .cache after building PEX Issue created by kdowney-talos When I run
pants export
on the platform below, I get a permission denied error in
.cache
after the PEX has been built.\n\n```\n(.venv) serenitydev@c774de47c447:/workspaces/pms/tools/deribit_scraper$ pants export\nBootstrapping Pants 2.25.0.dev2\nInstalling pantsbuild.pants==2.25.0.dev2 into a virtual environment at /home/serenitydev/.cache/nce/9de06a50ca43f773ddf5463ea534b781a193096c5d9c3cf4fa9687d592fb0986/bindings/venvs/2.25.0.dev2\nNew virtual environment successfully created at /home/serenitydev/.cache/nce/9de06a50ca43f773ddf5463ea534b781a193096c5d9c3cf4fa9687d592fb0986/bindings/venvs/2.25.0.dev2\n144915.73 [INFO] Initializing scheduler...\n144915.76 [INFO] Initializing Nailgun pool for 16 processes...\n144917.91 [INFO] Scheduler initialized.\n144920.03 [INFO] Completed: Get interpreter version\n144951.29 [INFO] Completed: Build pex for resolve `serenity-deps`\n144951.81 [ERROR] 1 Exception encountered:\n\nEngine traceback:\n in
export
goal\n\nIntrinsicError: Error setting permissions on /home/serenitydev/.cache/pants/lmdb_store/immutable/files/76/768fc87de7430916cbfae1e505db54b34a721bc43ba7ec17fa9a425c446f937c: Permission denied (os error 13)\n\n```\n\nAdditional information:\n\n• Observed with pants 2.23.0 and 2.25.0.dev2\n• Running on Ubuntu jammy image\n• Inside Docker container, running in Docker Desktop 4.37 on MacOS 15.1.1\n• Removing
$HOME/.cache
does not help\n• May be related to #21771\n\nThis is just speculation, but it seems like one thing
package
,
export-codegen
and
export
all have in common is that they write to both the workspace and the cache which sits outside the workspace. Since all three appear to be creating race conditions on write in
.cache
may need to be locked to ensure those operations don't step on each other. pantsbuild/pants