fresh-cat-90827
09/14/2023, 3:49 PMIntrinsicError: Invalid cross-device link (os error 18) error thrown in a container in CI when using any version 2.17.X except 2.17.0.dev0 which works fine. 🧵fresh-cat-90827
09/14/2023, 3:49 PMpantsd goes over 15GB of RAM usage), running dependencies on a single file manifests in IntrinsicError: Invalid cross-device link (os error 18) or more verbose IntrinsicError: Failed to create hardlink to /var/tmp/jenkins-cache/pants/lmdb_store/immutable/files/fa/faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8 at /tmp/pants-sandbox-igPIBD/pex: Invalid cross-device link (os error 18) depending on what version of 2.17 is used.
@witty-crayon-22786 @bitter-ability-32190 do you have any suggestions on what kind of data would help troubleshoot this?flat-zoo-31952
09/14/2023, 4:01 PM[root@pf37x-8 ~]# df /tmp /var/tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda5 334411756 39982624 293661648 12% /tmp
/dev/vda5 334411756 39982624 293661648 12% /flat-zoo-31952
09/14/2023, 4:01 PMfresh-cat-90827
09/14/2023, 4:01 PM16:00:43.41 [WARN] Executor shutdown took unexpectedly long: tasks were likely leaked!flat-zoo-31952
09/14/2023, 4:03 PMflat-zoo-31952
09/14/2023, 4:03 PM[root@pf37x-8 ~]# findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/vda5[/root/var/lib/machines/jenkins-agent]
btrfs rw,relatime,seclabel,discard=async,space_cache=v2,subvolid=256,subvol=/root
├─/tmp tmpfs tmpfs rw,nosuid,nodev,seclabel,size=1632552k,nr_inodes=409600,inode64
│ └─/tmp /dev/vda5[/root/var/lib/machines/jenkins-agent/var/tmp]fresh-cat-90827
09/14/2023, 4:04 PM2.18.0a0
IntrinsicError: Failed to create hardlink to /root/.cache/pants/lmdb_store/immutable/files/fa/faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8 at /tmp/pants-sandbox-Raz1Rv/pex: Invalid cross-device link (os error 18)witty-crayon-22786
09/14/2023, 4:04 PMwitty-crayon-22786
09/14/2023, 4:05 PMflat-zoo-31952
09/14/2023, 4:06 PMflat-zoo-31952
09/14/2023, 4:06 PM[root@pf37x-8 tmp]# ls -l /var/tmp/source
-rw-r--r--. 1 root root 0 Sep 14 16:04 /var/tmp/source
[root@pf37x-8 tmp]# ln /var/tmp/source /tmp/link
ln: failed to create hard link '/tmp/link' => '/var/tmp/source': Invalid cross-device linkbitter-ability-32190
09/14/2023, 4:06 PMfresh-cat-90827
09/14/2023, 4:06 PMHow did I miss this issue?!same here wow
witty-crayon-22786
09/14/2023, 4:07 PMbitter-ability-32190
09/14/2023, 4:07 PMflat-zoo-31952
09/14/2023, 4:07 PMflat-zoo-31952
09/14/2023, 4:08 PM/var/tmp override i use for the cache dir.. 🤔fresh-cat-90827
09/14/2023, 4:09 PMIt's "the same" device underneath (with two mount points), so it misses our check.thanks a ton @witty-crayon-22786 for taking a look! Would this issue explain the high memory usage, i.e. it attempts to perform an operation and the resources are not returned to the system?
flat-zoo-31952
09/14/2023, 4:11 PMwitty-crayon-22786
09/14/2023, 4:24 PMwitty-crayon-22786
09/14/2023, 4:25 PMfresh-cat-90827
09/14/2023, 4:25 PMpants --local-execution-root-dir=/home --no-pantsd --no-local-cache -ldebug dependencies :: it all proceeds and the memory is the same as in previous versions, so setting --local-execution-root-dir helpedbitter-ability-32190
09/14/2023, 4:26 PM: we could do that, but I'd rather avoid per-copy overheads and test the two roots once and memoize itWorks for me. That's still infallible. If someone files a ticket I'll dive in at some point soon 🙂
witty-crayon-22786
09/14/2023, 4:31 PMlocal_store_dir and local_execution_root_dir are on the same mount is advisable. When we fix this, we might have the "these aren't the same mounts" check also trigger a warning, since it will impact performance.witty-crayon-22786
09/14/2023, 4:33 PMwitty-crayon-22786
09/14/2023, 4:47 PMwitty-crayon-22786
09/14/2023, 4:47 PM