Closed
Description
Issue
While making an HTTP3 request with a custom build curl version I get an error from ngtcp2:
root@07a139559c84:/build-curl/build-curl/curl# curl --http3 https://quic.rocks:4433 -vvv
* Trying 2001:19f0:4:34::1:4433...
* Connect socket 5 over QUIC to 2001:19f0:4:34::1:4433
* Trying 216.155.158.183:4433...
* Connect socket 6 over QUIC to 216.155.158.183:4433
curl: ngtcp2_conn.c:368: conn_call_delete_crypto_aead_ctx: Assertion `conn->callbacks.delete_crypto_aead_ctx' failed.
Aborted (core dumped)
Recreate Issue
Check your self with docker:
Build failing curl version (ngtcp2 commit: 700bab46aa6772cd56cc697d2d68daf45de68d56):
docker build -t curl .
docker run --rm -it curl /usr/local/bin/curl --http3 https://quic.rocks:4433
Build working curl version (ngtcp2 commit: 8d292bb54a11c8e06d3c803643c5f53cc681866f):
docker build -t curl-error --build-arg NGTCP2_BUILD_COMMIT=700bab46aa6772cd56cc697d2d68daf45de68d56 .
docker run --rm -it curl-error /usr/local/bin/curl --http3 https://quic.rocks:4433
Dockerfile:
FROM ubuntu:18.04
# git checkout 8d292bb54a11c8e06d3c803643c5f53cc681866f (not broken)
# git checkout 700bab46aa6772cd56cc697d2d68daf45de68d56 (brakes http3 curl implementation)
ARG NGTCP2_BUILD_COMMIT
ENV NGTCP2_BUILD_COMMIT ${NGTCP2_BUILD_COMMIT:-8d292bb54a11c8e06d3c803643c5f53cc681866f}
# install dependencies
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
git \
make \
build-essential \
autoconf \
libtool \
pkg-config
RUN mkdir "/build-curl"
WORKDIR "/build-curl"
RUN echo $(pwd)
# clone and build openssl 1.1.1
RUN git clone --depth 1 -b OpenSSL_1_1_1d-quic-draft-27 https://github.com/tatsuhiro-t/openssl && \
cd openssl/ && \
mkdir ../openssllib && \
./config enable-tls1_3 --prefix=$(pwd)/../openssllib/ && \
make && \
make install_sw && \
cd ../
# clone and build nghttp3
RUN git clone https://github.com/ngtcp2/nghttp3 && \
cd nghttp3/ && \
mkdir ../nghttp3lib && \
autoreconf -i && \
./configure --prefix=$(pwd)/../nghttp3lib --enable-lib-only && \
make && \
make install && \
cd ../
# clone and build ngtcp2
RUN git clone https://github.com/ngtcp2/ngtcp2 && \
cd ngtcp2/ && \
git checkout "$NGTCP2_BUILD_COMMIT" && \
mkdir ../ngtcp2lib && \
autoreconf -i && \
./configure PKG_CONFIG_PATH=$(pwd)/../openssllib/lib/pkgconfig:$(pwd)/../nghttp3lib/lib/pkgconfig LDFLAGS="-Wl,-rpath,$(pwd)/../openssllib/lib" --prefix=$(pwd)/../ngtcp2lib && \
make && \
make install && \
cd ../
# clone and build curl with built dependencies
RUN git clone https://github.com/curl/curl && \
cd curl/ && \
./buildconf && \
PKG_CONFIG_PATH=../openssllib/lib/pkgconfig:$(pwd)/../nghttp3lib/lib/pkgconfig:$(pwd)/../ngtcp2lib/lib/pkgconfig \
LDFLAGS="-Wl,-rpath,$(pwd)/../openssllib/lib" ./configure \
--with-ssl=$(pwd)/../openssllib \
--with-nghttp3=$(pwd)/../nghttp3lib \
--with-ngtcp2=$(pwd)/../ngtcp2lib \
--enable-alt-svc && \
make && \
make install
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/libcurl.conf && \
ldconfig
Possible Issue
I expect the issue lies here:
Lines 730 to 761 in dc90f51
Related Issue on ngtcp2 side (ngtcp2/ngtcp2#249)
nghttp2 related change: (nghttp2/nghttp2@32e0ba1)
I hope this helps,
Cheers