Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)
Hi, @saghul , @aerringer is indeed right - I wasn;t paying too much attached to the inners of the timer routing. But starting with 2.1, there is no such concept as timer process. The timer routines are executed in any (ballanced) opensips process (worker). So using static vars between the calls of your timer routine is broken now. The solution proposed by @aerringer is ok (to move the counter in shared memory, so it is accessible from any process - depending on where the timer job is executed). Another solution, much simpler (no shm mem or locking involved), is how the nathelper module does (in order to accomplish the partitioning of the pingings). It simply registers the timer routing multiple times, with different parameters, where the param value consists of all possible values of the iterator (from 1 to keepalive_interval, in your case). See: https://github.com/OpenSIPS/opensips/blob/2.1/modules/nathelper/nathelper.c#L552 @aerringer , some interesting for you, that may simplify your patch a lot - the nat_helper timer routing is registered with "TIMER_FLAG_DELAY_ON_DELAY" - this guarantees that (even executed in various processes) the handler will not be run in parallel (all its executions will be serial). So you do not need locking at all. Also, the counter itself can shm allocated and its pointer can be passed to the timer handler (more elegant versus a global var). --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/pull/751#issuecomment-171257486___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 76034a: redis: add timeout for connect and query
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: 76034ad60dfd991232ac3053c07f7a72de234e43 https://github.com/OpenSIPS/opensips/commit/76034ad60dfd991232ac3053c07f7a72de234e43 Author: Razvan CraineaDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/cachedb_redis/README M modules/cachedb_redis/cachedb_redis.c M modules/cachedb_redis/cachedb_redis_dbase.c M modules/cachedb_redis/cachedb_redis_dbase.h M modules/cachedb_redis/doc/cachedb_redis_admin.xml Log Message: --- redis: add timeout for connect and query This prevents OpenSIPS from blocking waiting for a connection to be established. Fixes #753 reported by Nick Altmann ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Opensips 2.1 problems on start when cannot connect to redis (#753)
Closed #753 via 76034ad60dfd991232ac3053c07f7a72de234e43. --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/753#event-513520575___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 5d32b8: redis: add timeout for connect and query
Branch: refs/heads/2.1 Home: https://github.com/OpenSIPS/opensips Commit: 5d32b84dadb5879dd47cae644f9b049fe746bf55 https://github.com/OpenSIPS/opensips/commit/5d32b84dadb5879dd47cae644f9b049fe746bf55 Author: Razvan CraineaDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/cachedb_redis/README M modules/cachedb_redis/cachedb_redis.c M modules/cachedb_redis/cachedb_redis_dbase.c M modules/cachedb_redis/cachedb_redis_dbase.h M modules/cachedb_redis/doc/cachedb_redis_admin.xml Log Message: --- redis: add timeout for connect and query This prevents OpenSIPS from blocking waiting for a connection to be established. Fixes #753 reported by Nick Altmann (cherry picked from commit 76034ad60dfd991232ac3053c07f7a72de234e43) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)
Hey @bogdan-iancu, thanks for chiming in :-) > that may simplify your patch a lot - the nat_helper timer routing is > registered with "TIMER_FLAG_DELAY_ON_DELAY" - this guarantees that (even > executed in various processes) the handler will not be run in parallel (all > its executions will be serial). So you do not need locking at all. Also, the > counter itself can shm allocated and its pointer can be passed to the timer > handler (more elegant versus a global var). This sounds like a better approach to me, can you adjust to it @aerringer? Thanks a lot! --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/pull/751#issuecomment-171261698___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 5f486b: Fix race condition between retransmission and wait...
Branch: refs/heads/2.1 Home: https://github.com/OpenSIPS/opensips Commit: 5f486bb9c13c369e0ff331517e236e08edabe038 https://github.com/OpenSIPS/opensips/commit/5f486bb9c13c369e0ff331517e236e08edabe038 Author: Bogdan-Andrei IancuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/tm/timer.c M modules/tm/timer.h Log Message: --- Fix race condition between retransmission and wait timer in TM. Overlapping of retransmission timer and wait timer may lead to inconsistent timer list -> various crashes around TM timer lists. Related to #749, #732, #723. Many thanks for Trevor Francis ( @46labs ) for helping with the troubleshooting. IMPORTANT NOTE: this is a temporary fix as it simply avoid the collision between the two timer routines - normally the routines themselves should be safe to run in parallel (more digging is required here). (cherry picked from commit ea6e1fa7fed29efed6057894a8cc4054308160b3) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] OpenSIPS 2.1 Crash (#732)
It may be related to #723 , The fix will be shortly uploaded on GIT --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/732#issuecomment-171262503___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] ea6e1f: Fix race condition between retransmission and wait...
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: ea6e1fa7fed29efed6057894a8cc4054308160b3 https://github.com/OpenSIPS/opensips/commit/ea6e1fa7fed29efed6057894a8cc4054308160b3 Author: Bogdan-Andrei IancuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/tm/timer.c M modules/tm/timer.h Log Message: --- Fix race condition between retransmission and wait timer in TM. Overlapping of retransmission timer and wait timer may lead to inconsistent timer list -> various crashes around TM timer lists. Related to #749, #732, #723. Many thanks for Trevor Francis ( @46labs ) for helping with the troubleshooting. IMPORTANT NOTE: this is a temporary fix as it simply avoid the collision between the two timer routines - normally the routines themselves should be safe to run in parallel (more digging is required here). ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] f26774: Allow retransmissions and wait for reply/timeout o...
Branch: refs/heads/2.1 Home: https://github.com/OpenSIPS/opensips Commit: f267746b9170a7c21cd18e42420f0ba2bff6137e https://github.com/OpenSIPS/opensips/commit/f267746b9170a7c21cd18e42420f0ba2bff6137e Author: Bogdan-Andrei IancuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/tm/t_fwd.c Log Message: --- Allow retransmissions and wait for reply/timeout on canceled branches. Do not do anything about branches with no received reply; better continue the retransmission hoping to get something back; if still not, we will generate the 408 Timeout based on FR timer; this helps with better coping with missed/lated provisional replies in the context of cancelling the transaction Many thanks to Maxim Sobolev for bringing this under discussion. More to be read: http://lists.opensips.org/pipermail/devel/2015-November/018623.html http://lists.opensips.org/pipermail/devel/2015-December/018810.html (cherry picked from commit 0dfb46df96d594c9b592d64913a44ab1cccd80e3) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 0dfb46: Allow retransmissions and wait for reply/timeout o...
Branch: refs/heads/1.11 Home: https://github.com/OpenSIPS/opensips Commit: 0dfb46df96d594c9b592d64913a44ab1cccd80e3 https://github.com/OpenSIPS/opensips/commit/0dfb46df96d594c9b592d64913a44ab1cccd80e3 Author: Bogdan-Andrei IancuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/tm/t_fwd.c Log Message: --- Allow retransmissions and wait for reply/timeout on canceled branches. Do not do anything about branches with no received reply; better continue the retransmission hoping to get something back; if still not, we will generate the 408 Timeout based on FR timer; this helps with better coping with missed/lated provisional replies in the context of cancelling the transaction Many thanks to Maxim Sobolev for bringing this under discussion. More to be read: http://lists.opensips.org/pipermail/devel/2015-November/018623.html http://lists.opensips.org/pipermail/devel/2015-December/018810.html ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 7d090c: Allow retransmissions and wait for reply/timeout o...
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: 7d090c33e73901b97f12ed6d826b38c1173e61de https://github.com/OpenSIPS/opensips/commit/7d090c33e73901b97f12ed6d826b38c1173e61de Author: Bogdan-Andrei IancuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/tm/t_fwd.c Log Message: --- Allow retransmissions and wait for reply/timeout on canceled branches. Do not do anything about branches with no received reply; better continue the retransmission hoping to get something back; if still not, we will generate the 408 Timeout based on FR timer; this helps with better coping with missed/lated provisional replies in the context of cancelling the transaction Many thanks to Maxim Sobolev for bringing this under discussion. More to be read: http://lists.opensips.org/pipermail/devel/2015-November/018623.html http://lists.opensips.org/pipermail/devel/2015-December/018810.html (cherry picked from commit 0dfb46df96d594c9b592d64913a44ab1cccd80e3) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)
@saghul , I push a fix based on what we discussed above. This will obsolete the original PR. @aerringer many thanks for spotting the problem and coming up with the solution - I think it was a good discussion and outcome ! --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/pull/751#issuecomment-171272596___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Proposed fix for erratic nat_traversal keepalives (#751)
Closed #751. --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/pull/751#event-513611708___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] crash on tm/timer.c (#723)
The fix is available on GIT repo. @46labs please update if the fix holds for you --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/723#issuecomment-171277652___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] OpenSIPS 2.1 Crash (#732)
The fix is available on GIT - please update and let me know if it solves your problem --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/732#issuecomment-171277854___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] OpenSIPS 2.1 Crash (#732)
Thanks. I will test and update you guys later today. --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/732#issuecomment-171283133___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] aa5d48: Fix pinging partitioning from nat_traversal.
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: aa5d4831accb4da4e4dca06826c48fbfaafb2d4d https://github.com/OpenSIPS/opensips/commit/aa5d4831accb4da4e4dca06826c48fbfaafb2d4d Author: Bogdan-Andrei IancuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/nat_traversal/nat_traversal.c Log Message: --- Fix pinging partitioning from nat_traversal. Do not use the static counter as the timer routine gets executed in various processes now - better use a shm counter. See all the details in #751 Based on the PR #751 Closing / outdating #751 Credits for finding the fix and comming up with a solutoin go to @aerringer. (cherry picked from commit 4395575d7f251e14fdc7b0dd92b7f5b329515b4e) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 439557: Fix pinging partitioning from nat_traversal.
Branch: refs/heads/2.1 Home: https://github.com/OpenSIPS/opensips Commit: 4395575d7f251e14fdc7b0dd92b7f5b329515b4e https://github.com/OpenSIPS/opensips/commit/4395575d7f251e14fdc7b0dd92b7f5b329515b4e Author: Bogdan-Andrei IancuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/nat_traversal/nat_traversal.c Log Message: --- Fix pinging partitioning from nat_traversal. Do not use the static counter as the timer routine gets executed in various processes now - better use a shm counter. See all the details in #751 Based on the PR #751 Closing / outdating #751 Credits for finding the fix and comming up with a solutoin go to @aerringer. ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] opensips crashes (#749)
@achalkov you already have the patch for fixing #723 - can you confirm that it is fixing this crash too ? --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/749#issuecomment-171261627___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] eef55c: opensipsdbctl: Properly create "clusterer" and "tl...
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: eef55c9995ac6cab772623efcc284073b5eee360 https://github.com/OpenSIPS/opensips/commit/eef55c9995ac6cab772623efcc284073b5eee360 Author: Liviu ChircuDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M scripts/opensipsdbctl.base Log Message: --- opensipsdbctl: Properly create "clusterer" and "tls_mgm" tables ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [opensips] abandoned turn causes processes to sleep forever when handling retransmitted publishes (#754)
This exists on latest master 055f4b1 Scenario: 2 PUBLISHES with the same E-Tag enter https://github.com/OpenSIPS/opensips/blob/master/modules/presence/presentity.c#L546 as a result of a retransmission. The first publish finds the presentity, increments last turn to say 5 for the sake of argument, then it enters the while loop, finds the presentity and continues processing updating it with a new e-tag and saving it the db releases locks and finishes. The second publish enters because its turn matches 5, it finds the presentity and increments last turn to 6, it then enters the while loop, but it fails to find the presentity because the E-Tag has been changed by the previous publish. It continues processing, but it never increments turn before exiting. This causes turn to stay at 6, which will cause the process to lockup forever, waiting for its turn, on the next publish received. --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/754___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] abandoned turn causes processes to sleep forever when handling retransmitted publishes (#754)
> It continues processing, but it never calls next_turn_phtable before > exiting. It technically *does* call next_turn_phtable, but on a *new* presentity in the phtable. It does not increment the current_turn on the same presentity that it updated last_turn on. This causes a mismatch on that presentity going forward. > This will cause the process to lockup forever, waiting for its turn, on the > next publish received. Specifically, both of the processes in this scenario will continue on their way. The *next* publish to the original presentity will lock, because current_turn is less than last_turn, and nothing exists to increment it. --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/754#issuecomment-171401097___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 4c775f: [snmpstats]more hints for setting up in the docs
Branch: refs/heads/2.1 Home: https://github.com/OpenSIPS/opensips Commit: 4c775f2b63c4e7def59654cd70f30934d8e08e10 https://github.com/OpenSIPS/opensips/commit/4c775f2b63c4e7def59654cd70f30934d8e08e10 Author: ionutrazvanionitaDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/snmpstats/README M modules/snmpstats/doc/snmpstats_admin.xml M modules/snmpstats/doc/snmpstats_faq.xml Log Message: --- [snmpstats]more hints for setting up in the docs (cherry-picked from 6e7535207d5531e0fc2562d05b874acd30488368) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] 055f4b: [snmpstats]more hints for setting up in the docs
Branch: refs/heads/master Home: https://github.com/OpenSIPS/opensips Commit: 055f4b132a06f4fdc2c19d6cbae9f0c94114cc24 https://github.com/OpenSIPS/opensips/commit/055f4b132a06f4fdc2c19d6cbae9f0c94114cc24 Author: ionutrazvanionitaDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/snmpstats/README M modules/snmpstats/doc/snmpstats_admin.xml M modules/snmpstats/doc/snmpstats_faq.xml Log Message: --- [snmpstats]more hints for setting up in the docs ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [OpenSIPS/opensips] a533e7: [snmpstats]more hints for setting up in the docs
Branch: refs/heads/1.11 Home: https://github.com/OpenSIPS/opensips Commit: a533e7279147d6cc5f8ec2aac6260e8b3a4e0cdf https://github.com/OpenSIPS/opensips/commit/a533e7279147d6cc5f8ec2aac6260e8b3a4e0cdf Author: ionutrazvanionitaDate: 2016-01-13 (Wed, 13 Jan 2016) Changed paths: M modules/snmpstats/README M modules/snmpstats/doc/snmpstats_admin.xml M modules/snmpstats/doc/snmpstats_faq.xml Log Message: --- [snmpstats]more hints for setting up in the docs Conflicts: modules/snmpstats/README modules/snmpstats/doc/snmpstats_admin.xml (cherry-picked from 6e7535207d5531e0fc2562d05b874acd30488368) ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] opensips crashes (#749)
i have updated opensips, now we need a couple of days to look at its behavior --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/749#issuecomment-171322700___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel