From 35178dbb06432747f410d3b9f259d019afe85379 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 24 Nov 2020 16:40:28 +0300 Subject: Version bump. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 772d65f2..39c270ad 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -5,6 +5,13 @@ + + + + + -- cgit From bda76b04e9aec295c7fa11c7eacb6e11c4bf67f4 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 7 Dec 2020 18:50:56 +0300 Subject: HTTP: fixed status line format for unknown status codes. According to Section #3.1.2 of RFC 7230, after the status code there must be a space even if the reason phrase is empty. Also, only 3 digits allowed. This closes #507 issue on GitHub. --- docs/changes.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 39c270ad..7b90f4a3 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -9,6 +9,12 @@ date="" time="18:00:00 +0300" packager="Andrei Belov <defan@nginx.com>"> + + +invalid HTTP responses were generated for some unusual status codes. + + + -- cgit From 2348229dc7656f36a7915d85af56aae9ed9fb120 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 8 Dec 2020 01:59:46 +0300 Subject: PHP: populating PHP_AUTH_* server variables. This closes #498 issue on GitHub. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 7b90f4a3..bec07ec2 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -15,6 +15,13 @@ invalid HTTP responses were generated for some unusual status codes. + + +PHP_AUTH_USER, PHP_AUTH_PW, and PHP_AUTH_DIGEST server variables were missing +in PHP module. + + + -- cgit From 12a0d259a50fd6feef46aeffa0e46e193ce6bb40 Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Tue, 8 Dec 2020 13:17:21 +0300 Subject: Docs: special handling for empty "date" and "time" XML attributes. --- docs/Makefile | 9 +++++++++ docs/changes.xml | 2 +- docs/changes.xsls | 47 +++++++++++++++++++++++++++++++++++++---------- docs/changes.xslt | 47 +++++++++++++++++++++++++++++++++++++---------- 4 files changed, 84 insertions(+), 21 deletions(-) (limited to 'docs') diff --git a/docs/Makefile b/docs/Makefile index aa8aeb9b..db63eec4 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -14,6 +14,9 @@ PACKAGES= unit \ unit-ruby \ unit-jsc-common unit-jsc8 unit-jsc10 unit-jsc11 +CURDATE:=$(shell date +"%Y-%m-%d") +CURTIME:=$(shell date +"%H:%M:%S %z") + all: changes changelogs @@ -31,6 +34,8 @@ $(DEST)/CHANGES: changes.dtd \ xmllint --noout --valid changes.xml xsltproc --stringparam format generic \ + --stringparam curdate '$(CURDATE)' \ + --stringparam curtime '$(CURTIME)' \ -o $@ changes.xslt changes.xml $(DEST)/%.rpm-changelog: changes.dtd \ @@ -40,6 +45,8 @@ $(DEST)/%.rpm-changelog: changes.dtd \ mkdir -p $(DEST) xmllint --noout --valid changes.xml xsltproc --stringparam pkgname $* --stringparam format rpm \ + --stringparam curdate '$(CURDATE)' \ + --stringparam curtime '$(CURTIME)' \ -o $@ changes.xslt changes.xml $(DEST)/%.deb-changelog: changes.dtd \ @@ -49,6 +56,8 @@ $(DEST)/%.deb-changelog: changes.dtd \ mkdir -p $(DEST) xmllint --noout --valid changes.xml xsltproc --stringparam pkgname $* --stringparam format deb \ + --stringparam curdate '$(CURDATE)' \ + --stringparam curtime '$(CURTIME)' \ -o $@ changes.xslt changes.xml changes.xslt: changes.xsls diff --git a/docs/changes.xml b/docs/changes.xml index bec07ec2..11032a02 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -6,7 +6,7 @@ diff --git a/docs/changes.xsls b/docs/changes.xsls index 2f3bcc46..9ff6a7e2 100644 --- a/docs/changes.xsls +++ b/docs/changes.xsls @@ -5,6 +5,8 @@ X:output method="text"; X:param format="'generic'"; X:param pkgname="'unit'"; X:param configuration="'change_log_conf.xml'"; +X:param curdate; +X:param curtime; X:var conf = "document($configuration)/configuration"; @@ -58,8 +60,10 @@ X:template = "change_log" { !! "changes"; } X:template = "changes" { - X:var pday = { !padded_day(date="@date") } - X:var dow = { !day_of_week(date="@date") } + X:var date_ = { !getdate(date="@date", curdate="$curdate") } + X:var time_ = { !gettime(time="@time", curtime="$curtime") } + X:var pday = { !padded_day(date="$date_") } + X:var dow = { !day_of_week(date="$date_") } X:var apply = { !string_in_list(list="@apply", string="$pkgname") } X:var pkgname_ = { !beautify(pkgname="$pkgname") } @@ -77,17 +81,16 @@ X:template = "changes" { ' '), 1, $conf/changes/length)} - !{substring(@date, 9, 2)} - !{$conf/changes/month[number(substring(current()/@date, - 6, 2))]} - !{substring(@date, 1, 4)} + !{substring($date_, 9, 2)} + !{$conf/changes/month[number(substring($date_, 6, 2))]} + !{substring($date_, 1, 4)} } X:if "$format='rpm'" { !{concat('* ', $conf/changes/day[number($dow)], - $conf/changes/month[number(substring(current()/@date, 6, 2))], + $conf/changes/month[number(substring($date_, 6, 2))], $pday, ' ', - substring(@date, 1, 4), ' ', @packager, ' - ', + substring($date_, 1, 4), ' ', @packager, ' - ', @ver, '-', @rev, '%{?dist}.ngx')} } @@ -108,8 +111,8 @@ X:template = "changes" { !{concat(' -- ', @packager, ' ', $conf/changes/day[number($dow)], ', ', $pday, - $conf/changes/month[number(substring(current()/@date, 6, 2))], - substring(@date, 1, 4), ' ', @time)} + $conf/changes/month[number(substring($date_, 6, 2))], + substring($date_, 1, 4), ' ', $time_)} X:text { } X:text { } @@ -254,6 +257,30 @@ X:template beautify(pkgname) { } +X:template getdate(date, curdate) { + X:choose { + X:when "$date=''" { + !{$curdate} + } + X:otherwise { + !{$date} + } + } +} + + +X:template gettime(time, curtime) { + X:choose { + X:when "$time=''" { + !{$curtime} + } + X:otherwise { + !{$time} + } + } +} + + X:template = "at" {@} X:template = "br" { !{$br} } X:template = "nobr" { !{translate(., ' ', ' ')} } diff --git a/docs/changes.xslt b/docs/changes.xslt index 032d5c37..08f2f800 100644 --- a/docs/changes.xslt +++ b/docs/changes.xslt @@ -6,6 +6,8 @@ + + @@ -59,8 +61,10 @@ - - + + + + @@ -78,17 +82,16 @@ ' '), 1, $conf/changes/length)"/> - - - + + + @@ -109,8 +112,8 @@ + $conf/changes/month[number(substring($date_, 6, 2))], + substring($date_, 1, 4), ' ', $time_)"/> @@ -246,6 +249,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @ -- cgit From d3796d1fb7008629a8fa505481dab96efe60cbdb Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 7 Dec 2020 18:17:25 +0000 Subject: Ruby: fixed crash on thread start. Ruby threads need to be created with GVL; otherwise, an attempt to access locked resources may occur, causing a crash. The issue was occasionally reproduced on Ubuntu 18.04 with Ruby 2.5.1 while running test_ruby_application_threads. --- docs/changes.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 11032a02..a67a671b 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -22,6 +22,12 @@ in PHP module. + + +Ruby apps with configured mutlithreading could crash on start under load. + + + -- cgit From ea5844ae7b52969e2b404f36a6cb5577a3a447a2 Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Tue, 15 Dec 2020 13:01:44 +0000 Subject: Added a changelog for 5e6c2b8fb3fe. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index a67a671b..f8198304 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -28,6 +28,13 @@ Ruby apps with configured mutlithreading could crash on start under load. + + +Mount points were not unmounted when using "mount" namespace isolation; the +bug had appeared in 1.21.0. + + + -- cgit From c0449e13f80312a2e09f643e1a69e536384eae79 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 17 Dec 2020 19:27:44 +0300 Subject: Router: fixed crash in OOSM processing. Multithreaded application may create different shared memory segments in different threads. The segments then passed to different router threads. Because of this multithreading, the order of adding incoming segments is not determined and there can be situation when some of the incoming segments are not initialized yet. This patch simply adds check for NULL to skip non-initialized segments. Crash reproduced during load tests with high number of simultaneous connections (1024 and more). --- docs/changes.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index f8198304..ca4ffe5f 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -35,6 +35,12 @@ bug had appeared in 1.21.0. + + +the router process could crash with multithreaded applications under high load. + + + -- cgit From 7389a50835696fe256c5decf31bec129f1d59bbf Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Fri, 18 Dec 2020 00:25:27 +0300 Subject: Limiting app queue notifications count in socket. Under high load, a queue synchonization issue may occur, starting from the steady state when an app queue message is dequeued immediately after it has been enqueued. In this state, the router always puts the first message in the queue and is forced to notify the app about a new message in an empty queue using a socket pair. On the other hand, the application dequeues and processes the message without reading the notification from the socket, so the socket buffer overflows with notifications. The issue was reproduced during Unit load tests. After a socket buffer overflow, the router is unable to notify the app about a new first message. When another message is enqueued, a notification is not required, so the queue grows without being read by the app. As a result, request processing stops. This patch changes the notification algorithm by counting the notifications in the pipe instead of getting the number of messages in the queue. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index ca4ffe5f..f157e9bf 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -41,6 +41,13 @@ the router process could crash with multithreaded applications under high load. + + +applications could stop processing new requests under high load; the bug had +appeared in 1.19.0. + + + -- cgit From 7b669ed866896afbf26ab6bc0737fe7c8f9c2ec5 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Fri, 18 Dec 2020 00:25:28 +0300 Subject: Libunit: fixed shared memory waiting. The nxt_unit_ctx_port_recv() function may return the NXT_UNIT_AGAIN code, in which case an attempt to reread the message should be made. The issue was reproduced in load testing with response sizes 16k and up. In the rare case of a NXT_UNIT_AGAIN result, a buffer of size -1 was processed, which triggered a 'message too small' alert; after that, the app process was terminated. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index f157e9bf..6bd30cab 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -48,6 +48,13 @@ appeared in 1.19.0. + + +application processes could terminate unexpectedly under high load; the bug +had appeared in 1.19.0. + + + -- cgit From cac762ab7ef22798d0f1d0813201c0018bd589a1 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 22 Dec 2020 17:53:41 +0300 Subject: Python: multiple values in the "path" option. --- docs/changes.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 6bd30cab..db7a2799 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -9,6 +9,12 @@ date="" time="" packager="Andrei Belov <defan@nginx.com>"> + + +ability to specify multiple directories in the "path" option of Python apps. + + + invalid HTTP responses were generated for some unusual status codes. -- cgit From b7dba9006243f65e66d85a3a29841262c1c5dfef Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 23 Dec 2020 11:01:36 +0300 Subject: Static: fixing request memory pool leakage in router. When a static file larger than NXT_HTTP_STATIC_BUF_SIZE (128K) is served, two buffers are allocated and chained; each retains the whole request memory pool. Starting from 41331471eee7, the completion handler was called once for a linked buffer chain, but the second buffer got lost. This patch improves the completion handler's treatment of static buffers to handle all linked buffers. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index db7a2799..86bdc10a 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -61,6 +61,13 @@ had appeared in 1.19.0. + + +a memory leak occurring in the router process when serving a file larger than +128K; the bug had appeared in 1.13.0. + + + -- cgit From c369e25ae7e3de7759c5950a2a84870cc1a8401f Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Thu, 24 Dec 2020 15:18:49 +0300 Subject: Version bump for unit modules. This is required in order to build Debian packages from current tip without making manual interventions. Moving forward, this should be a part of every version bump commit. --- docs/changes.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 86bdc10a..0e334419 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -5,6 +5,28 @@ + + + + +NGINX Unit updated to 1.22.0. + + + + + + -- cgit From d3d6864bdc64f34924e686ff65da704b29aaaa93 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 29 Dec 2020 19:00:54 +0300 Subject: Node.js: ServerRequest and ServerResponse compliance to Stream API. ServerRequest now inherit stream Readable object. ServerResponse provides 'writable' property. Thanks to Wu Jian Ping (@wujjpp). This closes #274, closes #317 issues and closes #502 PR on GitHub. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 0e334419..b97cc823 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -37,6 +37,13 @@ ability to specify multiple directories in the "path" option of Python apps. + + +ServerRequest and ServerResponse objects of Node.js module are now compliant +to Stream API. + + + invalid HTTP responses were generated for some unusual status codes. -- cgit From e4e444b82701de0c984a72eb9c2657f72d7171ae Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 28 Jan 2021 17:13:52 +0300 Subject: Router: fixing crash after WebSocket processing. After WebSocket processing, the application port was released with incorrect reason ("got request"), unnecessarily decrementing the active request counter. The assertion was triggered only on application removal; a test was added for this case. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index b97cc823..64adbb46 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -97,6 +97,13 @@ a memory leak occurring in the router process when serving a file larger than + + +the router process could crash while removing or reconfiguring an application +that uses WebSocket. + + + -- cgit From 0ddbc00d7dd66ab83410bf02acf3b29fe946f518 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 28 Jan 2021 19:22:17 +0300 Subject: Fixed changelog style. --- docs/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 64adbb46..219ebfa2 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -65,7 +65,7 @@ Ruby apps with configured mutlithreading could crash on start under load. -Mount points were not unmounted when using "mount" namespace isolation; the +mount points were not unmounted when using "mount" namespace isolation; the bug had appeared in 1.21.0. -- cgit From 75a5dcfc4ec4f92a196c0cf3a187081a238a6b1d Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 3 Feb 2021 23:23:28 +0300 Subject: Fixing shared app queue unmap size. Shared app queue takes more memory than port memory. To unmap all memory pages correct size need to be specified for munmap() call. Otherwise 4 Mb memory leaked on each configured application removal. The issue was introduced in 1d84b9e4b459. --- docs/changes.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 219ebfa2..d12e73c6 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -104,6 +104,13 @@ that uses WebSocket. + + +a memory leak occurring in the router process when removing or reconfiguring +an application; the bug had appeared in 1.19.0. + + + -- cgit From f2d96335664f561cab4ff2ff02f5cd3333af3b3a Mon Sep 17 00:00:00 2001 From: Artem Konev Date: Thu, 4 Feb 2021 14:34:42 +0000 Subject: Updated phrasing and corrected errors in docs/changes.xml. --- docs/changes.xml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index d12e73c6..04507e8e 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -33,14 +33,15 @@ NGINX Unit updated to 1.22.0. -ability to specify multiple directories in the "path" option of Python apps. +support for specifying multiple directories in the "path" option of Python +apps. -ServerRequest and ServerResponse objects of Node.js module are now compliant -to Stream API. +the ServerRequest and ServerResponse objects of Node.js module are now +compliant with Stream API. @@ -52,55 +53,55 @@ invalid HTTP responses were generated for some unusual status codes. -PHP_AUTH_USER, PHP_AUTH_PW, and PHP_AUTH_DIGEST server variables were missing -in PHP module. +the PHP_AUTH_USER, PHP_AUTH_PW, and PHP_AUTH_DIGEST server variables were +missing in the PHP module. -Ruby apps with configured mutlithreading could crash on start under load. +Ruby apps with multithreading configured could crash on start under load. -mount points were not unmounted when using "mount" namespace isolation; the -bug had appeared in 1.21.0. +mount points weren't unmounted when the "mount" namespace isolation was used; +the bug had appeared in 1.21.0. -the router process could crash with multithreaded applications under high load. +the router process could crash with multithreaded apps under high load. -applications could stop processing new requests under high load; the bug had +apps could stop processing new requests under high load; the bug had appeared in 1.19.0. -application processes could terminate unexpectedly under high load; the bug -had appeared in 1.19.0. +app processes could terminate unexpectedly under high load; the bug had +appeared in 1.19.0. -a memory leak occurring in the router process when serving a file larger than +a memory leak occurred in the router process when serving files larger than 128K; the bug had appeared in 1.13.0. -the router process could crash while removing or reconfiguring an application -that uses WebSocket. +the router process could crash while removing or reconfiguring an app that used +WebSocket. -- cgit From bde6a2afd4c3230f070e2e9158b6a96d1ce16b89 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 4 Feb 2021 18:22:33 +0300 Subject: Reordered changes for 1.22.0 by significance (subjective). --- docs/changes.xml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 04507e8e..35eaec6c 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -33,68 +33,68 @@ NGINX Unit updated to 1.22.0. -support for specifying multiple directories in the "path" option of Python -apps. +the ServerRequest and ServerResponse objects of Node.js module are now +compliant with Stream API. -the ServerRequest and ServerResponse objects of Node.js module are now -compliant with Stream API. +support for specifying multiple directories in the "path" option of Python +apps. -invalid HTTP responses were generated for some unusual status codes. +a memory leak occurred in the router process when serving files larger than +128K; the bug had appeared in 1.13.0. -the PHP_AUTH_USER, PHP_AUTH_PW, and PHP_AUTH_DIGEST server variables were -missing in the PHP module. +apps could stop processing new requests under high load; the bug had +appeared in 1.19.0. -Ruby apps with multithreading configured could crash on start under load. +app processes could terminate unexpectedly under high load; the bug had +appeared in 1.19.0. -mount points weren't unmounted when the "mount" namespace isolation was used; -the bug had appeared in 1.21.0. +invalid HTTP responses were generated for some unusual status codes. -the router process could crash with multithreaded apps under high load. +the PHP_AUTH_USER, PHP_AUTH_PW, and PHP_AUTH_DIGEST server variables were +missing in the PHP module. -apps could stop processing new requests under high load; the bug had -appeared in 1.19.0. +the router process could crash with multithreaded apps under high load. -app processes could terminate unexpectedly under high load; the bug had -appeared in 1.19.0. +Ruby apps with multithreading configured could crash on start under load. -a memory leak occurred in the router process when serving files larger than -128K; the bug had appeared in 1.13.0. +mount points weren't unmounted when the "mount" namespace isolation was used; +the bug had appeared in 1.21.0. -- cgit From 56626b9232857d49deeca15d7dc8eeaeaffbdd6d Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 4 Feb 2021 18:22:33 +0300 Subject: Added version 1.22.0 CHANGES. --- docs/changes.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 35eaec6c..378320f4 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -15,7 +15,7 @@ unit-jsc-common unit-jsc8 unit-jsc10 unit-jsc11 unit-jsc13 unit-jsc14 unit-jsc15" ver="1.22.0" rev="1" - date="" time="" + date="2021-02-04" time="18:00:00 +0300" packager="Andrei Belov <defan@nginx.com>"> @@ -28,7 +28,7 @@ NGINX Unit updated to 1.22.0. -- cgit