We tried to investigate more about the problem today.

>From what we understood from the ssl.exe test code:
The test throws an exception on the on_transport_error() because the
certificate is wrong. This triggers the destruction of the objects on the
Apparently, there is a memory corruption in iocpdesc_t structure:
We are calling (selector)->triggered_list_tail->triggered_list_next while
(selector)->triggered_list_tail is null [in triggered_list_add() in
selector.c line 300].
Therefore we have the crash.

Can you help us find more info about the bug? The crash is very low level
and we have not very much experience in the proton-c layer...

Thank you,

-----Original Message-----
From: Adel Boutros [mailto:adelbout...@live.com]
Sent: lundi 17 octobre 2016 19:30
To: users@qpid.apache.org
Subject: [Proton-c 0.14.0][Visual Studio 2013] Failing ssl unit test only
in Debug mode


We are compiling Proton-c 0.14.0 and its C++ bindings in 2 modes:
RelWithDebInfo and Debug.

For the RelWithDebInfo mode, all tests are green.

For the Debug mode, we have a ssl test failing.

We are using OpenSSL 1.0.2h. Swing and Cyrus are disabled (not found).

Can you please help us find the issue?

Test output


18: ======================================================================
18: ERROR: test_ssl_bad_name (__main__.ContainerExampleTest)
18: ----------------------------------------------------------------------
18: Traceback (most recent call last):
18:   File "PATH_TO_PROTON_SOURCE_CODE/examples/cpp/example_test.py", line
375, in test_ssl_bad_name
18:     out = self.proc(["ssl", "-a", addr, "-c", self.ssl_certs_dir(),
"-v", "fail"], skip_valgrind=True).wait_exit()
18:   File "PATH_TO_PROTON_SOURCE_CODE/examples/cpp/example_test.py", line
180, in wait_exit
18:     self.check_()
18:   File "PATH_TO_PROTON_SOURCE_CODE/examples/cpp/example_test.py", line
164, in check_
18:     raise self.error
18: ProcError: ['ssl.exe', '-a', 'amqps://', '-c',
'PATH_TO_PROTON_SOURCE_CODE\\examples/cpp/ssl_certs', '-v', 'fail'] non-0
exit, code=255
18: vvvvvvvvvvvvvvvv
18: certificate verification failed for host wrong_name_for_server
18:  : The target principal name is incorrect.
18: ^^^^^^^^^^^^^^^^



build_dir\Debug\examples\cpp\Debug\ssl.exe -c
PATH_TO_PROTON_SOURCE_CODE\\examples/cpp/ssl_certs -v fail



certificate verification failed for host wrong_name_for_server
 : The target principal name is incorrect.

Exception in Visual Studio 2013


Unhandled exception at 0x000007FB345782B2 (qpid-protond.dll) in ssl.exe:
0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF



> qpid-protond.dll!triggered_list_add(pn_selector_t * selector, iocpdesc_t
* iocpd) Line 300 C++
  qpid-protond.dll!pni_events_update(iocpdesc_t * iocpd, int events) Line
324 C++
  qpid-protond.dll!complete_read(read_result_t * result, unsigned long
xfer_count, HRESULT status) Line 666 C++
  qpid-protond.dll!complete(iocp_result_t * result, bool success, unsigned
long num_transferred) Line 868 C++
  qpid-protond.dll!pni_iocp_drain_completions(iocp_t * iocp) Line 888 C++
  qpid-protond.dll!iocp_map_close_all(iocp_t * iocp) Line 1044 C++
  qpid-protond.dll!pni_iocp_finalize(void * obj) Line 1151 C++
  qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * object)
Line 98 C++
  qpid-protond.dll!pn_class_free(const pn_class_t * clazz, void * object)
Line 120 C++
  qpid-protond.dll!pn_free(void * object) Line 264 C++
  qpid-protond.dll!pn_io_finalize(void * obj) Line 95 C++
  qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * object)
Line 98 C++
  qpid-protond.dll!pn_decref(void * object) Line 254 C++
  qpid-protond.dll!pn_reactor_finalize(pn_reactor_t * reactor) Line 100 C++
  qpid-protond.dll!pn_reactor_finalize_cast(void * object) Line 106 C++
  qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * object)
Line 98 C++
  qpid-protond.dll!pn_decref(void * object) Line 254 C++
  qpid-proton-cppd.dll!proton::internal::pn_ptr_base::decref(void * p) Line
32 C++

Line 55 C++
  [External Code]
  qpid-proton-cppd.dll!proton::container_impl::~container_impl() Line 160
  [External Code]
  ssl.exe!hello_world_direct::on_transport_error(proton::transport & t)
Line 134 C++

& pe) Line 303 C++

& handler) Line 74 C++
  qpid-proton-cppd.dll!proton::handler_context::dispatch(pn_handler_t *
c_handler, pn_event_t * c_event, pn_event_type_t __formal) Line 74 C++
  qpid-protond.dll!pn_handler_dispatch(pn_handler_t * handler, pn_event_t *
event, pn_event_type_t type) Line 104 C++
  qpid-protond.dll!pn_reactor_process(pn_reactor_t * reactor) Line 405 C++
  qpid-protond.dll!pn_reactor_run(pn_reactor_t * reactor) Line 481 C++
  qpid-proton-cppd.dll!proton::reactor::run() Line 38 C++
  qpid-proton-cppd.dll!proton::container_impl::run() Line 352 C++
  ssl.exe!proton::container_ref<std::auto_ptr<proton::container> >::run()
Line 284 C++
  ssl.exe!main(int argc, char * * argv) Line 173 C++
  [External Code]



Reply via email to