{"thread":{"id":"39125","subject":"Regular Rebase Failure","startedAt":"2015-04-21T17:16:16Z","lastAt":"2015-04-29T15:22:49Z","messageCount":7,"participants":["Adam","Stefan Beller","Jeff King","Phil Hord","Adam Steel"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"259741","messageId":"553685E0.8010304@gmail.com","threadId":"39125","inReplyTo":null,"subject":"Regular Rebase Failure","fromName":"Adam","fromEmail":"adamgsteel@gmail.com","sentAt":"2015-04-21T17:16:16Z","receivedAt":"2015-04-21T17:16:16Z","isPatch":false,"sender":{"key":"adamgsteel@gmail.com","avatar":null},"body":"About two weeks ago I started getting a regular rebase failure. I get this\nerror several times a day and at least once a day I lose work to it.\n---\nfatal: Unable to create '/Users/asteel/path/to/repo/.git/index.lock': File\nexists.\n\nIf no other git process is currently running, this probably means a\n\ngit process crashed in this repository earlier. Make sure no other git\n\nprocess is running and remove the file manually to continue.\n\nCould not apply 71a...\n---\nThe weird part is that the file does not exist\n\nAny ideas? Thanks!\n"},{"id":"259749","messageId":"CAGZ79kadXgsdCLH-YFQ5RhyKbRv9-qmUOQo-9QkKM2=8p17j+g@mail.gmail.com","threadId":"39125","inReplyTo":"553685E0.8010304@gmail.com","subject":"Re: Regular Rebase Failure","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-04-21T17:51:42Z","receivedAt":"2015-04-21T17:51:42Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Apr 21, 2015 at 10:16 AM, Adam <adamgsteel@gmail.com> wrote:\n> About two weeks ago I started getting a regular rebase failure. I get this\n> error several times a day and at least once a day I lose work to it.\n\nWhich git version are you using?\n\n> ---\n> fatal: Unable to create '/Users/asteel/path/to/repo/.git/index.lock': File\n> exists.\n\nSearching through the code base there are only 3 occurrences of\n\"Unable to create\" matching the capitalization of the letters. (we\nhave many more error messages where the U is lower case)\n\nThe first occurrence is in refs.c create_symref\n    if (rename(lockpath, git_HEAD) < 0) {\n        error(\"Unable to create %s\", git_HEAD);\n        goto error_unlink_return;\n    }\n\nThe other 2 occurrences are in the lockfile.c so any place using\nlock files may trigger that error.\n\n>\n> If no other git process is currently running, this probably means a\n>\n> git process crashed in this repository earlier. Make sure no other git\n>\n> process is running and remove the file manually to continue.\n>\n> Could not apply 71a...\n> ---\n> The weird part is that the file does not exist\n\nNot anymore when you're looking I guess, as git creates and deletes a lock file\nfor the index quite frequently. Also when a git command shuts down roughly\nas expected (such as when calling a die(error message) as opposed to being\nterminated by the operating system), then the exit handler makes sure to remove\nall the lock files it held.\n\n>\n> Any ideas? Thanks!\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"259753","messageId":"CAGZ79kY0pbC6qH+Refm8Py0PyF2xNMLfSarhA+3-7eaU==RK7w@mail.gmail.com","threadId":"39125","inReplyTo":"55369509.2080200@gmail.com","subject":"Re: Regular Rebase Failure","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-04-21T18:34:37Z","receivedAt":"2015-04-21T18:34:37Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"[+mailing list]\n\nOn Tue, Apr 21, 2015 at 11:20 AM, Adam <adamgsteel@gmail.com> wrote:\n> I'm using git version 2.3.2 (Apple Git-55).\n\nWe should loop in the maintainers of the Apple Git version, they'd know\nwhat changed in git about two weeks ago.\nI have no idea who that is though.\n\n>\n> That explains why I can't find the index.lock file, since the error that was\n> thrown deleted it. I'm still not sure what to do about this, though.\n\nComplain at the right people so it gets fixed. ;)\n\n>\n> Thanks for responding.\n>\n> Adam\n>\n"},{"id":"259761","messageId":"20150421211519.GA13230@peff.net","threadId":"39125","inReplyTo":"CAGZ79kY0pbC6qH+Refm8Py0PyF2xNMLfSarhA+3-7eaU==RK7w@mail.gmail.com","subject":"Re: Regular Rebase Failure","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-04-21T21:15:20Z","receivedAt":"2015-04-21T21:15:20Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 21, 2015 at 11:34:37AM -0700, Stefan Beller wrote:\n\n> [+mailing list]\n> \n> On Tue, Apr 21, 2015 at 11:20 AM, Adam <adamgsteel@gmail.com> wrote:\n> > I'm using git version 2.3.2 (Apple Git-55).\n> \n> We should loop in the maintainers of the Apple Git version, they'd know\n> what changed in git about two weeks ago.\n> I have no idea who that is though.\n\nYou can get some releases from:\n\n  http://www.opensource.apple.com/tarballs/Git/\n\nand at least view the diff against stock git. But they do not seem to\nhave updated that in some time (the latest release is Apple Git-48,\nbased off of v1.8.5.2).\n\nIt would be nice if they kept that up to date (actually not just nice,\nbut required by the GPL[1]). It would be nicer still if they actually\npublished their patches with real commit messages, or better yet\nactually engaged with upstream to work on fixes or enhancements.\n\nThis isn't strictly relevant to the discussion at hand, but in case any\nApple Git folks do see this, perhaps it will serve as a gentle nudge.\n\n-Peff\n\n[1] By the GPL, they don't strictly need to publish the source; they\n    just have to make an offer to provide it on request. But given the\n    existence of opensource.apple.com, I think their strategy is to just\n    publish everything, and they have simply let updating that site fall\n    behind the binaries they are pushing. Or maybe they have switched to\n    an alternate site that I don't know about.\n"},{"id":"260089","messageId":"CAGZ79kY7kLF=uNm13xuqETMB1S+uwnB09_NzgU32bpODJHg8tg@mail.gmail.com","threadId":"39125","inReplyTo":"CAF72XQfVfjMLe2VqNWHkGXq75DLMPU6VVqLeGzgh9rZNC0qp3Q@mail.gmail.com","subject":"Re: Regular Rebase Failure","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-04-27T23:55:12Z","receivedAt":"2015-04-27T23:55:12Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"[+mailing list, so others can also chime in and have an answer/opinion]\n\nOn Mon, Apr 27, 2015 at 10:07 AM, Adam Steel <adamgsteel@gmail.com> wrote:\n> Stefan,\n>\n> So I switched git versions.\n>\n> $ git --version\n> git version 2.3.1\n>\n> I'm still getting the same regular rebase failures.\n>\n> ---\n>\n> fatal: Unable to create\n> '/Users/asteel/Repositories/rails-teespring/.git/index.lock': File\n> exists.\n>\n>\n> If no other git process is currently running, this probably means a\n>\n> git process crashed in this repository earlier. Make sure no other git\n>\n> process is running and remove the file manually to continue.\n>\n> ---\n>\n> Any ideas?\n>\n> Adam\n>\n> On Tue, Apr 21, 2015 at 12:34 PM, Stefan Beller <sbeller@google.com> wrote:\n>> [+mailing list]\n>>\n>> On Tue, Apr 21, 2015 at 11:20 AM, Adam <adamgsteel@gmail.com> wrote:\n>>> I'm using git version 2.3.2 (Apple Git-55).\n>>\n>> We should loop in the maintainers of the Apple Git version, they'd know\n>> what changed in git about two weeks ago.\n>> I have no idea who that is though.\n>>\n>>>\n>>> That explains why I can't find the index.lock file, since the error that was\n>>> thrown deleted it. I'm still not sure what to do about this, though.\n>>\n>> Complain at the right people so it gets fixed. ;)\n>>\n>>>\n>>> Thanks for responding.\n>>>\n>>> Adam\n>>>\n"},{"id":"260171","messageId":"CABURp0rkkpP_EuWA0O=gF=O=pyLGbh0Vzvp+yC-ckpJM4wU0gQ@mail.gmail.com","threadId":"39125","inReplyTo":"CAGZ79kY7kLF=uNm13xuqETMB1S+uwnB09_NzgU32bpODJHg8tg@mail.gmail.com","subject":"Re: Regular Rebase Failure","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2015-04-29T15:14:28Z","receivedAt":"2015-04-29T15:14:28Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"> On Mon, Apr 27, 2015 at 10:07 AM, Adam Steel <adamgsteel@gmail.com> wrote:\n>> Stefan,\n>>\n>> So I switched git versions.\n>>\n>> $ git --version\n>> git version 2.3.1\n>>\n>> I'm still getting the same regular rebase failures.\n>>\n>> ---\n>>\n>> fatal: Unable to create\n>> '/Users/asteel/Repositories/rails-teespring/.git/index.lock': File\n>> exists.\n\nIs the repository located on a mounted network share, or could other\nusers be accessing it via a network mount?  We had a similar problem\nrecently on a new Jenkins VM instance which had only NFS-mounted\nstorage available. I don't remember if it was Git that was failing on\nthere, and I wasn't directly involved in solving the problem.  But\nwhile researching the issue I found ominous warnings about the dangers\nof file-locking on remote shares [1]. Which is to say, I don't know\nmuch, but I heard a rumor...  :-)\n\nPerhaps this is old news and already well covered in Git.  But I am curious...\n\n\n[1] http://0pointer.de/blog/projects/locking.html\n"},{"id":"260172","messageId":"CAF72XQfySo7S7hYwzTeMZQSj5Ko0Czarikd6TbBiJpFPj+aGiQ@mail.gmail.com","threadId":"39125","inReplyTo":"CABURp0rkkpP_EuWA0O=gF=O=pyLGbh0Vzvp+yC-ckpJM4wU0gQ@mail.gmail.com","subject":"Re: Regular Rebase Failure","fromName":"Adam Steel","fromEmail":"adamgsteel@gmail.com","sentAt":"2015-04-29T15:22:49Z","receivedAt":"2015-04-29T15:22:49Z","isPatch":false,"sender":{"key":"adamgsteel@gmail.com","avatar":null},"body":"Nope, this is local on an OSX system with only one user, no local\nnetwork. This happens about every third interactive rebase.\n\nOn Wed, Apr 29, 2015 at 9:14 AM, Phil Hord <phil.hord@gmail.com> wrote:\n>> On Mon, Apr 27, 2015 at 10:07 AM, Adam Steel <adamgsteel@gmail.com> wrote:\n>>> Stefan,\n>>>\n>>> So I switched git versions.\n>>>\n>>> $ git --version\n>>> git version 2.3.1\n>>>\n>>> I'm still getting the same regular rebase failures.\n>>>\n>>> ---\n>>>\n>>> fatal: Unable to create\n>>> '/Users/asteel/Repositories/rails-teespring/.git/index.lock': File\n>>> exists.\n>\n> Is the repository located on a mounted network share, or could other\n> users be accessing it via a network mount?  We had a similar problem\n> recently on a new Jenkins VM instance which had only NFS-mounted\n> storage available. I don't remember if it was Git that was failing on\n> there, and I wasn't directly involved in solving the problem.  But\n> while researching the issue I found ominous warnings about the dangers\n> of file-locking on remote shares [1]. Which is to say, I don't know\n> much, but I heard a rumor...  :-)\n>\n> Perhaps this is old news and already well covered in Git.  But I am curious...\n>\n>\n> [1] http://0pointer.de/blog/projects/locking.html\n"}]}