Welcome! Log In Create A New Profile

Advanced

[nginx] Events: fixed "port_dissociate() failed" alerts with eventport.

Maxim Dounin
March 28, 2021 10:48AM
details: https://hg.nginx.org/nginx/rev/e0844646099b
branches:
changeset: 7807:e0844646099b
user: Maxim Dounin <mdounin@mdounin.ru>
date: Sun Mar 28 17:45:29 2021 +0300
description:
Events: fixed "port_dissociate() failed" alerts with eventport.

If an attempt is made to delete an event which was already reported,
port_dissociate() returns an error. Fix is avoid doing anything if
ev->active is not set.

Possible alternative approach would be to avoid calling ngx_del_event()
at all if ev->active is not set. This approach, however, will require
something else to re-add the other event of the connection, since both
read and write events are dissociated if an event is reported on a file
descriptor. Currently ngx_eventport_del_event() re-associates write
event if called to delete read event, and vice versa.

diffstat:

src/event/modules/ngx_eventport_module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 2ed5d03c2d90 -r e0844646099b src/event/modules/ngx_eventport_module.c
--- a/src/event/modules/ngx_eventport_module.c Fri Mar 26 01:44:59 2021 +0300
+++ b/src/event/modules/ngx_eventport_module.c Sun Mar 28 17:45:29 2021 +0300
@@ -399,7 +399,7 @@ ngx_eventport_del_event(ngx_event_t *ev,
return NGX_ERROR;
}

- } else {
+ } else if (ev->active) {
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0,
"eventport del event: fd:%d", c->fd);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Events: fixed "port_dissociate() failed" alerts with eventport.

Maxim Dounin 58 March 28, 2021 10:48AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 46
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready