forked from aviramc/lua-nginx-module
-
Notifications
You must be signed in to change notification settings - Fork 0
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
合并agentzh更新 #2
Open
lhmwzy
wants to merge
1,521
commits into
lhmwzy:master
Choose a base branch
from
openresty:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
合并agentzh更新 #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
701dd52
to
cd01e7b
Compare
e7ac10c
to
cfd4f90
Compare
c2d6c40
to
1967998
Compare
ab60f70
to
397f366
Compare
This memory corruption will cause nginx crash and can reproduce under "--with-no-pool-patch" build by running t/048-match-dfa.t TEST 9. test log: ok 1 - t/048-match-dfa.t TEST 9: multiple match calls with captures and DFA. - status code ok ok 2 - t/048-match-dfa.t TEST 9: multiple match calls with captures and DFA. - response_body - response is expected (repeated req 0, req 0) t/048-match-dfa.t TEST 9: multiple match calls with captures and DFA. - Can't connect to 127.0.0.1:1984: Connection refused Retry connecting after 0.675 sec t/048-match-dfa.t TEST 9: multiple match calls with captures and DFA. - Can't connect to 127.0.0.1:1984: Connection refused Retry connecting after 0.825 sec error.log [notice] 1683757#0: using the "epoll" event method [notice] 1683757#0: openresty/1.25.3.1 (no pool) [notice] 1683757#0: built by gcc 13.2.1 20231011 (Red Hat 13.2.1-4) (GCC) [notice] 1683757#0: OS: Linux 6.7.4-100.fc38.x86_64 [notice] 1683757#0: getrlimit(RLIMIT_NOFILE): 1024:524288 free(): invalid next size (fast) Co-author-by: lijunlong<lijunlong@openresty.com>
This is a rewrite PR #1687 from vislee <louivislee@gmail.com>
Co-authored-by: lijunlong <lijunlong@openresty.com>
Co-authored-by: Bas van Kervel <basvankervel@velorum.io> Co-authored-by: lijunlong <lijunlong@openresty.com>
… data integrity. ==338736== Invalid read of size 8 ==338736== at 0x209890: ngx_http_lua_socket_tcp_handler (ngx_http_lua_socket_tcp.c:3341) ==338736== by 0x16CB21: ngx_epoll_process_events (ngx_epoll_module.c:1001) ==338736== by 0x160213: ngx_process_events_and_timers (ngx_event.c:262) ==338736== by 0x16B772: ngx_single_process_cycle (ngx_process_cycle.c:338) ==338736== by 0x13E8B7: main (nginx.c:394) ==338736== Address 0x68c8678 is 8 bytes inside a block of size 1,488 free'd ==338736== at 0x48472AC: free (vg_replace_malloc.c:974) ==338736== by 0x14035D: ngx_destroy_pool (ngx_palloc.c:76) ==338736== by 0x18694E: ngx_http_free_request (ngx_http_request.c:3799) ==338736== by 0x186AE0: ngx_http_close_request (ngx_http_request.c:3708) ==338736== by 0x187A6A: ngx_http_finalize_connection (ngx_http_request.c:2812) ==338736== by 0x1887C7: ngx_http_finalize_request (ngx_http_request.c:2685) ==338736== by 0x1883CC: ngx_http_finalize_request (ngx_http_request.c:2571) ==338736== by 0x2010B2: ngx_http_lua_finalize_request (ngx_http_lua_util.c:3706) ==338736== by 0x20B6A1: ngx_http_lua_socket_tcp_resume_helper (ngx_http_lua_socket_tcp.c:6132) ==338736== by 0x20BA75: ngx_http_lua_socket_tcp_read_resume (ngx_http_lua_socket_tcp.c:6030) ==338736== by 0x20356B: ngx_http_lua_content_wev_handler (ngx_http_lua_contentby.c:152) ==338736== by 0x20CA9F: ngx_http_lua_socket_handle_read_success (ngx_http_lua_socket_tcp.c:3602) ==338736== by 0x20CA9F: ngx_http_lua_socket_tcp_read (ngx_http_lua_socket_tcp.c:2607) ==338736== by 0x20D289: ngx_http_lua_socket_read_handler (ngx_http_lua_socket_tcp.c:3405) ==338736== by 0x20991D: ngx_http_lua_socket_tcp_handler (ngx_http_lua_socket_tcp.c:3356) ==338736== by 0x16C970: ngx_epoll_process_events (ngx_epoll_module.c:968) ==338736== by 0x160213: ngx_process_events_and_timers (ngx_event.c:262) ==338736== by 0x16B772: ngx_single_process_cycle (ngx_process_cycle.c:338) ==338736== by 0x13E8B7: main (nginx.c:394) ==338736== Block was alloc'd at ==338736== at 0x484482F: malloc (vg_replace_malloc.c:431) ==338736== by 0x165448: ngx_alloc (ngx_alloc.c:22) ==338736== by 0x1401B2: ngx_malloc (ngx_palloc.c:137) ==338736== by 0x1403EC: ngx_palloc (ngx_palloc.c:120) ==338736== by 0x140503: ngx_pcalloc (ngx_palloc.c:215) ==338736== by 0x185BC9: ngx_http_alloc_request (ngx_http_request.c:580) ==338736== by 0x186356: ngx_http_create_request (ngx_http_request.c:536) ==338736== by 0x189F2A: ngx_http_wait_request_handler (ngx_http_request.c:518) ==338736== by 0x16C970: ngx_epoll_process_events (ngx_epoll_module.c:968) ==338736== by 0x160213: ngx_process_events_and_timers (ngx_event.c:262) ==338736== by 0x16B772: ngx_single_process_cycle (ngx_process_cycle.c:338) ==338736== by 0x13E8B7: main (nginx.c:394) ==338736==
…before arg[2] = true.
Without the initialization, the feature test ends with: error: 'set' may be used uninitialized [-Werror=maybe-uninitialized]
…gger filter_finalize case.
Co-authored-by: Thibault Charbonnier <thibaultcha@me.com>
lua-nginx-module/src/ngx_http_lua_balancer.c: In function ‘ngx_http_lua_balancer_get_peer’: lua-nginx-module/src/ngx_http_lua_balancer.c:389:41: error: variable ‘u’ set but not used [-Werror=unused-but-set-variable] 389 | ngx_http_upstream_t *u; |
…with `headers` option.
In the balancer phase, when obtaining a connection from the upstream connection pool, the `cached` attribute of the peer connection is set to 1(`pc->cached = 1;`), indicating that the connection is obtained from the cache. If an error occurs during the use of this connection, such as "upstream prematurely closed connection" the system will increase the `tries` attribute of the peer connection by executing `u->peer.tries++`. This PR restores tries by callbacks to the balancer when `u->peer.tries++` is unexpectedly set. Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
合并agentzh更新