zsh-users
 help / color / mirror / code / Atom feed
* zsh spinning on .zsh_history.LOCK on start
@ 2014-06-11  5:39 Florian Bruhin
  2014-06-11  6:42 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Bruhin @ 2014-06-11  5:39 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

Hi,

I have a weird problem with zsh since some while:

Sometimes when starting (it seems it always happens after a fresh
boot), I don't get any prompt from zsh.

When I attach strace to the process, it seems to be spinning on these
lines:

    symlink("/pid-1600/host-ginny", "/home/florian/.zsh_history.LOCK") = -1 EEXIST (File exists)
    lstat("/home/florian/.zsh_history.LOCK", {st_mode=S_IFLNK|0777, st_size=19, ...}) = 0
    rt_sigprocmask(SIG_BLOCK, [CHLD], [WINCH], 8) = 0
    rt_sigaction(SIGCHLD, NULL, {0x474b10, [], SA_RESTORER|SA_INTERRUPT, 0x7fd243ce2df0}, 8) = 0
    rt_sigprocmask(SIG_SETMASK, [WINCH], NULL, 8) = 0
    nanosleep({1, 0}, 0x7fffa6830380)       = 0

When I delete the lockfile, it starts up normally. After waiting some
while it does as well sometimes. Then the problem goes away, and some
weeks later magically appears again.

I also tried doing `setopt HIST_FCNTL_LOCK` in ~/.zshrc but that
didn't help.

I'm using zsh 5.0.5 under Archlinux.

Any ideas on what's going wrong there? If there's anything else useful
I can provide, please let me know!

Florian

-- 
http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zsh spinning on .zsh_history.LOCK on start
  2014-06-11  5:39 zsh spinning on .zsh_history.LOCK on start Florian Bruhin
@ 2014-06-11  6:42 ` Bart Schaefer
  2014-06-11  6:46   ` Florian Bruhin
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2014-06-11  6:42 UTC (permalink / raw)
  To: Florian Bruhin, zsh-users

On Jun 11,  7:39am, Florian Bruhin wrote:
} 
} When I delete the lockfile, it starts up normally. After waiting some
} while it does as well sometimes. Then the problem goes away, and some
} weeks later magically appears again.
} 
} Any ideas on what's going wrong there?

If your home directory is NFS or otherwise network-mounted, make sure
the clocks are in sync on all the hosts from which you might access it.

There is a patch in http://www.zsh.org/mla/workers/2014/msg00369.html
(zsh-workers/32580) which is *probably* the fix for your problem.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zsh spinning on .zsh_history.LOCK on start
  2014-06-11  6:42 ` Bart Schaefer
@ 2014-06-11  6:46   ` Florian Bruhin
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Bruhin @ 2014-06-11  6:46 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

* Bart Schaefer <schaefer@brasslantern.com> [2014-06-10 23:42:38 -0700]:
> On Jun 11,  7:39am, Florian Bruhin wrote:
> } 
> } When I delete the lockfile, it starts up normally. After waiting some
> } while it does as well sometimes. Then the problem goes away, and some
> } weeks later magically appears again.
> } 
> } Any ideas on what's going wrong there?
> 
> If your home directory is NFS or otherwise network-mounted, make sure
> the clocks are in sync on all the hosts from which you might access it.
> 
> There is a patch in http://www.zsh.org/mla/workers/2014/msg00369.html
> (zsh-workers/32580) which is *probably* the fix for your problem.

Hmm, it's not on a NFS, but I think it's a very related problem: My
hardware clock sometimes does funny things when suspending/rebooting
(like just adjusting itself by a few minutes/hours in any direction),
so indeed that could be the issue. Some while ago my dirty workaround
of syncing via NTP when possible doesn't work anymore, and it's very
well possible these problems started appearing since then.

Thanks!

Florian

-- 
http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-11  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-11  5:39 zsh spinning on .zsh_history.LOCK on start Florian Bruhin
2014-06-11  6:42 ` Bart Schaefer
2014-06-11  6:46   ` Florian Bruhin

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).