[OpenSIPS-Devel] [OpenSIPS/opensips] fddb7e: Fix crash in db_timer_udomain() when the database ...
Branch: refs/heads/3.1 Home: https://github.com/OpenSIPS/opensips Commit: fddb7eafb586a104203cf194a71b2bbc0e90655f https://github.com/OpenSIPS/opensips/commit/fddb7eafb586a104203cf194a71b2bbc0e90655f Author: Walter Doekes Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/usrloc/udomain.c Log Message: --- Fix crash in db_timer_udomain() when the database has little work The previous code, added in 1f0be8f02 but mostly fixed by 0d0909fc1, added this interesting erroneous pattern: static db_ps_t my_ps = NULL; db_key_t keys[2]; db_op_t ops[2]; if (my_ps == NULL) { keys[0] = _col; ops[0] = "<"; ... That is: the initialisation of the stack depended on a global (local static). Once it was set, the initialisation would be skipped, causing keys and ops to contain undefined values. Due to the way the CON_PS_REFERENCE() prepared statement handle code has become, my_ps would always be reset to NULL after use, hiding this bug. However, if you have a flaky database connection (for instance an auto-closing socket on a machine with little traffic) then the following happens: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (2003): Lost connection to backend server. ERROR:usrloc:db_timer_udomain: failed to delete from table location ERROR:usrloc:synchronize_all_udomains: synchronizing cache failed When this happens, my_ps is _not_ reset to NULL, and the next time this function is invoked, keys and ops are undefined, causing a segfault down the road. This changeset adds an if around use_table() because all the other code in this module does so. The actual fix is the removal of if(my_ps==NULL). (An alternative fix could have been to explicitly reset the prepared statement handle to NULL like 57caa6c03 does. Or to make keys and ops static too and set them only once.) (cherry picked from commit 50fe41d2d07fffab91f22034518c2cf1cb631a3d) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 71d780: Fix crash in db_timer_udomain() when the database ...
Branch: refs/heads/2.4 Home: https://github.com/OpenSIPS/opensips Commit: 71d7801e6e64c9061580fc7186d26e3f2b97c599 https://github.com/OpenSIPS/opensips/commit/71d7801e6e64c9061580fc7186d26e3f2b97c599 Author: Walter Doekes Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/usrloc/udomain.c Log Message: --- Fix crash in db_timer_udomain() when the database has little work The previous code, added in 1f0be8f02 but mostly fixed by 0d0909fc1, added this interesting erroneous pattern: static db_ps_t my_ps = NULL; db_key_t keys[2]; db_op_t ops[2]; if (my_ps == NULL) { keys[0] = _col; ops[0] = "<"; ... That is: the initialisation of the stack depended on a global (local static). Once it was set, the initialisation would be skipped, causing keys and ops to contain undefined values. Due to the way the CON_PS_REFERENCE() prepared statement handle code has become, my_ps would always be reset to NULL after use, hiding this bug. However, if you have a flaky database connection (for instance an auto-closing socket on a machine with little traffic) then the following happens: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (2003): Lost connection to backend server. ERROR:usrloc:db_timer_udomain: failed to delete from table location ERROR:usrloc:synchronize_all_udomains: synchronizing cache failed When this happens, my_ps is _not_ reset to NULL, and the next time this function is invoked, keys and ops are undefined, causing a segfault down the road. This changeset adds an if around use_table() because all the other code in this module does so. The actual fix is the removal of if(my_ps==NULL). (An alternative fix could have been to explicitly reset the prepared statement handle to NULL like 57caa6c03 does. Or to make keys and ops static too and set them only once.) (cherry picked from commit 50fe41d2d07fffab91f22034518c2cf1cb631a3d) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 50fe41: Fix crash in db_timer_udomain() when the database ...
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: 50fe41d2d07fffab91f22034518c2cf1cb631a3d https://github.com/OpenSIPS/opensips/commit/50fe41d2d07fffab91f22034518c2cf1cb631a3d Author: Walter Doekes Date: 2021-04-13 (Tue, 13 Apr 2021) Changed paths: M modules/usrloc/udomain.c Log Message: --- Fix crash in db_timer_udomain() when the database has little work The previous code, added in 1f0be8f02 but mostly fixed by 0d0909fc1, added this interesting erroneous pattern: static db_ps_t my_ps = NULL; db_key_t keys[2]; db_op_t ops[2]; if (my_ps == NULL) { keys[0] = _col; ops[0] = "<"; ... That is: the initialisation of the stack depended on a global (local static). Once it was set, the initialisation would be skipped, causing keys and ops to contain undefined values. Due to the way the CON_PS_REFERENCE() prepared statement handle code has become, my_ps would always be reset to NULL after use, hiding this bug. However, if you have a flaky database connection (for instance an auto-closing socket on a machine with little traffic) then the following happens: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (2003): Lost connection to backend server. ERROR:usrloc:db_timer_udomain: failed to delete from table location ERROR:usrloc:synchronize_all_udomains: synchronizing cache failed When this happens, my_ps is _not_ reset to NULL, and the next time this function is invoked, keys and ops are undefined, causing a segfault down the road. This changeset adds an if around use_table() because all the other code in this module does so. The actual fix is the removal of if(my_ps==NULL). (An alternative fix could have been to explicitly reset the prepared statement handle to NULL like 57caa6c03 does. Or to make keys and ops static too and set them only once.) Commit: f7b8e1bf0c9cf4f5d3064934feb78b50dc7bf5f3 https://github.com/OpenSIPS/opensips/commit/f7b8e1bf0c9cf4f5d3064934feb78b50dc7bf5f3 Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/usrloc/udomain.c Log Message: --- Merge branch 'fix-usrloc-crash-in-db_timer_udomain' of https://github.com/wdoekes/opensips into wdoekes-fix-usrloc-crash-in-db_timer_udomain Compare: https://github.com/OpenSIPS/opensips/compare/551c1ed41d93...f7b8e1bf0c9c ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 551c1e: Update contributors
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: 551c1ed41d93eb724e357c69786526e3468a030e https://github.com/OpenSIPS/opensips/commit/551c1ed41d93eb724e357c69786526e3468a030e Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M doc/build-contrib.sh Log Message: --- Update contributors ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] a45d39: [rest_client] Fix async connection logic
Branch: refs/heads/2.4 Home: https://github.com/OpenSIPS/opensips Commit: a45d391594f0521056dee6f56df9779894ea0dab https://github.com/OpenSIPS/opensips/commit/a45d391594f0521056dee6f56df9779894ea0dab Author: John Burke Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/rest_client/rest_methods.c Log Message: --- [rest_client] Fix async connection logic Fixes #2483 (cherry picked from commit 98c6652a08869f5eb82295c9e6b8a419a8e1b128) Commit: f9c28aac8748553bc677a63e965f1f8b909a265a https://github.com/OpenSIPS/opensips/commit/f9c28aac8748553bc677a63e965f1f8b909a265a Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/rest_client/rest_methods.c Log Message: --- rest_client: Fix async rest_get() stalling with local web server Similar issue to #2483, where the async GET operation would stall indefinitely, due to curl_multi_perform() not being called multiple times during the single invocation of the "resume" callback. In this case, the issue was caused by a misplaced "enable_expect_100" check. Not using the "Expect: 100" feature doesn't mean that curl_multi_perform() should be called at most once. Using libcurl 7.68 (cherry picked from commit fc88b2c99238c85c53fabf363b5ba1393d54c10d) Commit: 2a58814cfbdbabc4691718fdfa58af2112e92f68 https://github.com/OpenSIPS/opensips/commit/2a58814cfbdbabc4691718fdfa58af2112e92f68 Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M io_wait.h Log Message: --- io_watch_del(): Suppress DEL errors for closed fds Similar fix to 21344d1f7 (from 6 years ago), but for newer Linux kernels (e.g. 5.8.0), which return ENOENT instead of EBADF. Fixes: DBG:rest_client:_resume_async_http_req: HTTP response code: 200 DBG:tm:io_watch_del: [UDP_worker] io_watch_del op on index -1 246 (0x561edd52c560, 246, -1, 0x10,0x1) fd_no=5 called ERROR:tm:io_watch_del: [UDP_worker] removing fd from epoll (246 from 171) list failed: No such file or directory [2] (cherry picked from commit 4e43db731a5500163141607d9400e42a74d2f293) Compare: https://github.com/OpenSIPS/opensips/compare/b76178639573...2a58814cfbdb ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 1b4ff6: [rest_client] Fix async connection logic
Branch: refs/heads/3.1 Home: https://github.com/OpenSIPS/opensips Commit: 1b4ff6da684d54928af33ac20dad685b8e1951d0 https://github.com/OpenSIPS/opensips/commit/1b4ff6da684d54928af33ac20dad685b8e1951d0 Author: John Burke Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/rest_client/rest_methods.c Log Message: --- [rest_client] Fix async connection logic Fixes #2483 (cherry picked from commit 98c6652a08869f5eb82295c9e6b8a419a8e1b128) Commit: 35b691815ec88255f4d379e235a987957bba6bbe https://github.com/OpenSIPS/opensips/commit/35b691815ec88255f4d379e235a987957bba6bbe Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/rest_client/rest_methods.c Log Message: --- rest_client: Fix async rest_get() stalling with local web server Similar issue to #2483, where the async GET operation would stall indefinitely, due to curl_multi_perform() not being called multiple times during the single invocation of the "resume" callback. In this case, the issue was caused by a misplaced "enable_expect_100" check. Not using the "Expect: 100" feature doesn't mean that curl_multi_perform() should be called at most once. Using libcurl 7.68 (cherry picked from commit fc88b2c99238c85c53fabf363b5ba1393d54c10d) Commit: 82085f5e58c913310e1e68c45c936e2be713ee9b https://github.com/OpenSIPS/opensips/commit/82085f5e58c913310e1e68c45c936e2be713ee9b Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M io_wait.h Log Message: --- io_watch_del(): Suppress DEL errors for closed fds Similar fix to 21344d1f7 (from 6 years ago), but for newer Linux kernels (e.g. 5.8.0), which return ENOENT instead of EBADF. Fixes: DBG:rest_client:_resume_async_http_req: HTTP response code: 200 DBG:tm:io_watch_del: [UDP_worker] io_watch_del op on index -1 246 (0x561edd52c560, 246, -1, 0x10,0x1) fd_no=5 called ERROR:tm:io_watch_del: [UDP_worker] removing fd from epoll (246 from 171) list failed: No such file or directory [2] (cherry picked from commit 4e43db731a5500163141607d9400e42a74d2f293) Compare: https://github.com/OpenSIPS/opensips/compare/bbf58fc148f5...82085f5e58c9 ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 4e43db: io_watch_del(): Suppress DEL errors for closed fds
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: 4e43db731a5500163141607d9400e42a74d2f293 https://github.com/OpenSIPS/opensips/commit/4e43db731a5500163141607d9400e42a74d2f293 Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M io_wait.h Log Message: --- io_watch_del(): Suppress DEL errors for closed fds Similar fix to 21344d1f7 (from 6 years ago), but for newer Linux kernels (e.g. 5.8.0), which return ENOENT instead of EBADF. Fixes: DBG:rest_client:_resume_async_http_req: HTTP response code: 200 DBG:tm:io_watch_del: [UDP_worker] io_watch_del op on index -1 246 (0x561edd52c560, 246, -1, 0x10,0x1) fd_no=5 called ERROR:tm:io_watch_del: [UDP_worker] removing fd from epoll (246 from 171) list failed: No such file or directory [2] ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] fc88b2: rest_client: Fix async rest_get() stalling with lo...
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: fc88b2c99238c85c53fabf363b5ba1393d54c10d https://github.com/OpenSIPS/opensips/commit/fc88b2c99238c85c53fabf363b5ba1393d54c10d Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/rest_client/rest_methods.c Log Message: --- rest_client: Fix async rest_get() stalling with local web server Similar issue to #2483, where the async GET operation would stall indefinitely, due to curl_multi_perform() not being called multiple times during the single invocation of the "resume" callback. In this case, the issue was caused by a misplaced "enable_expect_100" check. Not using the "Expect: 100" feature doesn't mean that curl_multi_perform() should be called at most once. Using libcurl 7.68 ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 98c665: [rest_client] Fix async connection logic
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: 98c6652a08869f5eb82295c9e6b8a419a8e1b128 https://github.com/OpenSIPS/opensips/commit/98c6652a08869f5eb82295c9e6b8a419a8e1b128 Author: John Burke Date: 2021-04-23 (Fri, 23 Apr 2021) Changed paths: M modules/rest_client/rest_methods.c Log Message: --- [rest_client] Fix async connection logic Fixes #2483 Commit: f3b1c3d9b42e04c6373590fdf9c71f8c456af7ba https://github.com/OpenSIPS/opensips/commit/f3b1c3d9b42e04c6373590fdf9c71f8c456af7ba Author: Liviu Chircu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/rest_client/rest_methods.c Log Message: --- Merge pull request #2484 from john08burke/async_rest_issue [rest_client] Fix async connection logic Compare: https://github.com/OpenSIPS/opensips/compare/a1eb48011b63...f3b1c3d9b42e ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] a1eb48: Fix missing tracing for UAS in-dialog requests
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: a1eb48011b634450ee7ebf9344abcdbe04f79c87 https://github.com/OpenSIPS/opensips/commit/a1eb48011b634450ee7ebf9344abcdbe04f79c87 Author: Bogdan-Andrei Iancu Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M modules/b2b_entities/b2be_load.h M modules/b2b_entities/dlg.c M modules/b2b_entities/dlg.h M modules/b2b_entities/server.c M modules/tracer/tracer.c Log Message: --- Fix missing tracing for UAS in-dialog requests Expand the tracing function to take the UAC incoming request as param also, so we can trace it too. ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel