luke-jr
commented at 3:59 am on March 7, 2020:
member
libevent uses getaddrinfo when available, and falls back to gethostbyname
Windows has both, but gethostbyname only supports IPv4
libevent fails to detect Windows’s getaddrinfo due to not including the right headers
This patches libevent’s configure script to check it correctly
depends: Patch libevent build to fix IPv6 -rpcbind on Windows
libevent uses getaddrinfo when available, and falls back to gethostbyname
Windows has both, but gethostbyname only supports IPv4
libevent fails to detect Windows's getaddrinfo due to not including the right headers
This patches libevent's configure script to check it correctly
e918138fd5
fanquake added the label
Build system
on Mar 7, 2020
fanquake added the label
Needs gitian build
on Mar 7, 2020
fanquake added the label
Windows
on Mar 7, 2020
DrahtBot removed the label
Needs gitian build
on Mar 7, 2020
luke-jr referenced this in commit
aa0f3fc376
on Mar 7, 2020
laanwj added the label
RPC/REST/ZMQ
on Mar 11, 2020
laanwj
commented at 2:23 pm on March 11, 2020:
member
Good catch. It’s really sneaky that including a header can make this difference.
I think it’d be good to have a test for this case to detect regression.
MarcoFalke added the label
Needs gitian build
on Mar 11, 2020
luke-jr
commented at 4:05 pm on March 11, 2020:
member
Who maintains the Windows CI stuff? That’s the only place I can see a test making sense…
MarcoFalke
commented at 4:47 pm on March 11, 2020:
member
How would a test case look like? Can’t it be added as a normal unit or functional test?
luke-jr
commented at 5:51 pm on March 11, 2020:
member
I think just specifying -rpcbind=::1 would fail at startup. Does AppVeyor run the functional tests?
MarcoFalke
commented at 6:36 pm on March 11, 2020:
member
Appveyor uses msvc to compile, not sure if that changes anything. @sipsorcery
0libevent: event_add: event: 000001F4D284AA20 (fd 1764), EV_READ call 00007FF6DB2244A0
12020-03-11T18:48:42Z libevent: win32_add: adding event for 1764
22020-03-11T18:48:42Z Binding RPC on address ::1 port 8332
32020-03-11T18:48:42Z libevent: Detected an IPv4 interface
42020-03-11T18:48:42Z libevent: getaddrinfo: nodename nor servname provided, or not known
52020-03-11T18:48:42Z Binding RPC on address ::1 port 8332 failed.
62020-03-11T18:48:42Z Unable to bind any endpoint for RPC server
72020-03-11T18:48:42Z libevent: event_del: 000001F4D284AA20 (fd 1764), callback 00007FF6DB2244A0
82020-03-11T18:48:42Z libevent: win32_del: Removing event for 1764
92020-03-11T18:48:42Z libevent: event_base_free_: 0 events freed
This does appear to support Luke’s diagnosis.
The patch won’t solve the problem for msvc builds because the libevent dependency isn’t installed with the Bitcoin Core depends scripts (it uses vcpkg in the .appveyor file).
If it’s possible it would seem sensible to add a unit test that attempts to start bitcoind with the rpc listener on ::1. I can’t recall if the appveyor vm’s have IPv6 enabled or not, I’ll check.
DrahtBot
commented at 8:50 am on March 12, 2020:
member
However I have also tried to verify the fix, and after cross-compiling this PR and taking bitcoind.exe into a Windows 10 VM I cannot get it to run using the same command as @sipsorcery. i.e bitcoind.exe -rpcbind=::1 -rpcallowip=0.0.0.0/0 -debug.
Obviously there is an issue here, but at this point I don’t think this can be a blocker for 0.20.0 unless someone can verify a fix.
MarcoFalke added this to the milestone 0.20.0
on May 13, 2020
MarcoFalke deleted a comment
on May 13, 2020
fanquake removed this from the milestone 0.20.0
on May 14, 2020
fanquake added this to the milestone 0.20.1
on May 14, 2020
fanquake removed the label
Needs backport (0.20)
on May 14, 2020
fanquake
commented at 4:53 am on June 25, 2020:
member
Going to close this in favour of #19375, which includes this change.
fanquake closed this
on Jun 25, 2020
fanquake removed this from the milestone 0.20.1
on Jun 25, 2020
laanwj referenced this in commit
e491e55646
on Jul 1, 2020
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-21 15:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me