Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Hang in LockFile#waitForStatChange

So your filesystem has a timer resolution of 1 hour :-?

How large is that packed-refs file ?

 

From: Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx>
Date: Thursday, 14. September 2017 at 09:29
To: "Sohn, Matthias" <matthias.sohn@xxxxxxx>, "JGit Developers list (jgit-dev@xxxxxxxxxxx)" <jgit-dev@xxxxxxxxxxx>
Subject: RE: [jgit-dev] Hang in LockFile#waitForStatChange

 

Hi,

 

Thanks. It turns out that it did finish. After like one hour or more… J

 

Cheers,

Markus

 

From: Sohn, Matthias [mailto:matthias.sohn@xxxxxxx]
Sent: Thursday, September 14, 2017 9:10 AM
To: Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx>; JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] Hang in LockFile#waitForStatChange

 

See line 432 in

https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/master/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java#416

 

The thread waits for a lockfile to see the modification time of the packed-ref’s file advance

by one tick of the clock with the resolution of the filesystem’s timestamps. It’s saving the

locked file in a loop with a 25ms sleep until the modification timestamp increases by at least one tick.

This shouldn’t take 5 minutes.

 

This is done to prevent issues regarding “racy git” problem caused by granularity of timer resolution

https://github.com/git/git/blob/master/Documentation/technical/racy-git.txt

 

 

From: <jgit-dev-bounces@xxxxxxxxxxx> on behalf of Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx>
Date: Thursday, 14. September 2017 at 08:11
To: "JGit Developers list (jgit-dev@xxxxxxxxxxx)" <jgit-dev@xxxxxxxxxxx>
Subject: [jgit-dev] Hang in LockFile#waitForStatChange

 

Hey,

 

I observed this hang (over at least 5 minutes in the same frame – right now it looks like infinite) while testing the gerrit importer plugin:

 

"HTTP-91" #91 prio=5 os_prio=0 tid=0x00007f96ac020000 nid=0x575b waiting on condition [0x00007f97a87cf000]

   java.lang.Thread.State: TIMED_WAITING (sleeping)

        at java.lang.Thread.sleep(Native Method)

        at org.eclipse.jgit.internal.storage.file.LockFile.waitForStatChange(LockFile.java:432)

        at org.eclipse.jgit.internal.storage.file.RefDirectory$1.writeFile(RefDirectory.java:892)

        at org.eclipse.jgit.lib.RefWriter.writePackedRefs(RefWriter.java:195)

        at org.eclipse.jgit.internal.storage.file.RefDirectory.commitPackedRefs(RefDirectory.java:904)

        at org.eclipse.jgit.internal.storage.file.RefDirectory.delete(RefDirectory.java:597)

        at org.eclipse.jgit.internal.storage.file.RefDirectoryUpdate.doDelete(RefDirectoryUpdate.java:146)

        at org.eclipse.jgit.lib.RefUpdate$2.execute(RefUpdate.java:571)

        at org.eclipse.jgit.lib.RefUpdate.updateImpl(RefUpdate.java:653)

        at org.eclipse.jgit.lib.RefUpdate.delete(RefUpdate.java:568)

        at org.eclipse.jgit.lib.RefUpdate.delete(RefUpdate.java:540)

        at com.googlesource.gerrit.plugins.importer.CompleteProjectImport.deleteImportRefs(CompleteProjectImport.java:99)

        at com.googlesource.gerrit.plugins.importer.CompleteProjectImport.apply(CompleteProjectImport.java:68)

        at com.googlesource.gerrit.plugins.importer.CompleteProjectImport.apply(CompleteProjectImport.java:1)

 

It seems rather unrelated to the actual plugin, and more in the JGit area. Reading the code it does not really make much sense that it is hanging there – any idea what this could mean?

 

Cheers,

Markus

 

--

Mit freundlichen Grüßen / Best regards

 

Markus Duft | Software Architect

SSI SCHÄFER | SSI Schäfer IT Solutions GmbH | Friesachstraße 15 | 8114 Friesach bei Graz | Austria

Phone +43 3127 200-575 | Fax +43 3127 200-22

markus.duft@xxxxxxxxxxxxxxxx

Website | Blog | YouTube | Facebook

 


SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz


SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz


Back to the top