[jira] [Commented] (PROTON-800) [Windows C] Reactor test times out

2015-01-21 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14285396#comment-14285396
 ] 

ASF subversion and git services commented on PROTON-800:


Commit 6df8ad3511e81b3b674e857632af35dd2e3e5883 in qpid-proton's branch 
refs/heads/master from Clifford Jansen
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=6df8ad3 ]

PROTON-800: proton-c reactor fixes for Windows, destructor ordering and 
selectables handling


> [Windows C] Reactor test times out
> --
>
> Key: PROTON-800
> URL: https://issues.apache.org/jira/browse/PROTON-800
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.8
> Environment: Windows Server 2012 R2, Visual Studio 2010 x64
>Reporter: Chuck Rolke
>
> ctest -VV times out on the reactor test.
> Instrumenting and debugging shows the failure in test_reactor_acceptor
> Running Debug instead of RelWithDebInfo crashes with an AccVio
> {noformat}
> > qpid-protond.dll!pni_iocpdesc_map_get(iocp_t * iocp, unsigned __int64 
> > s)  Line 773 + 0xa bytes  C++
>   qpid-protond.dll!pn_close(pn_io_t * io, unsigned __int64 socket)  Line 
> 350 + 0x16 bytes C++
>   qpid-protond.dll!pni_acceptor_finalize(pn_selectable_t * sel)  Line 56  
> C++
>   qpid-protond.dll!pn_selectable_finalize(void * obj)  Line 81C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_list_finalize(void * object)  Line 205  C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_finalize(pn_reactor_t * reactor)  Line 77   
> C++
>   qpid-protond.dll!pn_reactor_finalize_cast(void * object)  Line 113 + 
> 0x28 bytes C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_free(pn_reactor_t * reactor)  Line 132  
> C++
>   c-reactor-tests.exe!test_reactor_acceptor()  Line 171   C++
>   c-reactor-tests.exe!main(int argc, char * * argv)  Line 446 C++
>   c-reactor-tests.exe!__tmainCRTStartup()  Line 555 + 0x19 bytes  C
>   c-reactor-tests.exe!mainCRTStartup()  Line 371  C
>   kernel32.dll!7ff90cc913d2() 
>   [Frames below may be incorrect and/or missing, no symbols loaded for 
> kernel32.dll]  
>   ntdll.dll!7ff90e1003c4()
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-800) [Windows C] Reactor test times out

2015-01-19 Thread Cliff Jansen (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14283275#comment-14283275
 ] 

Cliff Jansen commented on PROTON-800:
-

The new reactor code uses selectors/selectables differently, namely:

Assign a socket-less selectable into the selector and set the selectable's 
socket at some future date.  This means that completion port enlistment can 
happen at any time, which the current selector code is not ready for.

I have a tentative fix but first have to get the Windows code compiling again 
against Friday's (separate) API changes.  All coming soon...

> [Windows C] Reactor test times out
> --
>
> Key: PROTON-800
> URL: https://issues.apache.org/jira/browse/PROTON-800
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.8
> Environment: Windows Server 2012 R2, Visual Studio 2010 x64
>Reporter: Chuck Rolke
>
> ctest -VV times out on the reactor test.
> Instrumenting and debugging shows the failure in test_reactor_acceptor
> Running Debug instead of RelWithDebInfo crashes with an AccVio
> {noformat}
> > qpid-protond.dll!pni_iocpdesc_map_get(iocp_t * iocp, unsigned __int64 
> > s)  Line 773 + 0xa bytes  C++
>   qpid-protond.dll!pn_close(pn_io_t * io, unsigned __int64 socket)  Line 
> 350 + 0x16 bytes C++
>   qpid-protond.dll!pni_acceptor_finalize(pn_selectable_t * sel)  Line 56  
> C++
>   qpid-protond.dll!pn_selectable_finalize(void * obj)  Line 81C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_list_finalize(void * object)  Line 205  C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_finalize(pn_reactor_t * reactor)  Line 77   
> C++
>   qpid-protond.dll!pn_reactor_finalize_cast(void * object)  Line 113 + 
> 0x28 bytes C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_free(pn_reactor_t * reactor)  Line 132  
> C++
>   c-reactor-tests.exe!test_reactor_acceptor()  Line 171   C++
>   c-reactor-tests.exe!main(int argc, char * * argv)  Line 446 C++
>   c-reactor-tests.exe!__tmainCRTStartup()  Line 555 + 0x19 bytes  C
>   c-reactor-tests.exe!mainCRTStartup()  Line 371  C
>   kernel32.dll!7ff90cc913d2() 
>   [Frames below may be incorrect and/or missing, no symbols loaded for 
> kernel32.dll]  
>   ntdll.dll!7ff90e1003c4()
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-800) [Windows C] Reactor test times out

2015-01-15 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278562#comment-14278562
 ] 

Rafael H. Schloming commented on PROTON-800:


I believe there are two relevant cases to consider when answering your 
question. If you assume you have a "parent" object (the pn_io_t) and a "child" 
object (the pn_socket_t) we actually follow two different patterns depending on 
the circumstances. In the case where the child object is a full fledged object, 
e.g. the parent is a pn_connection_t and the child is a pn_session_t, we have 
the parent keep a pointer to the child and keep it alive, so that the order of 
decref of the parent relative to the child doesn't matter.

The second case to consider is when the child is not actually an independent 
object, e.g. it might be a pn_handle_t rather than an actual pointer. (We use 
this pattern in the map API for example.) In these cases the life of the child 
is scoped to the parent and the order of decref is important.

In your case I think we have to assume the latter unless we turn pn_socket_t 
into a full-on pointer rather than just an alias for a file descriptor. I think 
this is fine so long as we are clear about the semantics.

> [Windows C] Reactor test times out
> --
>
> Key: PROTON-800
> URL: https://issues.apache.org/jira/browse/PROTON-800
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.8
> Environment: Windows Server 2012 R2, Visual Studio 2010 x64
>Reporter: Chuck Rolke
>
> ctest -VV times out on the reactor test.
> Instrumenting and debugging shows the failure in test_reactor_acceptor
> Running Debug instead of RelWithDebInfo crashes with an AccVio
> {noformat}
> > qpid-protond.dll!pni_iocpdesc_map_get(iocp_t * iocp, unsigned __int64 
> > s)  Line 773 + 0xa bytes  C++
>   qpid-protond.dll!pn_close(pn_io_t * io, unsigned __int64 socket)  Line 
> 350 + 0x16 bytes C++
>   qpid-protond.dll!pni_acceptor_finalize(pn_selectable_t * sel)  Line 56  
> C++
>   qpid-protond.dll!pn_selectable_finalize(void * obj)  Line 81C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_list_finalize(void * object)  Line 205  C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_finalize(pn_reactor_t * reactor)  Line 77   
> C++
>   qpid-protond.dll!pn_reactor_finalize_cast(void * object)  Line 113 + 
> 0x28 bytes C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_free(pn_reactor_t * reactor)  Line 132  
> C++
>   c-reactor-tests.exe!test_reactor_acceptor()  Line 171   C++
>   c-reactor-tests.exe!main(int argc, char * * argv)  Line 446 C++
>   c-reactor-tests.exe!__tmainCRTStartup()  Line 555 + 0x19 bytes  C
>   c-reactor-tests.exe!mainCRTStartup()  Line 371  C
>   kernel32.dll!7ff90cc913d2() 
>   [Frames below may be incorrect and/or missing, no symbols loaded for 
> kernel32.dll]  
>   ntdll.dll!7ff90e1003c4()
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-800) [Windows C] Reactor test times out

2015-01-14 Thread Cliff Jansen (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278397#comment-14278397
 ] 

Cliff Jansen commented on PROTON-800:
-

The memory fault in the stack trace occurs from pn_io_t use (pn_close) after 
the io
has been released.

It can be made to go away simply by moving the first two lines:

  pn_decref(reactor->selector);
  pn_decref(reactor->io);
  pn_decref(reactor->collector);
  pn_decref(reactor->handler);
  pn_decref(reactor->children);

to the end of pn_reactor_finalize(...) so that the pn_io_t is the last to be
(possibly) freed.  This matches the use in messenger where created objects are
released in reverse order.

So question #1 is does the overall API imply that pn_io_t objects, which are 
created
first because so much else depends on them, should be freed/decref_ed last?  The
answer to this has deep implications on the Windows io code which has to do many
Linuxy kernel things in user space on cleanup.  The Windows IO code assumes the
answer is yes.  If that is wrong, it needs to do extra ref counting to know 
when the
IO really is being shut down.

On a completely separate note, fixing the above issue does not fix this JIRA, 
it just
moves the problem a small distance.  It still hangs waiting for some IO event 
in a
pn_selector_select call.  Sadly it is not related to
363ea5031d26bc19cd12e113e8b365d398120dea, but I will fix that anyway separate 
from
this JIRA.  Thanks very much for the heads up in any case.

Investigation continues...


> [Windows C] Reactor test times out
> --
>
> Key: PROTON-800
> URL: https://issues.apache.org/jira/browse/PROTON-800
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.8
> Environment: Windows Server 2012 R2, Visual Studio 2010 x64
>Reporter: Chuck Rolke
>
> ctest -VV times out on the reactor test.
> Instrumenting and debugging shows the failure in test_reactor_acceptor
> Running Debug instead of RelWithDebInfo crashes with an AccVio
> {noformat}
> > qpid-protond.dll!pni_iocpdesc_map_get(iocp_t * iocp, unsigned __int64 
> > s)  Line 773 + 0xa bytes  C++
>   qpid-protond.dll!pn_close(pn_io_t * io, unsigned __int64 socket)  Line 
> 350 + 0x16 bytes C++
>   qpid-protond.dll!pni_acceptor_finalize(pn_selectable_t * sel)  Line 56  
> C++
>   qpid-protond.dll!pn_selectable_finalize(void * obj)  Line 81C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_list_finalize(void * object)  Line 205  C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_finalize(pn_reactor_t * reactor)  Line 77   
> C++
>   qpid-protond.dll!pn_reactor_finalize_cast(void * object)  Line 113 + 
> 0x28 bytes C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_free(pn_reactor_t * reactor)  Line 132  
> C++
>   c-reactor-tests.exe!test_reactor_acceptor()  Line 171   C++
>   c-reactor-tests.exe!main(int argc, char * * argv)  Line 446 C++
>   c-reactor-tests.exe!__tmainCRTStartup()  Line 555 + 0x19 bytes  C
>   c-reactor-tests.exe!mainCRTStartup()  Line 371  C
>   kernel32.dll!7ff90cc913d2() 
>   [Frames below may be incorrect and/or missing, no symbols loaded for 
> kernel32.dll]  
>   ntdll.dll!7ff90e1003c4()
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-800) [Windows C] Reactor test times out

2015-01-14 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14277569#comment-14277569
 ] 

Rafael H. Schloming commented on PROTON-800:


I wold take a look at commit 363ea5031d26bc19cd12e113e8b365d398120dea. I 
suspect the same bug exists in the windows selector. The two selectors really 
have a lot of duplicate code between them. Something should be done to allow 
them to share more code.

> [Windows C] Reactor test times out
> --
>
> Key: PROTON-800
> URL: https://issues.apache.org/jira/browse/PROTON-800
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.8
> Environment: Windows Server 2012 R2, Visual Studio 2010 x64
>Reporter: Chuck Rolke
>
> ctest -VV times out on the reactor test.
> Instrumenting and debugging shows the failure in test_reactor_acceptor
> Running Debug instead of RelWithDebInfo crashes with an AccVio
> {noformat}
> > qpid-protond.dll!pni_iocpdesc_map_get(iocp_t * iocp, unsigned __int64 
> > s)  Line 773 + 0xa bytes  C++
>   qpid-protond.dll!pn_close(pn_io_t * io, unsigned __int64 socket)  Line 
> 350 + 0x16 bytes C++
>   qpid-protond.dll!pni_acceptor_finalize(pn_selectable_t * sel)  Line 56  
> C++
>   qpid-protond.dll!pn_selectable_finalize(void * obj)  Line 81C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_list_finalize(void * object)  Line 205  C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_finalize(pn_reactor_t * reactor)  Line 77   
> C++
>   qpid-protond.dll!pn_reactor_finalize_cast(void * object)  Line 113 + 
> 0x28 bytes C++
>   qpid-protond.dll!pn_class_decref(const pn_class_t * clazz, void * 
> object)  Line 100 C++
>   qpid-protond.dll!pn_decref(void * object)  Line 253 C++
>   qpid-protond.dll!pn_reactor_free(pn_reactor_t * reactor)  Line 132  
> C++
>   c-reactor-tests.exe!test_reactor_acceptor()  Line 171   C++
>   c-reactor-tests.exe!main(int argc, char * * argv)  Line 446 C++
>   c-reactor-tests.exe!__tmainCRTStartup()  Line 555 + 0x19 bytes  C
>   c-reactor-tests.exe!mainCRTStartup()  Line 371  C
>   kernel32.dll!7ff90cc913d2() 
>   [Frames below may be incorrect and/or missing, no symbols loaded for 
> kernel32.dll]  
>   ntdll.dll!7ff90e1003c4()
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)