Michael,

 

Thanks.  All is well (except for the segmentation violation we are experiencing).  I hope all is well with you.

 

I don’t want to set up a signal handler.  I am using 3rd party libraries, and they are setting up their own signal handler (likely not using boost – we don’t control this).  The segmentation violation occurs when their signal handler is activated.  It would seem that their libraries are either not creating the signal handler properly, or are doing so in a way that is not compatible with boost.

 

Any suggestions that you (or others) have about how to address this problem are appreciated.  We are, of course, pursuing this with the vendor that wrote the signal handler.

 

cid:image001.png@01D17303.98B2DD10

 

E. Thomas Craig

Principal Software Engineer

SWIFT Division

KLA-Tencor Corporation

408-875-7909 (work)

650-799-4787 (cell)

 

From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Michael Caisse
Sent: Tuesday, March 01, 2016 1:12 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] boost::asio::read_until Segmentation Fault & Third Party Signal Handler

 

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