cuddly-window-48195
10/16/2019, 10:16 PMenough-analyst-54434
10/16/2019, 10:25 PM<https://github.com/pantsbuild/pants/blob/33a6d51db91ea1fe69c39117c8878abcb824cdfb/src/python/pants/process/lock.py#L22>
-> <https://fasteners.readthedocs.io/en/latest/api/process_lock.html>
-> fcntl.lockf(self.lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
The last is an advisory interprocess lock that I imagine is not valid across seperate countainer namespaces.aloof-angle-91616
10/16/2019, 10:40 PMcuddly-window-48195
10/16/2019, 10:57 PMaloof-angle-91616
10/16/2019, 10:57 PM.pants.workdir.file_lock
might be that.pants.d
, i will run a find
to seecuddly-window-48195
10/16/2019, 10:59 PM$PWD:/workdir
volume mount in the docker-compose.yml file.aloof-angle-91616
10/16/2019, 10:59 PMcuddly-window-48195
10/16/2019, 11:00 PMaloof-angle-91616
10/16/2019, 11:00 PMcuddly-window-48195
10/16/2019, 11:04 PM"Path": "/usr/bin/scl",
"Args": [
"enable",
"devtoolset-7",
"--",
"./pants",
"run",
"package:main"
],
aloof-angle-91616
10/16/2019, 11:04 PMbuild-support/
somewherescl
command line)(backtrace omitted)
part is a bad error message -- it means pants wasn't able to get it, not that it decided not to)PANTS_PRINT_EXCEPTION_STACKTRACE=True
did not change the result)enough-analyst-54434
10/16/2019, 11:06 PMfcntl.lockf(self.lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
should definitely work in seperate containers. Sure you share the relevent fs, but do you know what's going on in fcntl? I do not, I'm fairly unix / linux dumbcuddly-window-48195
10/16/2019, 11:07 PMenough-analyst-54434
10/16/2019, 11:08 PMcuddly-window-48195
10/16/2019, 11:08 PMenough-analyst-54434
10/16/2019, 11:09 PMcuddly-window-48195
10/16/2019, 11:11 PMenough-analyst-54434
10/16/2019, 11:11 PMcuddly-window-48195
10/16/2019, 11:12 PMenough-analyst-54434
10/16/2019, 11:12 PMcuddly-window-48195
10/16/2019, 11:14 PMenough-analyst-54434
10/16/2019, 11:15 PMstat
the same lockfile from both containers and compare inode.cuddly-window-48195
10/16/2019, 11:16 PMenough-analyst-54434
10/16/2019, 11:16 PMcuddly-window-48195
10/16/2019, 11:17 PM[root@89d05d1595d4 workdir]# stat ~/.cache/pants/lmdb_store/
File: '/root/.cache/pants/lmdb_store/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 1097323 Links: 5
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-10-16 21:46:55.290751000 +0000
Modify: 2019-10-16 21:46:55.300751000 +0000
Change: 2019-10-16 21:46:55.300751000 +0000
Birth: -
enough-analyst-54434
10/16/2019, 11:18 PMcuddly-window-48195
10/16/2019, 11:19 PM[root@89d05d1595d4 workdir]# stat ~/.cache/pants/lmdb_store/files/0/lock.mdb
File: '/root/.cache/pants/lmdb_store/files/0/lock.mdb'
Size: 8192 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 1097326 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-10-16 23:19:12.115466000 +0000
Modify: 2019-10-16 23:19:12.115466000 +0000
Change: 2019-10-16 23:19:12.115466000 +0000
Birth: -
container 1:
File: '/root/.cache/pants/lmdb_store/files/0/lock.mdb'
Size: 8192 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 1097326 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-10-16 23:19:12.115466000 +0000
Modify: 2019-10-16 23:19:12.115466000 +0000
Change: 2019-10-16 23:19:12.115466000 +0000
Birth: -
enough-analyst-54434
10/16/2019, 11:22 PMcuddly-window-48195
10/16/2019, 11:24 PM