Gentoo Archives: gentoo-alt

From: Michael Weiser <michael@×××××××××××××××.net>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] tree verification in prefix
Date: Thu, 22 Feb 2018 20:01:04
Message-Id: 20180222195233.GA20925@weiser.dinsnail.net
In Reply to: Re: [gentoo-alt] tree verification in prefix by Fabian Groffen
1 Hi Fabian,
2
3 On Thu, Feb 22, 2018 at 08:24:25AM +0100, Fabian Groffen wrote:
4
5 > Please excuse my snipping.
6
7 I was rambling, wasn't I. :) I'll snip some more for now.
8
9 > > > hashgen currently runs in 30s or so on the tree to generate
10 > > > manifests.
11 I recompiled gcc overnight and got the following numbers today on one
12 of the ARM SBCs:
13
14 [root@linux:~] time ./hashgen /usr/portage/
15 real 7m28.071s
16 user 10m8.355s
17 sys 0m57.435s
18 [root@linux:~] time ./hashgen /usr/portage/
19 real 7m6.195s
20 user 9m54.715s
21 sys 0m54.123s
22
23 [root@linux:~] time gemato create -K /var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg -f -S -t -H SHA512\ BLAKE2B /usr/portage
24 INFO:root:Creating Manifests in /usr/portage...
25 INFO:root:/usr/portage updated in 599.46 seconds
26
27 real 10m5.431s
28 user 8m54.606s
29 sys 0m59.072s
30
31 So there is a 30% speedup at least.
32
33 > Odd, was this rsync1 or rsync2?
34 [...]
35 > path. Instead rsync1 and rsync2 are doing full generation both of them.
36 > To make this be equal, I had to play a trick with timestamps, I
37 > basically set the timestamp to the git commit time. Maybe this plays a
38 > role too?
39
40 I just retried: timestamp.chk seemed to be in sync between rsync1 and
41 rsync2 at first: A sync from rsync1 syncs some files and later syncs
42 even against rsync2 find timestamp.chk matching.
43
44 When I delete timestamp.chk and retry several times until the other
45 server round-robins in, emaint sync rsyncs what seems like all
46 second-level Manifest.gzs (net-fs, dev-libs, etc.) and what seems like
47 the whole metadata/md5-cache directory.
48
49 When having synced from rsync2, gemato verify failed on
50 dev-cpp/Manifest.gz. When having synced from rsync1, it failed on
51 net-fs/Manifest.gz.
52
53 After waiting for the next refresh, emaint synced selective 2nd level
54 manifests and md5-cache from rsync2 again. It still failed verification
55 on dev-cpp/Manifest.gz.
56
57 On rsync1, timestamp.chk still differed after that first sync and emaint
58 sync again synced selective 2nd and 3rd level manifests and again what
59 seemed like the whole md5-cache. Verification with gemato still failed
60 on net-fs/Manifest.gz.
61
62 So the hash discrepancies seem to survive regeneration.
63
64 Then I deleted the whole $PORTDIR and sync from scratch. This was
65 against rsync1. Verification still fails on net-fs/Manifest.gz.
66
67 Deleting timestamp.chk again and running against rsync2, it behaved as
68 before and again failed at dev-cpp/Manifest.gz.
69
70 $ gemato verify -K /Users/michael/b/pubring.gpg -R -j1
71 /usr/local/gentoo/usr/portage/
72 INFO:root:Manifest timestamp: 2018-02-22 19:26:44 UTC
73 INFO:root:Valid OpenPGP signature found:
74 INFO:root:- primary key: 0204A8ABD003E57A9558850DBA08091EC6317B3C
75 INFO:root:- subkey: 0204A8ABD003E57A9558850DBA08091EC6317B3C
76 INFO:root:- timestamp: 2018-02-22 19:26:44 UTC
77 INFO:root:Verifying /usr/local/gentoo/usr/portage/...
78 ERROR:root:Manifest mismatch for dev-cpp/Manifest.gz
79 BLAKE2B: expected:
80 64d7c4bd55a14e8c7296e8185ad9654db39cfc095107411c97b5f425856f780c0b2dffcef436c07bc07c8832506943e7d80ab5eaf2923eb4bc419dea3a8d071a,
81 have:
82 6b698c9af8c1bf5012ee01ea308718b2f09330a181b48e663a27977885b75bd439a64d568d59de6a2a17bcad86cedf0cd8cda28361155c382badadc0d369843d
83 SHA512: expected:
84 a7d12f2653817a47cc76de6850f8a9ab22bb952f2df1d1029cb23805f868b1d6610a2bc35d1f13666890ed1c9648907e25e949c78f75e2318065b400872e719f,
85 have:
86 070bb46740c8ecc565d23dcc35cedc3bb96d6014b083da8428be00e4008ef2e2d882d3b8e8047fe84e16542b090d02c881c08ce60b052de76406f65caf6dd893
87
88 Can you perhaps confirm these hash discrepancies on the servers?
89
90 > I only checked rsync1 last time, maybe rsync2 isn't as equal as I
91 > thought.
92
93 They both individually seem to produce hash discrepancies on different
94 files.
95 --
96 Thanks,
97 Michael

Replies

Subject Author
Re: [gentoo-alt] tree verification in prefix Fabian Groffen <grobian@g.o>