Message ID | pull.1352.v2.git.git.1665783944.gitgitgadget@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | fsmonitor: Implement fsmonitor for Linux | expand |
"Eric DeCosta via GitGitGadget" <gitgitgadget@gmail.com> writes: > Goal is to deliver fsmonitor for Linux that is on par with fsmonitor for > Windows and Mac OS. > > This patch set builds upon previous work for done for Windows and Mac OS > (first 6 patches) to implement a fsmonitor back-end for Linux based on the > Linux inotify API. Again, the first six patches are a part of what is queued as ed/fsmonitor-on-networked-macos that is now in 'next' but lacks a fix-up commit from Jeff King. I understand that it might not be easy/possible (e.g. perhaps it is a limitation of GGG?), but I really prefer not to see them re-posted as part of this series, as I have to apply them and make sure there are no changes from the last one before discarding them. Anyway, thanks for an update. Will requeue.
> -----Original Message----- > From: Junio C Hamano <gitster@pobox.com> > Sent: Friday, October 14, 2022 7:33 PM > To: Eric DeCosta via GitGitGadget <gitgitgadget@gmail.com> > Cc: git@vger.kernel.org; Eric Sunshine <sunshine@sunshineco.com>; Ævar > Arnfjörð Bjarmason <avarab@gmail.com>; Eric DeCosta > <edecosta@mathworks.com> > Subject: Re: [PATCH v2 00/12] fsmonitor: Implement fsmonitor for Linux > > "Eric DeCosta via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > Goal is to deliver fsmonitor for Linux that is on par with fsmonitor > > for Windows and Mac OS. > > > > This patch set builds upon previous work for done for Windows and Mac > > OS (first 6 patches) to implement a fsmonitor back-end for Linux based > > on the Linux inotify API. > > Again, the first six patches are a part of what is queued as ed/fsmonitor-on- > networked-macos that is now in 'next' but lacks a fix-up commit from Jeff > King. > > I understand that it might not be easy/possible (e.g. perhaps it is a limitation > of GGG?), but I really prefer not to see them re-posted as part of this series, > as I have to apply them and make sure there are no changes from the last > one before discarding them. > > Anyway, thanks for an update. Will requeue. I looks like I can use GGG with the next branch, but I will have to open a new PR (and close the existing one). -Eric
At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc: $ make NO_APPLE_COMMON_CRYPTO=1 DC_SHA1=1 NO_OPENSSL=1 compat/fsmonitor/fsm-ipc-darwin.o CC compat/fsmonitor/fsm-ipc-darwin.o compat/fsmonitor/fsm-ipc-darwin.c:13:2: error: unknown type name 'SHA_CTX'; did you mean 'SHA1_CTX'? SHA_CTX sha1ctx; ^~~~~~~ SHA1_CTX ./sha1dc/sha1.h:55:3: note: 'SHA1_CTX' declared here } SHA1_CTX; ^ compat/fsmonitor/fsm-ipc-darwin.c:16:21: error: use of undeclared identifier 'SHA_DIGEST_LENGTH' unsigned char hash[SHA_DIGEST_LENGTH]; ^ compat/fsmonitor/fsm-ipc-darwin.c:31:2: error: implicit declaration of function 'SHA1_Init' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1_Init(&sha1ctx); ^ compat/fsmonitor/fsm-ipc-darwin.c:31:2: note: did you mean 'SHA1DCInit'? ./sha1dc/sha1.h:58:6: note: 'SHA1DCInit' declared here void SHA1DCInit(SHA1_CTX*); ^ compat/fsmonitor/fsm-ipc-darwin.c:32:2: error: implicit declaration of function 'SHA1_Update' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1_Update(&sha1ctx, r->worktree, strlen(r->worktree)); ^ compat/fsmonitor/fsm-ipc-darwin.c:32:2: note: did you mean 'SHA1DCUpdate'? ./sha1dc/sha1.h:96:6: note: 'SHA1DCUpdate' declared here void SHA1DCUpdate(SHA1_CTX*, const char*, size_t); ^ compat/fsmonitor/fsm-ipc-darwin.c:33:2: error: implicit declaration of function 'SHA1_Final' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1_Final(hash, &sha1ctx); ^ compat/fsmonitor/fsm-ipc-darwin.c:33:2: note: did you mean 'SHA1DCFinal'? ./sha1dc/sha1.h:100:6: note: 'SHA1DCFinal' declared here int SHA1DCFinal(unsigned char[20], SHA1_CTX*); ^ 5 errors generated. make: *** [compat/fsmonitor/fsm-ipc-darwin.o] Error 1 Without NO_OPENSSL, this still fails, but with slightly different error messages. $ make NO_APPLE_COMMON_CRYPTO=1 DC_SHA1=1 compat/fsmonitor/fsm-ipc-darwin.o CC compat/fsmonitor/fsm-ipc-darwin.o compat/fsmonitor/fsm-ipc-darwin.c:31:2: error: 'SHA1_Init' is deprecated [-Werror,-Wdeprecated-declarations] SHA1_Init(&sha1ctx); ^ /opt/local/include/openssl/sha.h:49:1: note: 'SHA1_Init' has been explicitly marked deprecated here OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c); ^ /opt/local/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) ^ /opt/local/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' # define OSSL_DEPRECATED(since) __attribute__((deprecated)) ^ compat/fsmonitor/fsm-ipc-darwin.c:32:2: error: 'SHA1_Update' is deprecated [-Werror,-Wdeprecated-declarations] SHA1_Update(&sha1ctx, r->worktree, strlen(r->worktree)); ^ /opt/local/include/openssl/sha.h:50:1: note: 'SHA1_Update' has been explicitly marked deprecated here OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len); ^ /opt/local/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) ^ /opt/local/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' # define OSSL_DEPRECATED(since) __attribute__((deprecated)) ^ compat/fsmonitor/fsm-ipc-darwin.c:33:2: error: 'SHA1_Final' is deprecated [-Werror,-Wdeprecated-declarations] SHA1_Final(hash, &sha1ctx); ^ /opt/local/include/openssl/sha.h:51:1: note: 'SHA1_Final' has been explicitly marked deprecated here OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c); ^ /opt/local/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) ^ /opt/local/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' # define OSSL_DEPRECATED(since) __attribute__((deprecated)) ^ 3 errors generated. make: *** [compat/fsmonitor/fsm-ipc-darwin.o] Error 1 "Eric DeCosta via GitGitGadget" <gitgitgadget@gmail.com> writes: > Goal is to deliver fsmonitor for Linux that is on par with fsmonitor for > Windows and Mac OS. > > This patch set builds upon previous work for done for Windows and Mac OS > (first 6 patches) to implement a fsmonitor back-end for Linux based on the > Linux inotify API. inotify differs significantly from the equivalent Windows > and Mac OS APIs in that a watch must be registered for every directory of > interest (rather than a singular watch at the root of the directory tree) > and special care must be taken to handle directory renames correctly. > > More information about inotify: > https://man7.org/linux/man-pages/man7/inotify.7.html > > v1 differs from v0: > > * Code review feedback > * Update how and which code can be shared between Mac OS and Linux > * Increase polling frequency to every 1ms (matches Mac OS) > * Updates to t7527 to improve test stability >
Eric DeCosta <edecosta@mathworks.com> writes: >> I understand that it might not be easy/possible (e.g. perhaps it is a limitation >> of GGG?), but I really prefer not to see them re-posted as part of this series, >> as I have to apply them and make sure there are no changes from the last >> one before discarding them. >> >> Anyway, thanks for an update. Will requeue. > > I looks like I can use GGG with the next branch, but I will have > to open a new PR (and close the existing one). Please don't. The macOS topic (thanks for working on it, by the way) is about to graduate to 'master', and the situation would probably "improve" anyway when it happens, I hope. Thanks.
Glen Choo <chooglen@google.com> writes:
> At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc:
Thanks for a report.
How dissapointing. The thing is that the topic has been in 'next'
since the 11th (i.e. early last week), and I know that you guys rely
on the tip of 'next' in working order to cut your internal releases,
but we did not hear about this until now. What makes it taste even
worse is that nobody else caught this, even though we seem to have a
couple of macOS jobs at GitHub Actions CI, there we didn't see any
breakage related to this.
Possible action items:
* See what configurations our two macOS jobs are using. If neither
is using sha1dc, I would say that is criminal [*] and at least
one of them should be updated to do so right away.
* The "two macOS CI jobs sharing too many configuration knobs" may
not be limited to just SHA-1 implementation, but unlike Linux
builds and tests, we may have similar "monoculture" issue in our
macOS CI builds. Those users, who depend on macOS port being
healthy, should help identify unnecessary overlaps between the
two, and more importantly, make sure we have CI builds with
configuration similar to what they actually use.
* Adding a few build-only-without-tests CI jobs also might help.
* Those who depend on working macOS port, especially those with
corporate backing who choose to use configurations that are
different from what we have CI builds for, are requested to
arrange a more frequent build test to catch a problem like this
much earlier.
Anything else I forgot that we can do to improve the situation? I
personally do not use macOS, I am not interested in using one, but
I do value those who choose to use macOS have happy git working on
their platform, so the stakeholders need to chip in.
Thanks.
[Footnote]
* Until the world migrates over to SHA-256, the collision detecting
SHA-1 implementation is what we must use unless there is a strong
reason not to. If we are not testing something that ought to be
the default, we are not doing a very good job.
Hi Eric, On Mon, 17 Oct 2022, Eric DeCosta wrote: > > -----Original Message----- > > From: Junio C Hamano <gitster@pobox.com> > > Sent: Friday, October 14, 2022 7:33 PM > > To: Eric DeCosta via GitGitGadget <gitgitgadget@gmail.com> > > Cc: git@vger.kernel.org; Eric Sunshine <sunshine@sunshineco.com>; Ævar > > Arnfjörð Bjarmason <avarab@gmail.com>; Eric DeCosta > > <edecosta@mathworks.com> > > Subject: Re: [PATCH v2 00/12] fsmonitor: Implement fsmonitor for Linux > > > > "Eric DeCosta via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > > > Goal is to deliver fsmonitor for Linux that is on par with fsmonitor > > > for Windows and Mac OS. > > > > > > This patch set builds upon previous work for done for Windows and Mac > > > OS (first 6 patches) to implement a fsmonitor back-end for Linux based > > > on the Linux inotify API. > > > > Again, the first six patches are a part of what is queued as ed/fsmonitor-on- > > networked-macos that is now in 'next' but lacks a fix-up commit from Jeff > > King. > > > > I understand that it might not be easy/possible (e.g. perhaps it is a limitation > > of GGG?), but I really prefer not to see them re-posted as part of this series, > > as I have to apply them and make sure there are no changes from the last > > one before discarding them. GitGitGadget mirrors all branches from gitster/git to gitgitgadget/git, so if you open a PR in the latter repository, you can use all of those branches as targets. But this PR is in git/git, which does not offer that. > > Anyway, thanks for an update. Will requeue. > > I looks like I can use GGG with the next branch, but I will have to open a new PR (and close the existing one). No, you do not have to open a new PR for that. You just hit the Edit button on the top (as if you wanted to change the title) and then select the target ("base") branch in the drop-down box under the title. Ciao, Dscho
Cc-ed Johannes, who would know a lot more about CI than I do. Junio C Hamano <gitster@pobox.com> writes: > Glen Choo <chooglen@google.com> writes: > >> At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc: > > Thanks for a report. > > How dissapointing. The thing is that the topic has been in 'next' > since the 11th (i.e. early last week), and I know that you guys rely > on the tip of 'next' in working order to cut your internal releases, > but we did not hear about this until now. Yes. Unfortunately, we (Google's Git team) release on a weekly cadence; we merge on Fridays and build on Mondays (PST), which makes this timing extremely unfortunate. > Possible action items: > > * See what configurations our two macOS jobs are using. If neither > is using sha1dc, I would say that is criminal [*] and at least > one of them should be updated to do so right away. I'm not too familiar with the CI, but I took a quick peek at ci/lib.sh and noticed that none of the jobs build with sha1dc, not even the Linux or Windows ones, so.. > * The "two macOS CI jobs sharing too many configuration knobs" may > not be limited to just SHA-1 implementation, but unlike Linux > builds and tests, we may have similar "monoculture" issue in our > macOS CI builds. Those users, who depend on macOS port being > healthy, should help identify unnecessary overlaps between the > two, and more importantly, make sure we have CI builds with > configuration similar to what they actually use. I don't think this is a macOS-specific issue; our CI just doesn't do a good job with testing various build configurations. > * Adding a few build-only-without-tests CI jobs also might help. This sounds like the way to go IMO. It might be too expensive to run the full test suite on every build configuration, but build-without-test might be ok. > * Those who depend on working macOS port, especially those with > corporate backing who choose to use configurations that are > different from what we have CI builds for, are requested to > arrange a more frequent build test to catch a problem like this > much earlier. I wished we had caught it sooner too. The folks here generally agree that our weekly release cycle is not ideal for reasons such as this. Hopefully this is good motivation to move that work forward, though I can't promise anything right now. > Anything else I forgot that we can do to improve the situation? I > personally do not use macOS, I am not interested in using one, but > I do value those who choose to use macOS have happy git working on > their platform, so the stakeholders need to chip in. There's nothing else I can think of at the moment. Thanks for your patience and for moving the conversation along. > > Thanks. > > > [Footnote] > > * Until the world migrates over to SHA-256, the collision detecting > SHA-1 implementation is what we must use unless there is a strong > reason not to. If we are not testing something that ought to be > the default, we are not doing a very good job.
Glen Choo <chooglen@google.com> writes: > I wished we had caught it sooner too. The folks here generally agree > that our weekly release cycle is not ideal for reasons such as this. > Hopefully this is good motivation to move that work forward, though I > can't promise anything right now. It is perfectly OK to have an automated trial build job that runs more frequently than your weekly release cycle, though. It should usually yield only a single bit of usable information (e.g. "there is no 'does not even build from the source' issue in upstream") that may give you assurance (e.g. "if we maintain the course, the next real build for release would hopefully go smoothly"), but when it breaks, you have more time to react. Thanks.
On Mon, Oct 17 2022, Junio C Hamano wrote: > Glen Choo <chooglen@google.com> writes: > >> At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc: > > Thanks for a report. > > How dissapointing. The thing is that the topic has been in 'next' > since the 11th (i.e. early last week), and I know that you guys rely > on the tip of 'next' in working order to cut your internal releases, > but we did not hear about this until now. What makes it taste even > worse is that nobody else caught this, even though we seem to have a > couple of macOS jobs at GitHub Actions CI, there we didn't see any > breakage related to this. FWIW I see you caught it on the 9th in https://lore.kernel.org/git/xmqqh70c62w0.fsf@gitster.g/, but then the base topic was merged down on the 17th. > Possible action items: > > * See what configurations our two macOS jobs are using. If neither > is using sha1dc, I would say that is criminal [*] and at least > one of them should be updated to do so right away. I submitted a v2 of my series to finally make OSX use SHA1DC by default: https://lore.kernel.org/git/cover-v2-0.4-00000000000-20221019T010222Z-avarab@gmail.com/ As part of that we'll CI that & the current "apple common crypto" implementations, currently we just do the latter, which is why we didn't catch this. We could follow-up and CI the OpenSSL one too, but that was a larger change, so I punted on it. In any case, https://lore.kernel.org/git/patch-v2-1.4-392fabdb456-20221019T010222Z-avarab@gmail.com/ in that series un-breaks master, maybe you're interested in peeling it off & fast-tracking it? I didn't submit it separately because I don't know how much of a rush we're in there (given that CI isn't broken).
On Tue, Oct 18 2022, Glen Choo wrote: > Cc-ed Johannes, who would know a lot more about CI than I do. > > Junio C Hamano <gitster@pobox.com> writes: > >> Glen Choo <chooglen@google.com> writes: >> >>> At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc: >> >> Thanks for a report. >> >> How dissapointing. The thing is that the topic has been in 'next' >> since the 11th (i.e. early last week), and I know that you guys rely >> on the tip of 'next' in working order to cut your internal releases, >> but we did not hear about this until now. > > Yes. Unfortunately, we (Google's Git team) release on a weekly cadence; > we merge on Fridays and build on Mondays (PST), which makes this timing > extremely unfortunate. > >> Possible action items: >> >> * See what configurations our two macOS jobs are using. If neither >> is using sha1dc, I would say that is criminal [*] and at least >> one of them should be updated to do so right away. > > I'm not too familiar with the CI, but I took a quick peek at ci/lib.sh > and noticed that none of the jobs build with sha1dc, not even the Linux > or Windows ones, so.. All of our jobs except the OSX one build with SHA1_DC, because it's the default. Per my just-sent https://lore.kernel.org/git/cover-v2-0.4-00000000000-20221019T010222Z-avarab@gmail.com/ the blind spot has been lack fo SHA1_DC on OSX, for others it's the reverse, we don't test e.g. BLK_SHA1. In practice we've been catching SHA-implementation specific code early because the OSX implementation was different, but in this case it's OSX-only code, so it only supported the Apple Common Crypto backend. >> * The "two macOS CI jobs sharing too many configuration knobs" may >> not be limited to just SHA-1 implementation, but unlike Linux >> builds and tests, we may have similar "monoculture" issue in our >> macOS CI builds. Those users, who depend on macOS port being >> healthy, should help identify unnecessary overlaps between the >> two, and more importantly, make sure we have CI builds with >> configuration similar to what they actually use. > > I don't think this is a macOS-specific issue; our CI just doesn't do a > good job with testing various build configurations. Yes, definitely. >> * Adding a few build-only-without-tests CI jobs also might help. > > This sounds like the way to go IMO. It might be too expensive to run the > full test suite on every build configuration, but build-without-test > might be ok. Yes, there's not much point in running the full tests for some of these variants. A lot of it we can also get for free, e.g. we run some linux jobs with clang, some with gcc etc., we could also run one with BLK_SHA1, one with OPENSSL_SHA1 etc.
On Tue, Oct 18, 2022 at 9:22 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote: > On Tue, Oct 18 2022, Glen Choo wrote: > > I'm not too familiar with the CI, but I took a quick peek at ci/lib.sh > > and noticed that none of the jobs build with sha1dc, not even the Linux > > or Windows ones, so.. > > All of our jobs except the OSX one build with SHA1_DC, because it's the > default. > > Per my just-sent > https://lore.kernel.org/git/cover-v2-0.4-00000000000-20221019T010222Z-avarab@gmail.com/ > the blind spot has been lack fo SHA1_DC on OSX, for others it's the > reverse, we don't test e.g. BLK_SHA1. > > In practice we've been catching SHA-implementation specific code early > because the OSX implementation was different, but in this case it's > OSX-only code, so it only supported the Apple Common Crypto backend. I don't know how germane it is to the current thread, but previous discussions[1,2,3,4] favored dropping use of Apple's Common Crypto altogether since it doesn't seem to buy us much (or anything) and is incomplete; it doesn't support all of the OpenSSL API Git uses. [1]: https://lore.kernel.org/git/CAPig+cTfMx_kwUAxBRHp6kNSOtXsdsv=odUQSRYVpV21DnRuvA@mail.gmail.com/ [2]: https://lore.kernel.org/git/CAMYxyaVQyVRQb-b0nVv412tMZ3rEnOfUPRakg2dEREg5_Ba5Ag@mail.gmail.com/T/ [3]: https://lore.kernel.org/git/20160102234923.GA14424@gmail.com/ [4]: https://lore.kernel.org/git/CAPig+cQ5kKAt2_RQnqT7Rn=uGmHV9VvxpQ+UgDPOj=D=pq6arg@mail.gmail.com/
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > On Mon, Oct 17 2022, Junio C Hamano wrote: > >> Glen Choo <chooglen@google.com> writes: >> >>> At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc: >> >> Thanks for a report. >> >> How dissapointing. The thing is that the topic has been in 'next' >> since the 11th (i.e. early last week), and I know that you guys rely >> on the tip of 'next' in working order to cut your internal releases, >> but we did not hear about this until now. What makes it taste even >> worse is that nobody else caught this, even though we seem to have a >> couple of macOS jobs at GitHub Actions CI, there we didn't see any >> breakage related to this. > > FWIW I see you caught it on the 9th in > https://lore.kernel.org/git/xmqqh70c62w0.fsf@gitster.g/, but then the > base topic was merged down on the 17th. Heh, I already forgot I made that comment myself ;-) Thanks for reminding, and thanks for picking the single step to fast-track the fix.
Eric Sunshine <sunshine@sunshineco.com> writes: > I don't know how germane it is to the current thread, but previous > discussions[1,2,3,4] favored dropping use of Apple's Common Crypto > altogether since it doesn't seem to buy us much (or anything) and is > incomplete; it doesn't support all of the OpenSSL API Git uses. Yeah, that matches my recollection. Unless the situation has much changed, dropping it may not be a bad thing to do. But * Fixing the fsmonitor code so that it can also be used with things other than Common Crypto is the most urgent. The topic gave us a grave regression (those who used to successfully build Git can no longer build with their favourite configuration). * Updating the build procedure so that sha1dc is used by default everywhere is a good idea, but that is less urgent and should be done separately, preferrably long after the dust settles from the above. * Removing Common Crypto support may not be a bad idea, but that is even less urgent, unless the support burden is slowing us down or forcing us to settle on common set of features that is too limiting. Thanks.
On Tue, Oct 18 2022, Eric Sunshine wrote: > On Tue, Oct 18, 2022 at 9:22 PM Ævar Arnfjörð Bjarmason > <avarab@gmail.com> wrote: >> On Tue, Oct 18 2022, Glen Choo wrote: >> > I'm not too familiar with the CI, but I took a quick peek at ci/lib.sh >> > and noticed that none of the jobs build with sha1dc, not even the Linux >> > or Windows ones, so.. >> >> All of our jobs except the OSX one build with SHA1_DC, because it's the >> default. >> >> Per my just-sent >> https://lore.kernel.org/git/cover-v2-0.4-00000000000-20221019T010222Z-avarab@gmail.com/ >> the blind spot has been lack fo SHA1_DC on OSX, for others it's the >> reverse, we don't test e.g. BLK_SHA1. >> >> In practice we've been catching SHA-implementation specific code early >> because the OSX implementation was different, but in this case it's >> OSX-only code, so it only supported the Apple Common Crypto backend. > > I don't know how germane it is to the current thread, but previous > discussions[1,2,3,4] favored dropping use of Apple's Common Crypto > altogether since it doesn't seem to buy us much (or anything) and is > incomplete; it doesn't support all of the OpenSSL API Git uses. > > [1]: https://lore.kernel.org/git/CAPig+cTfMx_kwUAxBRHp6kNSOtXsdsv=odUQSRYVpV21DnRuvA@mail.gmail.com/ > [2]: https://lore.kernel.org/git/CAMYxyaVQyVRQb-b0nVv412tMZ3rEnOfUPRakg2dEREg5_Ba5Ag@mail.gmail.com/T/ > [3]: https://lore.kernel.org/git/20160102234923.GA14424@gmail.com/ > [4]: https://lore.kernel.org/git/CAPig+cQ5kKAt2_RQnqT7Rn=uGmHV9VvxpQ+UgDPOj=D=pq6arg@mail.gmail.com/ Yeah, maybe. I'd be 100% OK with that happening, but I don't use OSX outside fo CI really, so I wanted to avoid scope creep to "non-SHA stuff we use OpenSSL/AppleCommonCrypto/whatever" for, in the cases where we can/do use OpenSSL/AppleCommonCrypto/whatever for SHA also. I.e. that's basically a question about what https://, git-imap-send etc. should be using if not vanilla OpenSSL & the like. But if you/someone can come up with a patch that confidently asserts that it's useless & drops it I'd be happy to either integrate it & submit it as part of this series if it makes things simpler, or alternatively re-roll on top of it. I'm just not confident in making that case myself, since I hardly use the platform, am not too familiar with the various concerns (aside from skimming the links above), and don't really have interest in pursuing that. OTOH if you do want to make the case for dropping Apple Common Crypto that would also presumably be much easier after this series, once we're past justifying the hurdle of "wait, we're switching the thing we use for SHA-1 by default, which we build practically everything in git on?" :) 1. https://lore.kernel.org/git/CAPig+cQ5kKAt2_RQnqT7Rn=uGmHV9VvxpQ+UgDPOj=D=pq6arg@mail.gmail.com/
On Wed, Oct 19, 2022 at 3:16 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote: > On Tue, Oct 18 2022, Eric Sunshine wrote: > > On Tue, Oct 18, 2022 at 9:22 PM Ævar Arnfjörð Bjarmason > > <avarab@gmail.com> wrote: > >> In practice we've been catching SHA-implementation specific code early > >> because the OSX implementation was different, but in this case it's > >> OSX-only code, so it only supported the Apple Common Crypto backend. > > > > I don't know how germane it is to the current thread, but previous > > discussions[1,2,3,4] favored dropping use of Apple's Common Crypto > > altogether since it doesn't seem to buy us much (or anything) and is > > incomplete; it doesn't support all of the OpenSSL API Git uses. > > Yeah, maybe. I'd be 100% OK with that happening, but I don't use OSX > outside fo CI really, so I wanted to avoid scope creep to "non-SHA stuff > we use OpenSSL/AppleCommonCrypto/whatever" for, in the cases where we > can/do use OpenSSL/AppleCommonCrypto/whatever for SHA also. Indeed, I was not suggesting that retirement of AppleCommonCrypto be tackled by you or by the series you posted to fix the build failure; doing so is well outside the scope of the immediate problem. I brought up those old discussions only as reference and as a pointer that whatever fix is eventually adopted for the immediate build problem need not necessarily bend over backward for AppleCommonCrypto support if a long-term goal is to drop AppleCommonCrypto (i.e. do as little as necessary to keep AppleCommonCrypto in a working state, but don't go overboard trying to give it first-class support since it will never be a complete replacement for OpenSSL). > But if you/someone can come up with a patch that confidently asserts > that it's useless & drops it I'd be happy to either integrate it & > submit it as part of this series if it makes things simpler, or > alternatively re-roll on top of it. > > I'm just not confident in making that case myself, since I hardly use > the platform, am not too familiar with the various concerns (aside from > skimming the links above), and don't really have interest in pursuing > that. I was not suggesting holding up your series or integrating retirement of AppleCommonCrypto with it; they are separate concerns. > OTOH if you do want to make the case for dropping Apple Common Crypto > that would also presumably be much easier after this series, once we're > past justifying the hurdle of "wait, we're switching the thing we use > for SHA-1 by default, which we build practically everything in git on?" My "don't know how germane it is to the current thread" observation was in response to the `fsmonitor` thread, before I ever saw the series you posted for fixing the build failure, so it wasn't given as any sort of feedback on your series, and wasn't asking you to incorporate retirement of AppleCommonCrypto into your series. That said, it does appear that dropping AppleCommonCrypto should become easier after your changes land if someone opts to tackle the task.
Glen Choo <chooglen@google.com> writes: > At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc: > > $ make NO_APPLE_COMMON_CRYPTO=1 DC_SHA1=1 NO_OPENSSL=1 compat/fsmonitor/fsm-ipc-darwin.o Glen, Ævar has cherry-picked the SHA_CTX -> git_SHA_CTX build fix and I have merged it to 'next'. Can you test-build to see if that change is sufficient to fix "does not even build from the source" issue for you guys? You do not have to go through any official full qualification cycle or release procedure---just checking that you would be OK when you need to do the build the next time before it has to happen is sufficient. Thanks.
Junio C Hamano <gitster@pobox.com> writes: > Possible action items: > > * See what configurations our two macOS jobs are using. If neither > is using sha1dc, I would say that is criminal [*] and at least > one of them should be updated to do so right away. So here is my "panda-see-panda-do" attempt. ----- >8 --------- >8 --------- >8 --------- >8 --------- >8 ----- Subject: [PATCH] ci: use DC_SHA1=1 on osx-clang job for CI All other jobs were using the default DC_SHA1 (which is a recommended practice), but the default for macOS jobs being Apple's common crypt, we didn't catch recent breakage soon enough. We may want to give similar diversity for Linux jobs so that some of them build with other implementations of SHA-1, but let's start small and fill only the immediate need. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- ci/lib.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/lib.sh b/ci/lib.sh index 1b0cc2b57d..5a115704cb 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -259,6 +259,8 @@ macos-latest) MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" else MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" + MAKEFLAGS="$MAKEFLAGS NO_APPLE_COMMON_CRYPTO=NoThanks" + MAKEFLAGS="$MAKEFLAGS DC_SHA1=1 NO_OPENSSL=1" fi ;; esac
On Thu, Oct 20, 2022 at 12:13 PM Junio C Hamano <gitster@pobox.com> wrote: > So here is my "panda-see-panda-do" attempt. > > ----- >8 --------- >8 --------- >8 --------- >8 --------- >8 ----- > Subject: [PATCH] ci: use DC_SHA1=1 on osx-clang job for CI > > All other jobs were using the default DC_SHA1 (which is a > recommended practice), but the default for macOS jobs being Apple's > common crypt, we didn't catch recent breakage soon enough. "recent breakage" is quite vague and probably won't help future readers understand what this is actually fixing. Possible improvements: (1) a prose description of the breakage; (2) the actual compiler error message; (3) a pointer[1] to the email reporting the problem. One or more of the above improvements to the commit message would help future readers. [1]: https://lore.kernel.org/git/kl6l7d0yyu6r.fsf@chooglen-macbookpro.roam.corp.google.com/ > We may want to give similar diversity for Linux jobs so that some of > them build with other implementations of SHA-1, but let's start > small and fill only the immediate need. > > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > diff --git a/ci/lib.sh b/ci/lib.sh > index 1b0cc2b57d..5a115704cb 100755 > --- a/ci/lib.sh > +++ b/ci/lib.sh > @@ -259,6 +259,8 @@ macos-latest) > MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" > else > MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" > + MAKEFLAGS="$MAKEFLAGS NO_APPLE_COMMON_CRYPTO=NoThanks" > + MAKEFLAGS="$MAKEFLAGS DC_SHA1=1 NO_OPENSSL=1" > fi > ;; > esac
Eric Sunshine <sunshine@sunshineco.com> writes: > On Thu, Oct 20, 2022 at 12:13 PM Junio C Hamano <gitster@pobox.com> wrote: >> So here is my "panda-see-panda-do" attempt. >> >> ----- >8 --------- >8 --------- >8 --------- >8 --------- >8 ----- >> Subject: [PATCH] ci: use DC_SHA1=1 on osx-clang job for CI >> >> All other jobs were using the default DC_SHA1 (which is a >> recommended practice), but the default for macOS jobs being Apple's >> common crypt, we didn't catch recent breakage soon enough. > > "recent breakage" is quite vague and probably won't help future > readers understand what this is actually fixing. Possible > improvements: (1) a prose description of the breakage; (2) the actual > compiler error message; (3) a pointer[1] to the email reporting the > problem. One or more of the above improvements to the commit message > would help future readers. I do not think (2) or (3) would help all that much. A finger that points at the exact commit that broke the build (with the condition under which the build breaks) would probably be the most useful to those who read "git log" output. Thanks. ----- >8 --------- >8 --------- >8 --------- >8 --------- >8 ----- Subject: [PATCH] ci: use DC_SHA1=YesPlease on osx-clang job for CI 7b8cfe34 (Merge branch 'ed/fsmonitor-on-networked-macos', 2022-10-17) broke the build on macOS with sha1dc by bypassing our hash abstraction (git_SHA_CTX etc.), but it wasn't caught before the problematic topic was merged down to the 'master' branch. Nobody was even compile testing with DC_SHA1 set, although it is the recommended choice in these days for folks when they use SHA-1. This was because the default for macOS uses Apple Common Crypto, and both of the two CI jobs did not override the default. Tweak one of them to use DC_SHA1 to improve the coverage. We may want to give similar diversity for Linux jobs so that some of them build with other implementations of SHA-1; they currently all build and test with DC_SHA1 as that is the default on everywhere other than macOS. But let's start small to fill only the immediate need. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- ci/lib.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/lib.sh b/ci/lib.sh index 1b0cc2b57d..51e47aa5d6 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -259,6 +259,8 @@ macos-latest) MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" else MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" + MAKEFLAGS="$MAKEFLAGS NO_APPLE_COMMON_CRYPTO=NoThanks" + MAKEFLAGS="$MAKEFLAGS DC_SHA1=YesPlease NO_OPENSSL=NoThanks" fi ;; esac
On Thu, Oct 20, 2022 at 1:01 PM Junio C Hamano <gitster@pobox.com> wrote: > Eric Sunshine <sunshine@sunshineco.com> writes: > > On Thu, Oct 20, 2022 at 12:13 PM Junio C Hamano <gitster@pobox.com> wrote: > >> All other jobs were using the default DC_SHA1 (which is a > >> recommended practice), but the default for macOS jobs being Apple's > >> common crypt, we didn't catch recent breakage soon enough. > > > > "recent breakage" is quite vague and probably won't help future > > readers understand what this is actually fixing. Possible > > improvements: (1) a prose description of the breakage; (2) the actual > > compiler error message; (3) a pointer[1] to the email reporting the > > problem. One or more of the above improvements to the commit message > > would help future readers. > > I do not think (2) or (3) would help all that much. A finger that > points at the exact commit that broke the build (with the condition > under which the build breaks) would probably be the most useful to > those who read "git log" output. > > ----- >8 --------- >8 --------- >8 --------- >8 --------- >8 ----- > Subject: [PATCH] ci: use DC_SHA1=YesPlease on osx-clang job for CI > > 7b8cfe34 (Merge branch 'ed/fsmonitor-on-networked-macos', > 2022-10-17) broke the build on macOS with sha1dc by bypassing our > hash abstraction (git_SHA_CTX etc.), but it wasn't caught before the > problematic topic was merged down to the 'master' branch. Nobody > was even compile testing with DC_SHA1 set, although it is the > recommended choice in these days for folks when they use SHA-1. > > This was because the default for macOS uses Apple Common Crypto, and > both of the two CI jobs did not override the default. Tweak one of > them to use DC_SHA1 to improve the coverage. Thanks. This revised commit message does a much better job of explaining the problem the patch is addressing.
Junio C Hamano <gitster@pobox.com> writes: > Glen Choo <chooglen@google.com> writes: > >> At $DAYJOB, we observed that this topic breaks MacOS builds with sha1dc: >> >> $ make NO_APPLE_COMMON_CRYPTO=1 DC_SHA1=1 NO_OPENSSL=1 compat/fsmonitor/fsm-ipc-darwin.o > > Glen, Ævar has cherry-picked the SHA_CTX -> git_SHA_CTX build fix > and I have merged it to 'next'. Can you test-build to see if that > change is sufficient to fix "does not even build from the source" > issue for you guys? You do not have to go through any official full > qualification cycle or release procedure---just checking that you > would be OK when you need to do the build the next time before it > has to happen is sufficient. > > Thanks. FYI, https://github.com/git/git/actions/runs/3292710187 is a successful (wow, what's a rare event these days) run of CI on 'seen' that includes * Peff's -O0 fix for unconfusing LSan to prevent it from giving false positives * Eric DeCosta's change, cherry-picked by Ævar, to let fsmonitor stuff compile with sha1dc as well as Apple's Common Crypto. * A tweak to make one of the macOS CI jobs to build with sha1dc. among all the other topics in flight. I plan to merge all of them to 'next' (I think the first two are already in 'next') and fast track them down to 'master'.