Re: OSTree locking fails sometimes



On 24.01.2019 13:51, Dan Nicholson wrote:
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...

We have about 6 builds which run in parallel and write into the same
OSTree at one point during the end of the build. bitbake should
serialize them, and in a dry run the serialization seems to work fine
across the NFS.

So I am not sure really who is to blame.



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.

Will add --verbose so we have better debug messages next time.

--
Stefan

_______________________________________________
ostree-list mailing list
ostree-list gnome org
https://mail.gnome.org/mailman/listinfo/ostree-list


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