Hi Tom -

I hope you are well.

On 2/29/16 13:16, Craig, Tom wrote:

My Linux application sis using bool::asio::read_until() to read data from a socket.  The application also uses commercial, 3rd party hardware.  Occasionally my program crashes due to a SIGSEGV violation. 

 

The core dump stack trace is shown below.  It indicates that the 3rd party signal handler is invoked while my thread is waiting for socket I/O, and that the crash is occurring during signal handler execution.

 

While I recognize that this is an issue with the 3rd party vendor (and I am currently engaged in discussions with them), I’m wondering if my usage of boost is incorrect, or if there is something that I should be doing differently in performing socket I/O?


It is a little hard to know from the dump if the code is correct; however, starting in Boost 1.47 release you can easily setup a signal handler.
<http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/overview/signals.html>

 

I am using boost v1.43.

 



<snip picture>


Michael Caisse
Ciere Consulting