[ 
https://issues.apache.org/jira/browse/PROTON-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Ross updated PROTON-1631:
--------------------------------
    Fix Version/s:     (was: proton-c-0.19.0)
                   proton-c-0.21.0

> [cpp] Stopping container in on_container_start after opening a socket will 
> hang with libuv io
> ---------------------------------------------------------------------------------------------
>
>                 Key: PROTON-1631
>                 URL: https://issues.apache.org/jira/browse/PROTON-1631
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: cpp-binding
>    Affects Versions: proton-c-0.18.0
>         Environment: Linux, libuv-1.14.1, git tip at commit 
> 72b7ea0508e94aae3e5d9470293bc5c7e8250a45 (upstream/master) PROTON-1592 : 
> [python] restore original tx_recv.py example
>            Reporter: Jiri Daněk
>            Assignee: Cliff Jansen
>             Fix For: proton-c-0.21.0
>
>
> Make yourself a libuv build with
> {noformat}
> cmake .. -DBUILD_GO=OFF -DCMAKE_BUILD_TYPE=Release -GNinja -DPROACTOR=libuv
> {noformat}
> Run the following test
> {noformat}
> struct less_immediate_stop_tester : public proton::messaging_handler {
>     listen_port port;
>     proton::listener listener;
>     bool done;
>     int scheduled_work;
>     less_immediate_stop_tester() : done(false), scheduled_work(0) {}
>     void connect(proton::container* c) {
>     }
>     void on_container_start(proton::container& c) PN_CPP_OVERRIDE {
>         listener = c.listen(port.url());
>         c.connect(port.url("localhost"));
>         c.stop();
>     }
> };
> // FIXME: this test has some Invalid reads in Valgrind  // with 
> t.listener.stop() line commented out it doesn't
> int test_container_less_immediate_stop() {
>     less_immediate_stop_tester t;
>     proton::container c(t);
>     c.run();
> //    t.listener.stop(); // saw this done in another test...
>     return 0;
> }
> {noformat}
> It will hang with the following output
> {nofornat}
> ninja && PN_TRACE_FRM=1 proton-c/bindings/cpp/container_test && echo pass
> [...]
> TEST: test_container_less_immediate_stop() 
> [0x17cc4c0]:  -> AMQP 
> [0x17cc4c0]:0 -> @open(16) 
> [container-id="e038fe4b-9996-4874-be7d-50274e1e193e", hostname="localhost", 
> channel-max=32767] 
> [0x17c9110]:  <- AMQP 
> [0x17c9110]:0 <- @open(16) 
> [container-id="e038fe4b-9996-4874-be7d-50274e1e193e", hostname="localhost", 
> channel-max=32767] 
> [0x17c9110]:  -> AMQP 
> [0x17c9110]:0 -> @open(16) 
> [container-id="e038fe4b-9996-4874-be7d-50274e1e193e", channel-max=32767] 
> [0x17cc4c0]:  <- AMQP 
> [0x17cc4c0]:0 <- @open(16) 
> [container-id="e038fe4b-9996-4874-be7d-50274e1e193e", channel-max=32767] 
> {nofornat}
> Now, this exact code does _not_ hang with epoll io.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to