-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
cares: sync with upstream, fully adopt v1.13.0 #15378
Conversation
1117377
to
9358665
Compare
I think you’re going to need to refloat c-ares/c-ares@0ef4a0c and c-ares/c-ares@18ea996 as well, that takes care of at least one of the issues edit: the original cherry-picks of ours are in a26be68 and e76c49d |
92cf359
to
22280a7
Compare
@addaleax aye! I just figured that out and have cherry picked them and am pushing for another CI. Looking good locally at least. Thanks. |
22280a7
to
341cd06
Compare
OK, looking good @ https://ci.nodejs.org/job/node-test-commit/12334/, unrelated http2 failure on freebsd10 and unrelated fd failure on aix. There's a bunch of things going on here and I probably need to do more squashing:
PTAL |
@bnoordhuis @indutny re: a2e37f48fe108f996143be66d41428d028f54622 … is this a patch we’re going to float for all of eternity? should we maybe rather try to upstream it, or work around it in Node’s code? |
@piscisaureus tried upstreaming it but it was never merged. I remember it being rejected but maybe it simply fell by the wayside. The mailing list thread is here. |
Updated with manual config for Android Updated with automatic for sunos, *bsd, darwin, linux, aix PR-URL: nodejs#15378
c-ares now includes a LICENSE file so we no longer need to pull from the heading of a file. PR-URL: nodejs#15378
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: nodejs#15378
Was 72c5458: PR-URL: nodejs#5090 Reviewed-By: Fedor Indutny <[email protected]> Reimplemented for c-ares 1.13.0 PR-URL: nodejs#15378
Original commit message: ares_parse_naptr_reply: make buffer length check more accurate 9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check for records parsed by `ares_parse_naptr_reply()`. However, that function is designed to parse replies which also contain non-NAPTR records; for A records, the `rr_len > 7` check will fail as there are only 4 bytes of payload. In particular, parsing ANY replies for NAPTR records was broken by that patch. Fix that by moving the check into the case in which it is already known that the record is a NAPTR record. Ref: c-ares/c-ares@18ea996 PR-URL: nodejs#13883 Reviewed-By: James M Snell <[email protected]>
Original commit message: gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()` When `ares_cancel()` was invoked, `ares_gethostbyaddr()` queries would fail with `ENOTFOUND` instead of `ECANCELLED`. It seems appropriate to treat `ares_cancel()` like `ares_destroy()`, but I would appreciate review of the correctness of this change. Ref: nodejs#14814 Fixes: nodejs#14814 PR-URL: nodejs#15023 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
de39316
to
b02613f
Compare
I've pushed a fresh version with maximal squashing, updated commit descriptions and summaries and a reimplementation of the older floating patch that works properly for 1.13.0, pretty close to original. Note that upgrading c-ares involves unpacking source, trimming out a ton of unnecessary files and manually sorting into src/ and include/, then updating the ares_config.h files—some of which are done on those platforms using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber-stamp lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber-stamp lgtm
I can not tell if the patches are fine or not but they are applied fine on top of v.1.13.0 as far as I see it.
I guess this could land as is? |
Ping @rvagg |
Adding don't land labels for 8, 6 and 4 defensively. This could be landed in 8 if the @nodejs/lts WG agrees. |
Landed in a9f1254...50e580d |
Updated with manual config for Android Updated with automatic for sunos, *bsd, darwin, linux, aix PR-URL: #15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
c-ares now includes a LICENSE file so we no longer need to pull from the heading of a file. PR-URL: #15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: #15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Was 72c5458: PR-URL: #5090 Reviewed-By: Fedor Indutny <[email protected]> Reimplemented for c-ares 1.13.0 PR-URL: #15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Updated with manual config for Android Updated with automatic for sunos, *bsd, darwin, linux, aix PR-URL: nodejs/node#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
c-ares now includes a LICENSE file so we no longer need to pull from the heading of a file. PR-URL: nodejs/node#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: nodejs/node#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: nodejs/node#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Was 72c5458: PR-URL: nodejs/node#5090 Reviewed-By: Fedor Indutny <[email protected]> Reimplemented for c-ares 1.13.0 PR-URL: nodejs/node#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
thanks @BridgeAR, I lost track of this one! |
@rvagg So what's the plan with regards to 8.x? Will this be landing there (since it's not public API)? |
@sgallagher do you want it in 8.x? As @jasnell said in #15378 (comment), we can consider it if there's a reason for it. |
@gibfahn It would be a big help, as this would allow us in Fedora to switch back to using the system copy of c-ares rather than carrying it bundled in Node.js. We're carrying the bundle because some years ago I was told (I think by @bnoordhuis ?) that the bundled c-ares carried patches not in an upstream release, but if you're resyncing to the official 1.13 release, I know that we'll be able to link against the system copy safely. |
@nodejs/lts what do you think about backporting this to 8.x? @rvagg thoughts on the risk for this one? I'm +1 on backporting, but I think it should wait for a couple of months, until this has been in a couple of 9.x releases (it's currently only gone into nightly master releases so far). Also @sgallagher this PR refloats a couple of patches (see a9f1254...50e580d and #15378 (comment)), so you might not be able to use it directly. @bnoordhuis @addaleax @rvagg do you think it's worth opening an issue to try again to upstream the remaining floating patches? I think it's just af171b7 and 34d125f, as the others (9a0631d 50e580d) can be dropped if we move to a newer version. |
@gibfahn Sorry, I can't translate "this PR refloats a couple of patches so you might not be able to use it directly". Does that mean that it's going to patch c-ares to differ from upstream? Because if so, then it doesn't matter to me whether this gets backported because I'm going to be stuck bundling it anyway. |
The patches that we don’t float upstream (af171b7 and 34d125f) look like they should affect behaviour/API on Windows only, so you’re good there. For the other two … I would recommend waiting until they are in a c-ares release, yes. |
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: nodejs#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Was 72c5458: PR-URL: nodejs#5090 Reviewed-By: Fedor Indutny <[email protected]> Reimplemented for c-ares 1.13.0 PR-URL: nodejs#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: nodejs#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> PR-URL: nodejs#19939 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Was 72c5458: PR-URL: nodejs#5090 Reviewed-By: Fedor Indutny <[email protected]> Reimplemented for c-ares 1.13.0 PR-URL: nodejs#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> PR-URL: nodejs#19939 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: #15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> PR-URL: #19939 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Was 72c5458: PR-URL: #5090 Reviewed-By: Fedor Indutny <[email protected]> Reimplemented for c-ares 1.13.0 PR-URL: #15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> PR-URL: #19939 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: nodejs#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> PR-URL: nodejs#19939 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Was 72c5458: PR-URL: nodejs#5090 Reviewed-By: Fedor Indutny <[email protected]> Reimplemented for c-ares 1.13.0 PR-URL: nodejs#15378 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> PR-URL: nodejs#19939 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
A reopen of #9332, I couldn't do it properly there so this is fresh. It also brings us up to 1.13.0 which includes the fix patched in #13897.
This is not complete unfortunately. I'm getting these:
and
I haven't been able to figure the first one out yet, nothing critical seems to have changed in that path as far as I can tell. I haven't looked at the second yet either.