Re: OSTree locking fails sometimes



On Thu, Jan 24, 2019 at 3:41 AM Colin Walters <walters verbum org> wrote:

On Mon, Jan 14, 2019, at 12:16 PM, Stefan Agner wrote:
Hello,

[Hi, sorry about not replying earlier]

And get this every now and then:
"error: Locking repo exclusive failed: Resource temporarily unavailable"

Hmm.  So this boils down to do_repo_lock() which calls:

res = TEMP_FAILURE_RETRY (fcntl (fd, (flags & LOCK_NB) ? F_OFD_SETLK : F_OFD_SETLKW, &fl));

"Resource temporarily unavailable" maps to EAGAIN.

That's the same as EWOULDBLOCK, which suggests there's lock contention
and it times out. I'd guess that the more likely issue is the recent
change to make summary generation take an exclusive lock in
https://github.com/ostreedev/ostree/pull/1681. We discussed this when
it started affecting one of our systems in
https://github.com/endlessm/eos-updater/pull/237#issuecomment-425563031.

But then he says that the processes are serialized...

Stefan, if you can run ostree with --verbose, then you'll get some
more information about what's going on with the locking. My guess is
that you're failing to exclusively lock the repo, but it would say in
the debug messages.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]