|
eec47a67
|
2024-04-30T15:59:58
|
|
Fix typos (#1634)
|
|
aef201a9
|
2024-04-29T13:35:33
|
|
Change ident for EVFILT_USER to 0 and add a test (#1582)
Conventionally, ident for EVFILT_USER is set to 0 to avoid
collision of file descriptors, which is what other renowned
networking frameworks like netty(java), mio(rust), gnet(go),
swift-nio(swift), etc. do currently.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
147298a2
|
2024-04-24T11:14:47
|
|
Fix some comments
Signed-off-by: dockercui <dockercui@aliyun.com>
|
|
9de85b58
|
2024-04-05T20:42:37
|
|
fix WSOptions enum value and extended payload length bug
|
|
6e390911
|
2024-04-10T17:42:01
|
|
Fix potential Null pointer dereference in regress_buffer.c
|
|
74217832
|
2024-04-10T15:47:57
|
|
Fix potential Null pointer dereference in regress.c
|
|
d6e88352
|
2024-04-10T17:45:03
|
|
Fix potential Null pointer dereference in regress_et.c
|
|
d45dca43
|
2024-04-10T17:39:36
|
|
Fix potential Null pointer dereference in regress_thread.c
|
|
2bdf1737
|
2024-04-10T16:18:27
|
|
Fix potential Null pointer dereference in regress_finalize.c
|
|
17796a2d
|
2024-04-10T15:32:54
|
|
Fix potential Null pointer dereference in regress_http.c
|
|
f9526e13
|
2024-04-10T15:16:21
|
|
Fix potential NULL pointer dereference in regress_bufferevent.c
|
|
fc48803d
|
2024-04-15T15:02:27
|
|
Fix potential Null pointer dereference in regress_zlib.c (#1597)
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
|
|
539f73e3
|
2024-02-20T09:30:22
|
|
Fix leak in evbuffer_add_file() on empty files
Found by oss-fuzz, after coverage had been improved in google/oss-fuzz#11257
v2: adjust test
v3: fix for windows (_get_osfhandle() crashes when called on closed fd)
v4: fix for EVENT__DISABLE_MM_REPLACEMENT
|
|
9c8860ec
|
2024-03-11T15:50:43
|
|
chore: remove repetitive words
Signed-off-by: tgolang <seekseat@aliyun.com>
|
|
e66df92c
|
2024-03-07T16:19:11
|
|
Accept SOCK_NONBLOCK/SOCK_CLOEXEC in type argument of socketpair (#1567)
Setting `SOCK_NONBLOCK` and `SOCK_CLOEXEC` in the `type` argument of `socketpair()` is widely supported across UNIX-like OS: Linux, *BSD, Solaris, etc., as is the `socket()`. This will conserve several extra system calls, we should use it where available.
### References
- [socketpair(2) on Linux](https://man7.org/linux/man-pages/man2/socketpair.2.html#HISTORY)
- [socketpair(2) on FreeBSD](https://man.freebsd.org/cgi/man.cgi?query=socketpair&sektion=2#DESCRIPTION)
- [socketpair(2) on DragonFly](https://man.dragonflybsd.org/?command=socketpair§ion=2)
- [socketpair(2) on NetBSD](https://man.netbsd.org/socketpair.2#DESCRIPTION)
- [socketpair(2) on OpenBSD](https://man.openbsd.org/socketpair.2)
- [socketpair(3C) on Solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/socketpair-3c.html)
Changelog:
- Set SOCK_NONBLOCK and SOCK_CLOEXEC in the type argument of socketpair
- Avoid EPROTOTYPE on macOS and OpenBSD
- Eliminate the warnings about unused variables
- Add some comments
|
|
e4b87327
|
2024-02-20T08:58:04
|
|
Fix integer-overflow in ev_token_bucket_cfg_new
Found by oss-fuzz, after coverage had been improved in https://github.com/google/oss-fuzz/pull/11257
v2: better check (found by CI for windows)
|
|
c4fb0f76
|
2024-02-20T08:58:04
|
|
Fix divide-by-zero in ev_token_bucket_get_tick_
Found by oss-fuzz, after coverage had been improved in https://github.com/google/oss-fuzz/pull/11257
|
|
0dbd3eb3
|
2024-02-18T16:06:28
|
|
tests: add test for EV_SIGNAL with timeout
Refs: https://github.com/libevent/libevent-book/issues/12
|
|
ed35b30f
|
2023-10-23T16:52:19
|
|
Fix two compiler errors for unused variable and undefined function
In buffer.c a variable "flags" and a label "done" are defined but
never used if "EVENT__HAVEMMAP" is not defined.
The code does not work on platforms which do not provide
the function `socketpair()`. Introduce EVENT__HAVE_SOCKETPAIR flag
which determines if `socketpair()` or `evutil_ersatz_socketpair()`
is used.
|
|
87cdcc18
|
2024-02-18T15:24:58
|
|
http: change error for corrupted requests to 400 Bad Request
Previously it was 413 Request Entity Too Large, which was odd.
|
|
e60d039d
|
2024-02-18T15:02:59
|
|
tests: add a test for malformed chunks
v2: fix test for win32 (and it more correct in general)
|
|
4c38de8c
|
2023-11-26T20:52:32
|
|
Fix -Walloc-size (#1526)
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
c15ba75d
|
2023-09-22T09:35:42
|
|
Merge branch 'evbuffer_add_reference_with_offset' - #1513
* evbuffer_add_reference_with_offset:
Add a comment for evbuffer_ref_cleanup_cb
tests: simplify test_evbuffer_add_reference_with_offset
Add function evbuffer_add_reference_with_offset()
|
|
d9780cf9
|
2023-09-21T22:04:17
|
|
Fix -Wsingle-bit-bitfield-constant-conversion warning in clang 16
report:
/src/le/libevent/sample/becat.c:304:29: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
case 'k': o.extra.keep = 1; break;
|
|
cc3a9200
|
2023-09-21T22:02:48
|
|
tests: simplify test_evbuffer_add_reference_with_offset
|
|
648ec50e
|
2023-09-21T15:13:31
|
|
Add function evbuffer_add_reference_with_offset()
This is the same as evbuffer_add_reference(), but allows to specify
offset in the @data
v2: rename evbuffer_add_reference_misalign() to evbuffer_add_reference_with_offset()
|
|
f39ad1c4
|
2023-08-31T22:38:41
|
|
ws: replace evws_send with evws_send_text/evws_send_binary (ABI breakage) (#1500)
Replace evws_send with evws_send_text, and introduce new API -
evws_send_binary, that can be used to send binary frames.
But note, that this commit breaks the ABI compatibility, but it should be OK,
since there was only alpha release with evws_send, and nobody should rely on
this, and I hope nobody does (we decided to go this way to avoid supporting
deprecated API).
|
|
57d9eec6
|
2023-07-10T10:40:49
|
|
Disable signalfd by default
signalfd may behave differently to sigaction/signal, so to avoid
breaking libevent users (like [1], [2]) disable it by default.
[1]: https://github.com/tmux/tmux/pull/3621
[2]: https://github.com/tmux/tmux/pull/3626
Also signalfd is not that perfect:
- you need to SIG_BLOCK the signal before
- blocked signals are not reset on exec
- blocked signals are allowed to coalesce - so in case of multiple
signals sent you may get the signal only once (ok for most of the
signals, but may be a problem for SIGCHLD, though you may call
waitpid() in a loop or use pidfd)
- and also one implementation problem -
sigprocmask is unspecified in a multithreaded process
Refs:
- https://lwn.net/Articles/415684/
- https://ldpreload.com/blog/signalfd-is-useless
Refs: https://github.com/libevent/libevent/issues/1460
Refs: #1342 (cc @dmantipov)
|
|
227510d5
|
2023-07-13T22:20:33
|
|
Fix EVDNS_BASE_DISABLE_WHEN_INACTIVE (#1493)
I faced with strange problem: event loop doesn't exit after dns resolving with
`EVDNS_BASE_DISABLE_WHEN_INACTIVE`.
Stand:
- Ubuntu 22;
- libevent release-2.1.12-stable
- `resolve.conf` contains 2 nameservers;
- I use `evdns_base_new` with `EVDNS_BASE_DISABLE_WHEN_INACTIVE | EVDNS_BASE_INITIALIZE_NAMESERVERS` to avoid OS specific code.
After small investigation, look like events related with dns sockets added to
event_base before `evdns->disable_when_inactive` was initialized. `libevent`
did epoll_ctl(DEL) after resolving completed on the first socket, but the
second socket remained in the `epoll` interest list.
|
|
13366d27
|
2023-06-13T07:23:10
|
|
Test timer - synchronize clock before tv_timeout calculation.
|
|
fe610f2c
|
2023-05-14T22:35:53
|
|
Fix util/mm_calloc_enomem under FreeBSD
It looks like the compiler optimizes this call out with tt_assert():
(gdb) disas /m test_event_calloc_enomem
Dump of assembler code for function test_event_calloc_enomem:
0x0000000000293bb0 <+0>: push %rbp
0x0000000000293bb1 <+1>: mov %rsp,%rbp
0x0000000000293bb4 <+4>: call 0x29f510 <__error@plt>
0x0000000000293bb9 <+9>: movl $0x0,(%rax)
0x0000000000293bbf <+15>: call 0x2990e0 <tinytest_set_test_failed_>
0x0000000000293bc4 <+20>: mov $0x2168e4,%edi
0x0000000000293bc9 <+25>: mov $0x220582,%esi
0x0000000000293bce <+30>: mov $0x20d893,%edx
0x0000000000293bd3 <+35>: mov $0x53a,%ecx
0x0000000000293bd8 <+40>: xor %eax,%eax
0x0000000000293bda <+42>: call 0x29f3b0 <printf@plt>
0x0000000000293bdf <+47>: mov $0x20da72,%edi
0x0000000000293be4 <+52>: mov $0x20f731,%esi
0x0000000000293be9 <+57>: xor %eax,%eax
0x0000000000293beb <+59>: pop %rbp
0x0000000000293bec <+60>: jmp 0x29f3b0 <printf@plt>
While with tt_ptr_op() it does not:
(gdb) disas /m test_event_calloc_enomem
Dump of assembler code for function test_event_calloc_enomem:
0x0000000000293bd0 <+0>: push %rbp
0x0000000000293bd1 <+1>: mov %rsp,%rbp
0x0000000000293bd4 <+4>: push %rbx
0x0000000000293bd5 <+5>: push %rax
0x0000000000293bd6 <+6>: call 0x29f610 <__error@plt>
0x0000000000293bdb <+11>: movl $0x0,(%rax)
0x0000000000293be1 <+17>: mov $0xffffffffffffffff,%rdi
0x0000000000293be8 <+24>: mov $0xffffffffffffffff,%rsi
0x0000000000293bef <+31>: call 0x2a01c0 <calloc@plt>
0x0000000000293bf4 <+36>: test %rax,%rax
0x0000000000293bf7 <+39>: je 0x293c2b <test_event_calloc_enomem+91>
|
|
13f55523
|
2023-05-14T22:29:12
|
|
test: add missing include of arpa/inet.h for ntohs in regress_ws.c
This will fix one warning in FreeBSD
|
|
6eba967e
|
2023-05-14T22:00:19
|
|
Suppress -Wmacro-redefined for htonll/ntohll in OSX
OSX:
test/regress_ws.c:61:9: warning: 'htonll' macro redefined [-Wmacro-redefined]
#define htonll(x) \
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_endian.h:141:9: note: previous definition is here
#define htonll(x) __DARWIN_OSSwapInt64(x)
^
test/regress_ws.c:65:9: warning: 'ntohll' macro redefined [-Wmacro-redefined]
#define ntohll(x) htonll(x)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_endian.h:140:9: note: previous definition is here
#define ntohll(x) __DARWIN_OSSwapInt64(x)
^
|
|
5f1fc92b
|
2023-05-14T21:55:43
|
|
Fix -Wtautological-constant-out-of-range-compare in regress_http under OSX
compiler warning:
test/regress_http.c:968:38: warning: result of comparison of constant 65536 with expression of type 'enum evhttp_cmd_type' is always true [-Wtautological-constant-out-of-range-compare]
if (evhttp_request_get_command(req) != EVHTTP_REQ_CUSTOM) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
|
|
f04d90b1
|
2023-04-04T22:15:35
|
|
Fix building with -Wstack-protector due to VLA and fobid them
It is not a thankless task to fix such issues on and on, let's just
prohibit this cases, and our build with -Werror on CI will show new
issues from now on.
Fixes: #1434
|
|
fa05966d
|
2023-03-05T05:12:04
|
|
test: fix potential null dereference in https_bind_ssl_bevcb (#1428)
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
|
|
1df2a5a6
|
2023-02-12T17:05:20
|
|
test: enable allocator_may_return_null=1 for calloc with ENOMEM test
|
|
207ea62b
|
2023-02-12T16:46:40
|
|
test: handle -v as --verbose for regress
|
|
0ea20582
|
2023-02-12T21:39:04
|
|
test: add del_wait/del_notify tests for windows
Test manually, since CI is too slow
|
|
61de8a07
|
2023-02-12T15:47:16
|
|
test: fix leaks in bufferevent_pair_release_lock (#1413)
|
|
c257e16f
|
2023-02-12T08:34:52
|
|
test: fix debug locks in case new lock gots old address
Refs: #1407
|
|
fb900a28
|
2023-02-12T08:12:20
|
|
test: suppress logs from the tests that produce them under normal circumstances
|
|
1201bb85
|
2023-02-12T07:59:17
|
|
test: fix TT_* flags values
|
|
35375101
|
2023-01-27T08:57:33
|
|
Fixes some new warnings under clang-15
- -Wdeprecated-non-prototype
/src/le/libevent/strlcpy.c:48:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
event_strlcpy_(dst, src, siz)
- -Wstrict-prototypes
/src/le/libevent/evthread.c:82:70: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
struct evthread_condition_callbacks *evthread_get_condition_callbacks()
- -Wunused-but-set-variable
/src/le/libevent/test/regress_buffer.c:130:6: warning: variable 'n' set but not used [-Wunused-but-set-variable]
int n = 0;
^
|
|
ebd7e8d7
|
2023-01-27T08:44:41
|
|
Allow evdns_base_new to succeed with no nameservers configured
If resolv.conf has no nameservers, evdns_base_new can still succeed with
the default of using the name server from localhost matching the man
page documentation for resolv.conf.
|
|
a7fffb5c
|
2023-01-17T23:02:56
|
|
Replace magic numbers with consts for evdns_base_resolv_conf_parse() errors
|
|
1af745d0
|
2022-10-25T11:30:34
|
|
signal: new signal handling backend based on signalfd
Linux-specific signal handling backend based on signalfd(2)
system call, and public function event_base_get_signal_method()
to obtain an underlying kernel signal handling mechanism.
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
|
|
3ec3b469
|
2022-10-23T13:47:23
|
|
ws: fix compile error on centos 7 - very old compiler (#1359)
* http: fix typo
* ws: fix comile error
On CentOS:
CC ws.lo
ws.c: In function 'get_ws_frame':
ws.c:244:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (int i = 0; i < payload_len; i++) {
^
ws.c:244:3: note: use option -std=c99 or -std=gnu99 to compile your code
|
|
c2ecb4ac
|
2022-10-12T14:13:44
|
|
Add locks for server WS, fixes #1357
|
|
aa163a4f
|
2022-10-04T21:42:30
|
|
Fix memleak in regress tests
|
|
88317a4e
|
2022-10-04T17:49:22
|
|
Add helpers and all regress tests are passed
|
|
f8bb9d84
|
2022-09-16T15:55:56
|
|
Fix socketpair failure when temporary directory has non-latin character
|
|
e8313084
|
2022-09-12T22:16:56
|
|
Add minimal WebSocket server implementation for evhttp (#1322)
This adds few functions to use evhttp-based webserver to handle incoming
WebSockets connections. We've tried to use both libevent and libwebsockets in
our application, but found that we need to have different ports at the same
time to handle standard HTTP and WebSockets traffic. This change can help to
stick only with libevent library.
Implementation was inspired by modified Libevent source code in ipush project
[1].
[1]: https://github.com/sqfasd/ipush/tree/master/deps/libevent-2.0.21-stable
Also, WebSocket-based chat server was added as a sample.
|
|
bb57cea3
|
2022-08-14T09:56:50
|
|
test: fix util/getaddrinfo for netbsd (v2)
Fixes: c198b0ce ("test: fix util/getaddrinfo for netbsd")
Fixes: #1316
|
|
77a9b60e
|
2022-08-14T00:46:48
|
|
Merge pull request #1315 from yogo1212/http_per_socket_bebcb
In it's current form, libevent requires multiple struct evhttp objects to be created in order to enable listening on sockets with more than one type of encryption.
This change allows specifying per-socket how the associated bufferevents should be created.
Thus, it becomes possible to have multiple listening sockets with different encryption parameters using only one evttp.
|
|
c198b0ce
|
2022-08-13T20:48:00
|
|
test: fix util/getaddrinfo for netbsd
Fixes: #1316
|
|
1bdc9135
|
2022-08-01T10:16:18
|
|
http: allow setting bevcb per socket
Co-authored-by: Azat Khuzhin <azat@libevent.org>
v2: remove handling of HTTP_BIND_IPV6
|
|
a4cdc3c5
|
2022-08-13T19:51:02
|
|
test: allow to run init_ssl() multiple times
|
|
4ca417af
|
2022-08-13T19:51:45
|
|
test: add a comment for init_ssl() about suppressions for LSan
|
|
33fb0e35
|
2022-07-12T09:54:14
|
|
test: fix unused variable in rand test (catched by newer clang)
|
|
213a822a
|
2022-07-11T22:52:57
|
|
test: increase timeout significantly in dns/getaddrinfo_cancel_stress (for TSan)
Fixes: #1304
|
|
5ff98dc1
|
2022-07-10T17:33:15
|
|
evdns: accept domains up to 254 long (previosly only 63 long was accepted)
Previously evdns was using HOST_NAME_MAX, and define it to 255 *only* if
it not set, however it does set on linux:
$ egrep -r define.*HOST_NAME_MAX /usr/include/bits
/usr/include/bits/local_lim.h:#define HOST_NAME_MAX 64
/usr/include/bits/posix1_lim.h:#define _POSIX_HOST_NAME_MAX 255
/usr/include/bits/confname.h:#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
But 64 should be the limit of the host component, not for the whole
hostname, as also noted by @ploxiln
So use our own EVDNS_NAME_MAX const, which is set to 255.
Fixes: #1280
|
|
1933f6aa
|
2022-07-10T16:31:57
|
|
test: make dns/getaddrinfo_cancel_stress more deterministic
Fixes: #1271
Follow-up for: 90bcf2d660b9b43cb8e747421d4938f08f935bd7
|
|
d84c8851
|
2022-07-10T09:59:14
|
|
test: suppress warning for already defined SSL_get_peer_certificate
build report:
[1/2] Building C object CMakeFiles/regress.dir/test/regress_mbedtls.c.o
/src/le/libevent/test/regress_mbedtls.c:50: warning: "SSL_get_peer_certificate" redefined
50 | #define SSL_get_peer_certificate mbedtls_ssl_get_peer_cert
|
In file included from /src/le/libevent/test/regress.h:139,
from /src/le/libevent/test/regress_mbedtls.c:35:
/src/oss/openssl/include/openssl/ssl.h:1799: note: this is the location of the previous definition
1799 | # define SSL_get_peer_certificate SSL_get1_peer_certificate
|
[2/2] Linking C executable bin/regress
But this should be cleaned up.
|
|
c22f2757
|
2022-07-09T23:27:23
|
|
Use OPENSSL_VERSION_NUMBER over OPENSSL_VERSION_MAJOR (for compatibility)
Since OpenSSL 3.0 there is new OPENSSL_VERSION_MAJOR, but previous
releases does not have it.
So let's use plain old OPENSSL_VERSION_NUMBER to avoid more preprocessor
macros.
|
|
29c420c4
|
2022-06-18T21:43:31
|
|
Initial OpenSSL 3.0 support
* Don't use deprecated functions when building against OpenSSL 3.0.
* Recognise that OpenSSL 3.0 can signal a dirty shutdown as a protocol.
error in addition to the expected IO error produced by OpenSSL 1.1.1
* Update regress_mbedtls.c for compatibility with OpenSSL 3
|
|
384c52e6
|
2022-06-23T23:06:14
|
|
Initial Mbed-TLS 3 support to get the GitHub Actions working again
mingw has upgraded to Mbed-TLS 3.1.0, so all the mingw tests that need
Mbed-TLS currently don't work.
v2: add missing mbedtls/version.h into test/regress_mbedtls.c
v3: suppress #warning "Including compat-2.x.h is deprecated" for mbedtls/compat-2.x.h
|
|
89332176
|
2022-07-09T17:14:12
|
|
test: ignore -Walloc-size-larger-than error for calloc() returns ENOMEM
Compiler report:
/home/runner/work/libevent/libevent/test/regress_util.c: In function ‘test_event_calloc’:
/home/runner/work/libevent/libevent/test/regress_util.c:1318:4: error: argument 2 value ‘9223372036854775815’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
p = mm_calloc(EV_SIZE_MAX/2, EV_SIZE_MAX/2 + 8);
In file included from /home/runner/work/libevent/libevent/test/../util-internal.h:37:0,
from /home/runner/work/libevent/libevent/test/regress_util.c:30:
/usr/include/stdlib.h:541:14: note: in a call to allocation function ‘calloc’ declared here
extern void *calloc (size_t __nmemb, size_t __size)
v2: clang on CI does not have this option
|
|
187f6b91
|
2022-06-27T22:41:47
|
|
OpenSSL 3 fixes: Disable TLS 1.3 when testing renegotiation support
TLS 1.3 does not support renegotation - it has been removed from the
protocol. Disable TLS 1.3 when testing this, so we negotiate an older
protocol version
|
|
e563c9b2
|
2022-06-27T22:00:05
|
|
OpenSSL 3 fixes: use SHA256 instead of SHA1
OpenSSL 3.x does not support signing certificates with SHA1 by default.
Use SHA256 instead.
|
|
a9595ccd
|
2021-12-21T13:15:58
|
|
regress_ssl: Use intptr_t when shoving an int into a void *
Currently the code uses long, but long does not always have the same
representation as a pointer, such as on 64-bit Windows where long is
only 32-bit due to its unususal LLP64 ABI, but also on CHERI, and thus
Arm's prototype Morello architecture, where C language pointers are
represented as hardware capabilities, which have bounds, permissions and
other metadata to enforce spatial memory safety. Both of these cases
warn when casting a long to a pointer (Windows due to long being shorter
and thus it being likely you've truncated the address, and CHERI due to
long not having any capability metadata like pointers and thus it being
likely you've stripped the metadata, with the resulting "null-derived"
capability destined to trap if dereferenced), and in both cases casting
to intptr_t as the intermediate type instead will get rid of those
warnings.
|
|
09e9fed2
|
2021-12-21T08:47:00
|
|
test: fix leak in http/cancel_*server_timeout tests
Fixes: #1242
|
|
cd6a41ec
|
2021-12-10T11:05:13
|
|
feat: add `evdns_base_get_nameserver_fd` method
To get underlying udp socket fd.
|
|
12cedc8a
|
2021-11-17T08:40:40
|
|
Fix deadlock in case of evconnlistener_disable() in parallel with callback
I've got an issue when stop evconnlistener not in the event_base_loop()
thread. evconnlistener_disable() acquired lev->lock, if the same time,
user callbacks is runing, the event thread released lock, after callback
finished, it try to aquire the lock again, I think this makes conflict:
Here is backtraces:
thread 1:
0 __lll_lock_wait (futex=futex@entry=0x555555559a60, private=0) at lowlevellock.c:52
1 0x00007ffff7f2a131 in __GI___pthread_mutex_lock (mutex=0x555555559a60) at ../nptl/pthread_mutex_lock.c:115
2 0x00007ffff7f424c9 in evthread_posix_lock (mode=0, lock_=0x555555559a60) at evthread_pthread.c:79
3 0x00007ffff7f7dc12 in listener_read_cb (fd=7, what=2, p=0x5555555599a0) at listener.c:439
4 0x00007ffff7f6d758 in event_persist_closure (base=0x555555559370, ev=0x5555555599d8) at event.c:1645
5 0x00007ffff7f6da60 in event_process_active_single_queue (base=0x555555559370, activeq=0x5555555597e0,
max_to_process=2147483647, endtime=0x0) at event.c:1704
6 0x00007ffff7f6e018 in event_process_active (base=0x555555559370) at event.c:1805
7 0x00007ffff7f6e92a in event_base_loop (base=0x555555559370, flags=0) at event.c:2047
8 0x0000555555555449 in main () at test_listen.c:67
thread 2:
0 futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x555555559858) at ../sysdeps/nptl/futex-internal.h:183
1 __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x555555559800, cond=0x555555559830) at pthread_cond_wait.c:508
2 __pthread_cond_wait (cond=0x555555559830, mutex=0x555555559800) at pthread_cond_wait.c:638
3 0x00007ffff7f426f3 in evthread_posix_cond_wait (cond_=0x555555559830, lock_=0x555555559800, tv=0x0) at evthread_pthread.c:162
4 0x00007ffff7f70bc5 in event_del_nolock_ (ev=0x5555555599d8, blocking=2) at event.c:2934
5 0x00007ffff7f70748 in event_del_ (ev=0x5555555599d8, blocking=2) at event.c:2821
6 0x00007ffff7f707a1 in event_del (ev=0x5555555599d8) at event.c:2830
7 0x00007ffff7f7d76e in event_listener_disable (lev=0x5555555599a0) at listener.c:343
8 0x00007ffff7f7d6e5 in evconnlistener_disable (lev=0x5555555599a0) at listener.c:325
9 0x00005555555552c3 in disable_thread (arg=0x5555555599a0) at test_listen.c:27
10 0x00007ffff7f27609 in start_thread (arg=<optimized out>) at pthread_create.c:477
11 0x00007ffff7e4e293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
|
082941ed
|
2021-11-24T14:41:33
|
|
build: remove inconsistently used x-prefix comparisons
Given that these are already used inconsistently with `test` checks, it
makes sense to consolidate to not use the x-prefix comparisons at all.
In any case, it would be nice to think we no longer have to work around
a problem that existed in shells many, many years ago.
More info:
https://github.com/koalaman/shellcheck/wiki/SC2268
https://www.vidarholen.net/contents/blog/?p=1035
|
|
9a38bc5f
|
2021-11-01T10:01:06
|
|
evutil: Fix evutil_freeaddrinfo
During testing on win32, util/getaddrinfo failed with NULL hint info
r = evutil_getaddrinfo("www.google.com", NULL, NULL, &ai);
throwing a critical heap exception when evutil_freeaddrinfo is called.
This is because of improper use of freeaddrinfo when nodes within the
ai structure are allocated using mm_malloc or mm_calloc
(EVUTIL_AI_LIBEVENT_ALLOCATED)
This adds the flag in apply_socktype_protocol_hack and walks the linked
list in evutil_freeaddrinfo removing linked list nodes that are custom
allocated before calling freeaddrinfo.
|
|
3daebf30
|
2021-09-29T13:50:35
|
|
test: retriable tests are marked failed only when all attempts have failed
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
|
|
90846c30
|
2021-09-19T13:18:40
|
|
test: add --retries-delay (and set to 1 second by default)
In attemp to address failures of dns/tcp_* tests under windows [1].
[1]: https://github.com/azat/libevent/runs/3644218468?check_suite_focus=true
|
|
d7d6af75
|
2021-09-19T13:15:02
|
|
test: add --retries argument
|
|
29492364
|
2021-09-19T12:56:24
|
|
test/regress_http: mark data_length_constraints as retriable
CI: https://github.com/libevent/libevent/runs/3643914024?check_suite_focus=true
|
|
7855900c
|
2021-09-19T12:24:50
|
|
test/dns: mark TCP tests as retriable
CI: https://github.com/azat/libevent/runs/3643912296 # tcp_resolve_many_clients
CI: https://github.com/azat/libevent/runs/3643912192 # tcp_timeout
CI: https://github.com/azat/libevent/runs/3643912336 # tcp_resolve
CI: https://github.com/azat/libevent/runs/3643912174 # tcp_resolve_pipeline
|
|
6ad6afb6
|
2021-09-19T12:23:48
|
|
test/regress: retry some signal rlated tests in darwin
CI: https://github.com/azat/libevent/runs/3643912290 # simplestsignal
CI: https://github.com/azat/libevent/runs/3643912296 # simplesignal
CI: https://github.com/azat/libevent/runs/3643912228 # multiplesignal
|
|
58606a62
|
2021-09-19T12:21:39
|
|
test/regress_util: mark monotonic_prc as retriable
CI: https://github.com/azat/libevent/runs/3643966877
|
|
de53da2e
|
2021-09-19T11:07:55
|
|
test/regress_http: fix unix_socket test
|
|
95eadf04
|
2021-09-19T10:54:27
|
|
test/regress_http: disable max_connections/data_length_constraints under windows
CI: https://github.com/libevent/libevent/runs/3643554394
|
|
f1e9e4da
|
2021-09-19T01:47:42
|
|
test: cleanup stalled socket after running http/unix_sock
Otherwise it breaks upload-artifacts:
Run actions/upload-artifact@v1
Uploading artifact 'ubuntu-18.04-cmake-NONE-build' from '/home/runner/work/libevent/libevent/build' for run #346
Uploading 1095 files
File error 'No such device or address' when uploading file '/home/runner/work/libevent/libevent/build/foo'.
...
Error: No such device or address
Error: Exit code 1 returned from process: file name '/home/runner/runners/2.282.1/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.PublishArtifact, Runner.Plugins"'.
|
|
f89e8612
|
2021-09-19T01:23:07
|
|
test: check return value of write()/send() in bufferevent_read_failed
This will also suppress:
../test/regress_bufferevent.c: In function ‘test_bufferevent_read_failed’: 1102
../test/regress_bufferevent.c:1395:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] 1103
write(data->pair[0], buf, strlen(buf));
|
|
04fcd7c6
|
2021-09-19T00:57:31
|
|
test: mark util/monotonic_prc_fallback as retriable
Refs: #1193
|
|
5303feff
|
2021-09-17T04:47:34
|
|
test: http_unix_socket_test: fix url could be freed uninitialized
> regress_http.c:2279:2: warning: variable 'uri' is used uninitialized
> whenever 'if' condition is true
|
|
4f73bf3a
|
2021-09-17T01:56:56
|
|
test: regress_http: skip unix socket parsing tests in windows
windows doesn't do unix sockets
|
|
58d4e50d
|
2021-09-17T01:39:46
|
|
test: fix regress_http evhttp_bind_unixsocket() on macOS
needs to use evutil socket helper for SOCK_NONBLOCK / SOCK_CLOEXEC
|
|
fabbf3b3
|
2021-09-14T01:19:36
|
|
test: skip dns_initialize_nameservers if missing /etc/resolv.conf
some build systems run tests in minimal containers with no resolv.conf,
and the primary thing this test does is load the default /etc/resolv.conf
|
|
86292628
|
2021-08-10T23:14:01
|
|
test: fix checking test args for http_parse_uri_test
|
|
f446229b
|
2016-01-31T11:31:00
|
|
http: support unix domain sockets
There are no standard for encoding a unix socket in an url. nginx uses:
http://unix:/path/to/unix/socket:/httppath
The second colon is needed to delimit where the unix path ends and where
the rest of the url continues.
Signed-off-by: Sean Young <sean@mess.org>
|
|
8f74b30c
|
2021-05-30T13:05:25
|
|
Replace gettimeofday with the portable wrapper
Otherwise the Win32 build fails.
|
|
19b3fd0b
|
2021-04-07T20:39:18
|
|
evdns: add ability to get CNAME
Add new flag (DNS_CNAME_CALLBACK) for
evdns_base_resolve_ipv4()/evdns_base_resolve_ipv6().
If set, you will get one more callback with type == DNS_CNAME and CNAME
in addrs argument.
|
|
dff8fd27
|
2021-04-22T22:35:59
|
|
test/regress.h: Increase default timeval tolerance 50 ms -> 100 ms
The default timeout tolerance is 50 ms,
which causes intermittent failure in many the
related tests in arm64 QEMU.
See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14163
(The root cause seems to be a heavy load)
Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
|
|
4c29b01c
|
2021-03-28T10:57:11
|
|
build: remove splice implementation fragments
Looks like a `splice` implementation was planned, but has clearly never
eventuated (the TODO comment is from ~12 years ago, in
8b5bd77415fb6634fadf08357676926fecf5f032). For now, it's probably better
to remove the unused code/correct the docs.
|
|
bc25889f
|
2021-02-03T14:19:57
|
|
Check return value of evbuffer_remove() in bufferevent_read()
The conflict cast convertion between the return value of
bufferevent_read() and evbuffer_remove(), int(-1)->size_t(An undefined
maximum)
Add test case of bufferevent_read() should return 0 in case of
evbuffer_remove() returns -1
Fixes: #1132
|
|
f17eb6f5
|
2021-01-18T23:23:42
|
|
test/regress_http: cover reading of chunked payload by server
This is an example with transfer-encoding by client via bufferevent for
the #1131
|