Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1552

Epoll proactor example crash when given invalid hostname

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • proton-c
    • None

    Description

      [qpid-proton/build/examples/c/proactor]$ ./send upto.nogood.corp
      PN_TRANSPORT_CLOSED: proton:io: Name or service not known - connect to  upto.nogood.corp:5672                                                                                                                               
      epoll proactor failure in /home/jdanek/Work/repos/qpid-proton/proton-c/src/proactor/epoll.c:630: "arming polled file descriptor": No such file or directory                                                                 
      Aborted
      

      when compiled with libuv proactor, it does not crash

      $ cmake -DPROACTOR=libuv -DBUILD_GO=OFF ..
      
      [/qpid-proton/build_libuv]$ examples/c/proactor/send upto.nogood
      PN_TRANSPORT_CLOSED: proton:io: unknown node or service - on connect resolving upto.nogood:5672
      
      [jdanek@nixos:~/Work/repos/qpid-proton/build/examples/c/proactor]$ gdb --args ./send upto.nogood.corp
      GNU gdb (GDB) 8.0
      Copyright (C) 2017 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      
      [...]
      
      (gdb) run
      Starting program: /home/jdanek/Work/repos/qpid-proton/build/examples/c/proactor/send upto.nogood.corp
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/nix/store/l48biijfr1j6d5kdg911051x2phfjrz7-glibc-2.25/lib/libthread_db.so.1".
      PN_TRANSPORT_CLOSED: proton:io: Name or service not known - connect to  upto.nogood.corp:5672
      epoll proactor failure in /home/jdanek/Work/repos/qpid-proton/proton-c/src/proactor/epoll.c:630: "arming polled file descriptor": No such file or directory
      
      Program received signal SIGABRT, Aborted.
      0x00007ffff740e384 in raise () from /nix/store/l48biijfr1j6d5kdg911051x2phfjrz7-glibc-2.25/lib/libc.so.6
      (gdb) bt
      #0  0x00007ffff740e384 in raise () from /nix/store/l48biijfr1j6d5kdg911051x2phfjrz7-glibc-2.25/lib/libc.so.6
      #1  0x00007ffff740f7ea in abort () from /nix/store/l48biijfr1j6d5kdg911051x2phfjrz7-glibc-2.25/lib/libc.so.6
      #2  0x00007ffff7bd45de in rearm (p=<optimized out>, ee=<optimized out>) at /home/jdanek/Work/repos/qpid-proton/proton-c/src/proactor/epoll.c:630
      #3  0x00007ffff7bd5884 in pconnection_process (pc=0x6053c0, events=<optimized out>, timeout=<optimized out>, topup=<optimized out>) at /home/jdanek/Work/repos/qpid-proton/proton-c/src/proactor/epoll.c:1047
      #4  0x00007ffff7bd52c4 in pconnection_batch_next (batch=<optimized out>) at /home/jdanek/Work/repos/qpid-proton/proton-c/src/proactor/epoll.c:811
      #5  0x0000000000401b98 in run (app=0x7fffffffd100) at /home/jdanek/Work/repos/qpid-proton/examples/c/proactor/send.c:169
      #6  0x0000000000401ff3 in main (argc=<optimized out>, argv=<optimized out>) at /home/jdanek/Work/repos/qpid-proton/examples/c/proactor/send.c:192
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: