Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
@bogdan-iancu The fix seems to work fine for us. The error is gone now. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-200543937___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
Thanks for the fix, I will try out and update you. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-200498948___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
Try this: https://www.dropbox.com/sh/93j7gdfwk2h5lnq/AACGTMrj6zKaXHjw_YBQBm84a?dl=0 I wasn't able to reproduce the successful case this time. It's failing all the time. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-200461636___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
Here is the log file with additional logging requested: https://www.dropbox.com/sh/93j7gdfwk2h5lnq/AACGTMrj6zKaXHjw_YBQBm84a?dl=0 I was able to reproduce both successful (good_async.txt) and failure (bad_async.txt) cases. Please search for in the logs to identify the async+exec+curl web request: ` Submitting web service get request - http://255.255.255.29:80/ws/index.php/query_client_ready_for_call` Also, I found that in the failure case, the following log statement is missing: ``` Mar 22 19:48:27 osips[14660]: NOTICE:core:io_wait_loop_epoll: EPOLLIN(read) event: epollwait() set event EPOLLHUP - connection closed by the remote peer! Mar 22 19:48:27 osips[14660]: NOTICE:tm:io_watch_del: [UDP_worker] io_watch_del op on index -1 37 (0x848de0, 37, -1, 0x10,0x1) fd_no=3 called ``` Thanks for the bug triage! --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-200010606___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
Yes, I can still reproduce it. **Note: **First query is done independently. The second query i.e., port 49864 (/ws/index.php/...) is causing this problem. If you can provide me a patch with extra logging to the module, I can experiment and get back to you. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-199366523___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
**More information:** I tried the following: ` async(exec("sleep 4", "", "$var(restGetResponse)"), RT_RESUME_AFTER_RESPONSE);` I still the error. Makes me wonder whether async+exec is the problem here. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-197994934___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
Hi @bogdan-iancu, Yes, there was a connection attempt in both the failure and success cases. So more information: a) Curl makes a webrequest. Webservice will block until a timeout say 4s. Hence we used async for scalability. **Success Case:** ``` osips[6987]: RequestRoute[RT_HANDLE_PSTN_REDIRECT]: Submitting web service get osips[6987]: NOTICE:core:io_wait_loop_epoll: EPOLLIN(read) event: epollwait() set event EPOLLHUP - connection closed by the remote peer! osips[6987]: ResumeRoute[RT_RESUME_AFTER_RESPONSE]: Async web service request returned ``` **Failure Case:** ``` osips[6611]: RequestRoute[RT_HANDLE_PSTN_REDIRECT]: Submitting web service get request osips[6611]: NOTICE:core:io_wait_loop_epoll: connection closed by the remote peer! osips[6611]: ERROR:core:io_wait_loop_epoll: [UDP_worker] unexpected event 10 on 1/1, data=0x7f8bce9f3b50 osips[6611]: NOTICE:core:io_wait_loop_epoll: connection closed by the remote peer! osips[6611]: ERROR:core:io_wait_loop_epoll: [UDP_worker] unexpected event 10 on 1/1, data=0x7f8bce9f3b50 ``` In both the cases, I verified using wireshark that the tcp connection was made with the server and server replied back with a response: `{"result":"timeout"}` --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-197551622___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
2nd one is the faulty one i.e., port 49864 (/ws/index.php/...). I will be deleting the content of the dropbox since you downloaded it. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-197565981___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
Here is the dropbox link to the pcap: https://www.dropbox.com/s/jod9zdifa93d5yv/trace_2016-03-16_20_55-UTC.pcap?dl=0 It has webrequests made to port 80. Thank you. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829#issuecomment-197557191___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] [opensips] Problem with using async and exec (#829)
We are using async and exec to make a web-request as shown below: $var(fullQueryClientReadyRequest) = "an url with params"; async(exec("curl --connect-timeout 30 --max-time 30 \"$var(fullQueryClientReadyRequest)\"", "", "$var(restGetResponse)"), RT_RESUME_AFTER_RESPONSE); We see the following (printed several times): > osips[16437]: NOTICE:core:io_wait_loop_epoll: connection closed by the remote > peer! > osips[16437]: ERROR:core:io_wait_loop_epoll: [UDP_worker] unexpected event 10 > on 1/1, data=0x7f215063bb68 After this happens, the process becomes unresponsive. **Note:** We do not use $var(restGetResponse) in the RT_RESUME_AFTER_RESPONSE. However, we have it so that the exec will be blocking. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/issues/829___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel