maru / libmicrohttpd-http2

HTTP/2 support for libmicrohttpd
https://http2.s106.net/
Other
22 stars 6 forks source link

'test_get_response_cleanup_http2' and 'test_get_response_cleanup_http2_direct' fail locally #56

Open kumar-mallikarjuna opened 5 years ago

kumar-mallikarjuna commented 5 years ago

The two tests test_get_response_cleanup_http2 and test_get_response_cleanup_http2_direct fail on my system. I'm working with the branch fix_http2_callbacks.

I had used './configure CFLAGS=-g -Og --enable-http2' for configuration.

test_get_response_cleanup_http2.log:

Error (code: 1218)
FAIL test_get_response_cleanup_http2 (exit status: 1)

test_get_response_cleanup_http2_direct.log:

Error (code: 1218)
FAIL test_get_response_cleanup_http2_direct (exit status: 1)
maru commented 5 years ago

Could you please tell me what is the ouput of the following commands?

grep -A2 'checking for the version of libcurl' config.log grep -A2 ' nghttp2' config.log

kumar-mallikarjuna commented 5 years ago

Sure!

Here it is

$ grep -A2 'checking for the version of libcurl' config.log
configure:22930: checking for the version of libcurl
configure:22937: result: 7.58.0
configure:22944: checking for libcurl >= version 7.49.0

and

$ grep -A2 ' nghttp2' config.log
configure:25247: checking how to find nghttp2 library
configure:25276: result: automatically
configure:25365: checking for libnghttp2
--
configure:25464: checking for nghttp2_option_set_no_recv_client_magic in -lnghttp2
configure:25489: gcc -o conftest -I/usr/local/include -g -Og -fno-strict-aliasing -I/usr/local/include  -L/usr/local/lib -lnghttp2  conftest.c -lnghttp2   -L/usr/local/lib -lnghttp2 >&5
configure:25489: $? = 0
--
configure:25504: checking nghttp2/nghttp2.h usability
configure:25504: gcc -c -I/usr/local/include -g -Og -fno-strict-aliasing -I/usr/local/include  conftest.c >&5
configure:25504: $? = 0
--
configure:25504: checking nghttp2/nghttp2.h presence
configure:25504: gcc -E -I/usr/local/include  conftest.c
configure:25504: $? = 0
--
configure:25504: checking for nghttp2/nghttp2.h
configure:25504: result: yes
configure:25522: checking whether nghttp2 is usable
configure:25526: result: yes
configure:25679: checking whether to support HTTP2
maru commented 5 years ago

I've run the tests with the same curl version, but I don't trigger the problem. Could you tell me please what is the output of this command?

git branch -v

Are you compiling commit 316af7c0? If you still have the problem, I recommend you to download the code in another directory and run the tests to see if these tests fail again. You can use --depth=1 to download only the last commit:

git clone --depth=1 git@github.com:maru/libmicrohttpd-http2.git

darnir commented 5 years ago

If you want to avoid cloning again, you can use

$ git reset --hard HEAD && git clean -dxf

In general, always try to recreate errors in a clean working directory.

On Fri, May 24, 2019, at 10:47 PM, Maru Berezin wrote:

I've run the tests with the same curl version, but I don't trigger the problem. Could you tell me please what is the output of this command?

git branch -v

Are you compiling commit 316af7c https://github.com/maru/libmicrohttpd-http2/commit/316af7c06537e524c6ef02bc1d5f59b39af7d1d1? If you still have the problem, I recommend you to download the code in another directory and run the tests to see if these tests fail again. You can use --depth=1 to download only the last commit:

git clone --depth=1 git@github.com:maru/libmicrohttpd-http2.git

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maru/libmicrohttpd-http2/issues/56?email_source=notifications&email_token=AAMVJNOPNJ274U6YGO2XDATPXBH53A5CNFSM4HPQDT7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGQ57A#issuecomment-495783676, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMVJNIE4YOLOOYRU65EJ2TPXBH53ANCNFSM4HPQDT7A.

kumar-mallikarjuna commented 5 years ago

Yes, I am compiling with https://github.com/maru/libmicrohttpd-http2/commit/316af7c06537e524c6ef02bc1d5f59b39af7d1d1.

$ git branch -v
  master                  316af7c0 [ahead 12] test_get_sendfile_http2 and test_get_sendfile_http2_direct use same temp file #55
* tmp_fix_http2_callbacks 316af7c0 [ahead 11] test_get_sendfile_http2 and test_get_sendfile_http2_direct use same temp file #55

I tried checking in a clean directory. But the tests are still failing.

maru commented 5 years ago

It's really strange that these tests are failing because the tests in my local host and in travis are passing without problem.

You could change the line:

https://github.com/maru/libmicrohttpd-http2/blob/316af7c06537e524c6ef02bc1d5f59b39af7d1d1/src/microhttpd/internal.h#L560

to:

#define DEBUG_STATES MHD_YES

and you could post the whole test_get_response_cleanup_http2.log file.

kumar-mallikarjuna commented 5 years ago

Here's the log after I changed intern.g: test_get_response_cleanup_http2.log

The test seems incomplete. All the outputs were commented. So I tried uncommenting them and got this:

$ cat test_get_response_cleanup_http2.log
Killing curl
Stopping daemon!
Forking cURL!
Killing curl
Killing curl
Killing curl
Stopping daemon!
Killing curl
Stopping daemon!
Error (code: 1218)
FAIL test_get_response_cleanup_http2 (exit status: 1)
maru commented 5 years ago

Strange, it should print a lot of http2 debug information, I think it didn't regenerate the library with the changes. Please run make again. The log should have these following lines:

In function MHD_connection_handle_idle handling connection at state: connection init
In function MHD_connection_update_event_loop_info handling connection at state: connection init
In function MHD_connection_handle_read handling connection at state: connection init
In function MHD_connection_handle_idle handling connection at state: connection init
In function MHD_connection_handle_idle handling connection at state: connection url received
In function MHD_connection_handle_idle handling connection at state: header partially received
In function MHD_connection_handle_idle handling connection at state: header partially received
In function MHD_connection_handle_idle handling connection at state: header partially received
In function MHD_connection_handle_idle handling connection at state: header partially received
In function MHD_connection_handle_idle handling connection at state: header partially received
In function MHD_connection_handle_idle handling connection at state: header partially received
In function MHD_connection_handle_idle handling connection at state: headers received
In function MHD_connection_handle_idle handling connection at state: headers processed
In function MHD_connection_handle_idle handling connection at state: footers received
[  0.002] [h2_do_h2_upgrade] 1) Create 101 response
[  0.002] [h2_do_h2_upgrade] 2) Create h2 session and set h2 callbacks
[  0.002] [h2_session_create] 
[  0.002] [try_grow_write_buffer] new_size=16384
[id=1] [  0.002] recv SETTINGS frame <length=0, flags=0x00, stream_id=0>
          (niv=0)
[  0.003] [h2_do_h2_upgrade] [156] h2_set_h2_callbacks: read_size=16384 write_size=16384 offset=108
[  0.003] [h2_do_h2_upgrade] 3) h2_stream_create
[  0.003] [h2_session_create_stream] stream_id=1
[  0.003] [h2_stream_create_] (stream_id=1)
[  0.003] [h2_do_h2_upgrade] stream_id=1
[  0.003] [h2_stream_call_connection_handler] (stream_id=1)
[  0.003] [process_request_final] submit_response_headers
[  0.003] [h2_session_write_data] 
[id=1] [  0.003] send SETTINGS frame <length=0, flags=0x00, stream_id=0>
          (niv=0)
[  0.003] [h2_session_write_data] data_len=9
[id=1] [  0.003] send HEADERS frame <length=25, flags=0x04, stream_id=1>
          ; END_HEADERS
          (padlen=0)
          ; First response header
          :status: 200
          date: Sat, 25 May 2019 20:34:01 GMT
[  0.003] [h2_session_write_data] data_len=34
[  0.003] [send_data_cb] [id=1] (stream_id=1) len=1
[id=1] [  0.003] send DATA frame <length=1, flags=0x00, stream_id=1>
[  0.003] [send_data_cb] [id=1] (stream_id=1) len=1
[id=1] [  0.003] send DATA frame <length=1, flags=0x00, stream_id=1>
[  0.003] [send_data_cb] [id=1] (stream_id=1) len=1
[id=1] [  0.003] send DATA frame <length=1, flags=0x00, stream_id=1>
kumar-mallikarjuna commented 5 years ago

I'm getting this at the end of make check:

Makefile:2774: recipe for target 'test-suite.log' failed
make[5]: *** [test-suite.log] Error 1
make[5]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl'
Makefile:2880: recipe for target 'check-TESTS' failed
make[4]: *** [check-TESTS] Error 2
make[4]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl'
Makefile:3594: recipe for target 'check-am' failed
make[3]: *** [check-am] Error 2
make[3]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl'
Makefile:2667: recipe for target 'check-recursive' failed
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl'
Makefile:450: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src'
Makefile:583: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

Maybe this is creating the problem.

darnir commented 5 years ago

Nope. That is just make complaining that one of the steps failed.

The step that failed was your tests not passing.

On Sun, May 26, 2019, at 6:25 AM, Kumar Mallikarjuna wrote:

I'm getting this at the end of make check:

Makefile:2774: recipe for target 'test-suite.log' failed make[5]: *** [test-suite.log] Error 1 make[5]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl' Makefile:2880: recipe for target 'check-TESTS' failed make[4]: *** [check-TESTS] Error 2 make[4]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl' Makefile:3594: recipe for target 'check-am' failed make[3]: *** [check-am] Error 2 make[3]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl' Makefile:2667: recipe for target 'check-recursive' failed make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src/testcurl' Makefile:450: recipe for target 'check-recursive' failed make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory '/home/legendrian/Workspaces/Bookmarks/Dog/MKC_Clean/libmicrohttpd-http2/src' Makefile:583: recipe for target 'check-recursive' failed make: *** [check-recursive] Error 1 Maybe this is creating the problem.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maru/libmicrohttpd-http2/issues/56?email_source=notifications&email_token=AAMVJNNTF5E3I5EXCDD5L4LPXIGJ5A5CNFSM4HPQDT7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWH53UA#issuecomment-495967696, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMVJNPQCWN4BRNSVYS2AR3PXIGJ5ANCNFSM4HPQDT7A.

kumar-mallikarjuna commented 5 years ago

Oh, I see.