Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eix claims identical database versions differ #42

Open
robbat2 opened this issue Oct 2, 2017 · 1 comment
Open

eix claims identical database versions differ #42

robbat2 opened this issue Oct 2, 2017 · 1 comment

Comments

@robbat2
Copy link

robbat2 commented Oct 2, 2017

We hit this often on the Gentoo Infrastructure servers, 0.32.9. I think it's a locking issue that eix-update might be running concurrently to a query. The query should block until eix-update has completed, OR the database updates should be written atomically.

# /usr/bin/eix --nocolor --pure-packages \
  --format '<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] <homepage> <description>' \
  --exact --category-name \
  sys-apps/iproute2
/var/cache/eix/portage.eix was created with an incompatible eix-update:
It uses database format 37 (current is 37).
Please run "eix-update" and try again.
@vaeth
Copy link
Owner

vaeth commented Oct 2, 2017

This never happened to me, and it is mysterious to me. According to the code, the output
It uses database format 37 (current is 37)
cannot happen: It happens only if a previous test decided that the 2 printed numbers are unequal.
I have only a vague idea that some __attribute__ ((pure)) might lead to a miscompilation of that test.
Are you able to apply the following patch to check whether it fixes the problem for you?

+++ b/src/database/header.h
@@ -124,7 +124,7 @@ class DBHeader {
                        return ExtendedVersion::Overlay(overlays.size());
                }
 
-               ATTRIBUTE_PURE bool isCurrent() const;
+               bool isCurrent() const;
 };
 
 #endif  // SRC_DATABASE_HEADER_H_

Edit: I change the title, because this error certainly has nothing to do with locking. There is no read operation happening between the check and the output. In fact, the code is almost completely trivial which is why I have no idea what goes wrong here.

@vaeth vaeth changed the title eix database wrongly claims incompatible: eix-update should lock database. eix claims identical database versions differ Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants