todo/faster (took 2 min) way to realize the need in pidlock?yohhttp://git-annex.branchable.com/todo/faster___40__took_2_min__41___way_to_realize_the_need_in_pidlock__63__/git-annexikiwiki2020-06-17T01:18:32Zcomment 1http://git-annex.branchable.com/todo/faster___40__took_2_min__41___way_to_realize_the_need_in_pidlock__63__/comment_1_9c77d8cf628025308c2561a8a46d2365/joey2020-06-17T01:18:32Z2020-06-05T14:43:13Z
<p>So your nfs filesystem is making a posix lock operation block for 2 minutes
before, I suppose, it makes it fail.</p>
<p>Since git-annex has to do a posix lock operation, the only way to make it
faster would be to fix the nfs filesystem to not do that. Perhaps by disabling
posix locking altogether since it's apparently broken.</p>
<p>But as far as what git-annex can do, I don't see any possible way to speed it up.</p>
<p>I agree it could make sense to display a message, although that will also
be a message the vast majority of users who are not in this situation would
see. Maybe it could wait 1-10 seconds (probably 1000 times as long as it
will take in most situations) and if the probe is still ongoing, display a
message.</p>
comment 2http://git-annex.branchable.com/todo/faster___40__took_2_min__41___way_to_realize_the_need_in_pidlock__63__/comment_2_0d7eb254ec9ff7ba8b1831898008747f/joey2020-06-17T01:18:32Z2020-06-05T14:54:31Z
<p>Also, it could check if annex.pidlock is already set globally, and skip the
probe. Which maybe would work for you?</p>
<p>I'm going to implement both the delayed message, and checking
annex.pidlock.</p>
<p>(Timing out the probe after some period of time less than 2 minutes would
also be a possibility, but then there could be false positives on
filesystems that are just legitimately very slow. Doesn't seem a good
idea.)</p>
comment 3http://git-annex.branchable.com/todo/faster___40__took_2_min__41___way_to_realize_the_need_in_pidlock__63__/comment_3_26f82b5ef0ce9dc0a5a8fc64f4a3b335/joey2020-06-17T01:18:32Z2020-06-05T15:11:44Z
Is this related to your other bug about something seeming to hang/stall?
reply to Joey's commentshttp://git-annex.branchable.com/todo/faster___40__took_2_min__41___way_to_realize_the_need_in_pidlock__63__/comment_4_3e2b49710772340238358041ba91bc25/yarikoptic2020-06-17T01:18:32Z2020-06-05T22:11:47Z
<blockquote><p>Also, it could check if annex.pidlock is already set globally, and skip the probe...</p></blockquote>
<p><details>
<summary>I would assume it already does it since with globally set pidlock it proceeds fine</summary></p>
<pre><code class="shell">[d31548v@discovery7 tmp]$ git config annex.pidlock
1
[d31548v@discovery7 tmp]$ ( export PS4='[$(date)] > '; set -x ; mkdir test; cd test; git init; git annex init; echo done; )
[Fri Jun 5 18:04:28 EDT 2020] > mkdir test
[Fri Jun 5 18:04:28 EDT 2020] > cd test
[Fri Jun 5 18:04:28 EDT 2020] > git init
Initialized empty Git repository in /dartfs-hpc/rc/home/v/d31548v/tmp/test/.git/
[Fri Jun 5 18:04:28 EDT 2020] > git annex init
init (scanning for unlocked files...)
ok
(recording state in git...)
[Fri Jun 5 18:04:30 EDT 2020] > echo done
done
</code></pre>
<p></details></p>
<p>The problem somewhat that global pidlock is not generally needed - some partitions do have proper POSIX file systems, so setting it globally is "suboptimal", needs to be provisioned for every node (by an admin) and/or user.</p>
<blockquote><p>I agree it could make sense to display a message, although that will also be a message the vast majority of users who are not in this situation would see</p></blockquote>
<p>Sure - that would be ideal, but if anything - debug message before sensing for the log would at least suffice to help with troubleshooting.</p>
<blockquote><p>Is this related to your other bug about something seeming to hang/stall?</p></blockquote>
<p>It might depend to which one? <img src="http://git-annex.branchable.com/smileys/smile4.png" alt=";-)" /> if <a href="https://git-annex.branchable.com/bugs/enableremote_stuck_with_a_recentish_git-annex/">this one (upon enableremote)</a> - unlikely since that one happens I believe on non-crippled FS</p>
comment 5http://git-annex.branchable.com/todo/faster___40__took_2_min__41___way_to_realize_the_need_in_pidlock__63__/comment_5_009ffc560a14061feb8d748e1d2d9b71/yarikoptic2020-06-17T01:18:32Z2020-06-05T22:15:09Z
<blockquote><p>I would assume it already does it since with globally set pidlock it proceeds fine</p></blockquote>
<p>SCRAP that! I do not know what has changed since yesterday to my home directory (may be admin turned it into a POSIX one... I should have not let him know! ;)) since it works even without global pidlock set. I will inquire.</p>