Re: [nox-dev] Debugging call for help: Assertion '_M_ptr != 0'

2011-09-23 Thread Murphy McCauley
For clarification of my earlier post: The race condition concerns tx_buf in lib/openflow.cc. If Openflow_connection::send_packet() is called by one thread at a time, tx_buf is always checked (via tx_buf.get()) to see if it's empty before it's sent, after which it's cleared (tx_buf.reset()).

Re: [nox-dev] Debugging call for help: Assertion '_M_ptr != 0'

2011-09-22 Thread Murphy McCauley
I think this is a race condition because you're calling send_openflow_packet() from a non-cooperative thread. I think your best bet is probably to rewrite your server thread as a cooperative thread. There are other options... you could have queue which is consumed by a simple cooperative