Commit graph

56 commits

Author SHA1 Message Date
Max Romanov
7b669ed866 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.
2020-12-18 00:25:28 +03:00
Max Romanov
7389a50835 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.
2020-12-18 00:25:27 +03:00
Max Romanov
c0449e13f8 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).
2020-12-17 19:27:44 +03:00
Tiago Natel de Moura
ea5844ae7b Added a changelog for 5e6c2b8fb3fe. 2020-12-15 13:01:44 +00:00
Max Romanov
d3796d1fb7 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.
2020-12-07 18:17:25 +00:00
Andrei Belov
12a0d259a5 Docs: special handling for empty "date" and "time" XML attributes. 2020-12-08 13:17:21 +03:00
Valentin Bartenev
2348229dc7 PHP: populating PHP_AUTH_* server variables.
This closes #498 issue on GitHub.
2020-12-08 01:59:46 +03:00
Valentin Bartenev
bda76b04e9 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.
2020-12-07 18:50:56 +03:00
Valentin Bartenev
35178dbb06 Version bump. 2020-11-24 16:40:28 +03:00
Valentin Bartenev
fa1a3298ef Added version 1.21.0 CHANGES. 2020-11-19 19:59:18 +03:00
Valentin Bartenev
7d77d50568 Updated 1.20.0 CHANGES to include pytest migration. 2020-10-08 19:04:40 +03:00
Valentin Bartenev
f221ddbe66 Added version 1.20.0 CHANGES. 2020-10-08 18:32:36 +03:00
Valentin Bartenev
b8c7bc5a47 Added version 1.19.0 CHANGES. 2020-08-13 19:22:41 +03:00
Valentin Bartenev
943865fc77 Added version 1.18.0 CHANGES. 2020-05-28 17:34:06 +03:00
Valentin Bartenev
e377820b6c Added version 1.17.0 CHANGES. 2020-04-16 17:49:09 +03:00
Valentin Bartenev
f6d53f69b8 Added version 1.16.0 CHANGES. 2020-03-12 18:13:07 +03:00
Valentin Bartenev
672602d1ee Added version 1.15.0 CHANGES. 2020-02-06 17:33:44 +03:00
Valentin Bartenev
9403233328 Added version 1.14.0 CHANGES. 2019-12-26 17:03:21 +03:00
Andrei Belov
5758a06374 Packages: added Ubuntu 19.10 "eoan" support. 2019-11-21 14:13:24 +03:00
Andrei Belov
bc14605fd6 Packages: added Python 3.8 on Ubuntu 18.04, 19.04. 2019-11-19 12:43:51 +03:00
Valentin Bartenev
182107c10e Added version 1.13.0 CHANGES. 2019-11-14 19:23:38 +03:00
Valentin Bartenev
b1cb78ef8e Added version 1.12.0 CHANGES. 2019-10-03 16:30:31 +03:00
Valentin Bartenev
2281d9f02c Added version 1.11.0 CHANGES. 2019-09-19 17:28:55 +03:00
Andrei Belov
9b459d5d26 Added changes for 1.10.0-2 bugfix release. 2019-08-23 12:10:20 +03:00
Valentin Bartenev
0a106e3cbc Added version 1.10.0 CHANGES. 2019-08-22 18:43:02 +03:00
Valentin Bartenev
b2d7d6fb02 Added version 1.9 CHANGES. 2019-05-30 17:16:23 +03:00
Valentin Bartenev
050cfb6d5b Added version 1.8.0 CHANGES. 2019-03-01 18:23:38 +03:00
Valentin Bartenev
9a9277b227 Added version 1.7.1 CHANGES. 2019-02-07 17:46:46 +03:00
Andrei Belov
4ca0479c98 Packages: Ubuntu 18.10 "cosmic" support added. 2018-12-27 11:07:24 +03:00
Valentin Bartenev
45655f2652 Added version 1.7 CHANGES. 2018-12-20 19:17:08 +03:00
Valentin Bartenev
61a87bc285 Fixed style in CHANGES. 2018-12-20 19:17:08 +03:00
Valentin Bartenev
b4e2ec43d1 Added version 1.6 CHANGES. 2018-11-15 15:56:09 +03:00
Valentin Bartenev
d55282105a Packages: updated to 1.5-1. 2018-10-25 17:49:10 +03:00
Valentin Bartenev
a04554118c Added version 1.5 CHANGES. 2018-10-25 17:48:56 +03:00
Andrei Belov
2a9fc6b1fe Packages: updated to 1.4-2. 2018-09-27 15:05:03 +03:00
Valentin Bartenev
63ff7a341a Added version 1.4 CHANGES. 2018-09-20 18:18:52 +03:00
Valentin Bartenev
a1bf265d52 Added version 1.3 CHANGES. 2018-07-13 14:45:08 +03:00
Valentin Bartenev
9dd0fa87ad Added version 1.2 CHANGES. 2018-06-07 16:43:37 +03:00
Andrei Belov
8a156a9fc4 Packages: Ubuntu 18.10 "bionic" support added. 2018-05-14 14:11:37 +03:00
Valentin Bartenev
62a89eed60 Added version 1.1 CHANGES. 2018-04-26 18:30:06 +03:00
Valentin Bartenev
d1b0f74550 Improved wording in CHANGES. 2018-04-26 16:47:55 +03:00
Valentin Bartenev
32eb649e7c Added version 1.0 CHANGES. 2018-04-12 19:47:33 +03:00
Andrei Belov
aa8f2c3295 Added Ruby packaging support. 2018-04-02 15:48:33 +03:00
Valentin Bartenev
228d8518c7 Added version 0.7 CHANGES. 2018-03-22 21:07:06 +03:00
Andrei Belov
94049bf30f Docs: reduced number of similar entries in changes.xml. 2018-02-14 14:40:04 +03:00
Valentin Bartenev
061343520d Added version 0.6 CHANGES. 2018-02-09 19:07:55 +03:00
Valentin Bartenev
40a360b640 Added version 0.5 CHANGES. 2018-02-08 18:42:51 +03:00
Andrei Belov
539caf0946 Packages: added Perl package. 2018-02-07 17:26:37 +03:00
Igor Sysoev
ac433f1f30 Added version 0.4 CHANGES. 2018-01-15 15:05:25 +03:00
Andrei Belov
ad63a3e752 Packages: added support for Ubuntu 17.10. 2017-12-28 20:38:35 +03:00