Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio::read_until Segmentation Fault & Third Party Signal Handler
From: Michael Caisse (mcaisse-lists_at_[hidden])
Date: 2016-03-01 16:12:04


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, 3^rd party
> hardware. Occasionally my program crashes due to a SIGSEGV violation.
>
> The core dump stack trace is shown below. It indicates that the 3^rd
> 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 3^rd 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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net