Re: Issues with boost executor_work_guard

Richard Hodges via Boost-users <[email protected]> Mon, 7 Apr 2025 19:03:23 +0200
Newsgroups gmane.comp.lib.boost.user
Message-ID <CALvx3haoBFKmPrKef=NLaz1eG07=aKxpURZRMQN3DKRC9B6ewQ@mail.gmail.com>
--===============2846032154942081944==
Content-Type: multipart/alternative; boundary="00000000000078001406323337d5"

--00000000000078001406323337d5
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Is one of your completion handlers throwing an exception?

On Mon, 7 Apr 2025 at 18:04, Jo=C3=A3o Fernando Silva via Boost-users <
[email protected]> wrote:

> Hi Vinnie,
>
> Unfortunately we are unable to do so. We have only seen this happen with =
a
> specific application that interacts with our code (which is proprietary)
> and could not replicate it elsewhere.
>
> You can take a look at our code here https://github.com/COVESA/vsomeip.
> The relevant lines in this case are these
>
>
> https://github.com/COVESA/vsomeip/blob/master/implementation/runtime/src/=
application_impl.cpp#L54-L56
>
> https://github.com/COVESA/vsomeip/blob/master/implementation/runtime/src/=
application_impl.cpp#L466-L474
>
> https://github.com/COVESA/vsomeip/blob/master/implementation/runtime/src/=
application_impl.cpp#L504-L514
>
> Thanks
> ------------------------------
> *From:* Vinnie Falco <[email protected]>
> *Sent:* Monday, April 7, 2025 3:51 PM
> *To:* [email protected] <[email protected]>
> *Cc:* Jo=C3=A3o Fernando Silva <
> [email protected]>
> *Subject:* Re: [Boost-users] Issues with boost executor_work_guard
>
> *Notice:* This e-mail has originated from an external email service, so
> do not click on any links, nor open any attachments unless you know who t=
he
> sender is and are sure the content is secure.
>
>
>
> On Mon, Apr 7, 2025 at 7:07=E2=80=AFAM Jo=C3=A3o Fernando Silva via Boost=
-users <
> [email protected]> wrote:
>
> ...despite the work_guard still being valid, we see that the threads exit
> because boost::asio::detail::scheduler::outstanding_work reaches 0.
>
>
> If you could create a small, self-contained program which demonstrates
> this behavior it would be very helpful for diagnosing the problem.
>
> Thanks
>
> The information in this communication may contain confidential or legally
> privileged information. It is intended solely for the use of the individu=
al
> or entity it addresses and others authorized to receive it. If you are no=
t
> an intended recipient, you are hereby notified that any disclosure,
> copying, distribution or action in reliance on the contents of this
> information is strictly prohibited and may be unlawful. If you have
> received this communication by error, please notify us immediately by
> responding to this e-mail and then delete it from your system. Critical
> TechWorks is not liable for the proper and complete transmission of the
> information in this communication nor for any delay in its receipt
>
> *This e-mail is environmentally friendly, just like Critical TechWorks,
> which lives in a paper-free atmosphere. Therefore, please consider the
> environment before printing it! *
> _______________________________________________
> Boost-users mailing list
> [email protected]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>

--00000000000078001406323337d5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Is one of your completion handlers throwing an exception?=
</div><div><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D=
"ltr" class=3D"gmail_attr">On Mon, 7 Apr 2025 at 18:04, Jo=C3=A3o Fernando =
Silva via Boost-users &lt;<a href=3D"mailto:[email protected]">bo=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-lef=
t-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">




<div dir=3D"ltr">
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Vinnie,</div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Unfortunately we are unable=C2=A0to do so. We have only seen this happen wi=
th a specific application that interacts with our code (which is proprietar=
y) and could not replicate it elsewhere.</div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
You can take a look at our code here <a href=3D"https://github.com/COVESA/v=
someip" target=3D"_blank" style=3D"font-family:Aptos,Aptos_EmbeddedFont,Apt=
os_MSFontService,Calibri,Helvetica,sans-serif">
https://github.com/COVESA/vsomeip</a>. The relevant lines in this case are =
these</div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href=3D"https://github.com/COVESA/vsomeip/blob/master/implementation/run=
time/src/application_impl.cpp#L54-L56" id=3D"m_4494024422668839357LPlnk6288=
88" target=3D"_blank" style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_M=
SFontService,Calibri,Helvetica,sans-serif">https://github.com/COVESA/vsomei=
p/blob/master/implementation/runtime/src/application_impl.cpp#L54-L56</a></=
div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href=3D"https://github.com/COVESA/vsomeip/blob/master/implementation/run=
time/src/application_impl.cpp#L466-L474" id=3D"m_4494024422668839357LPlnk" =
target=3D"_blank" style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFon=
tService,Calibri,Helvetica,sans-serif">https://github.com/COVESA/vsomeip/bl=
ob/master/implementation/runtime/src/application_impl.cpp#L466-L474</a></di=
v>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href=3D"https://github.com/COVESA/vsomeip/blob/master/implementation/run=
time/src/application_impl.cpp#L504-L514" id=3D"m_4494024422668839357LPlnk50=
2319" target=3D"_blank" style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos=
_MSFontService,Calibri,Helvetica,sans-serif">https://github.com/COVESA/vsom=
eip/blob/master/implementation/runtime/src/application_impl.cpp#L504-L514</=
a></div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali=
bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks</div>
<div id=3D"m_4494024422668839357appendonsend"></div>
<hr style=3D"display:inline-block;width:98%">
<div id=3D"m_4494024422668839357divRplyFwdMsg" dir=3D"ltr"><font face=3D"Ca=
libri, sans-serif" style=3D"font-size:11pt;font-family:Calibri,sans-serif;c=
olor:rgb(0,0,0)"><b style=3D"font-family:Calibri,sans-serif">From:</b> Vinn=
ie Falco &lt;<a href=3D"mailto:[email protected]" target=3D"_blank" st=
yle=3D"font-family:Calibri,sans-serif">[email protected]</a>&gt;<br>
<b style=3D"font-family:Calibri,sans-serif">Sent:</b> Monday, April 7, 2025=
 3:51 PM<br>
<b style=3D"font-family:Calibri,sans-serif">To:</b> <a href=3D"mailto:boost=
[email protected]" target=3D"_blank" style=3D"font-family:Calibri,sans=
-serif">[email protected]</a> &lt;<a href=3D"mailto:boost-users@l=
ists.boost.org" target=3D"_blank" style=3D"font-family:Calibri,sans-serif">=
[email protected]</a>&gt;<br>
<b style=3D"font-family:Calibri,sans-serif">Cc:</b> Jo=C3=A3o Fernando Silv=
a &lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank" style=3D"font-family:Calibri,sans-serif">joao.fernando.si=
[email protected]</a>&gt;<br>
<b style=3D"font-family:Calibri,sans-serif">Subject:</b> Re: [Boost-users] =
Issues with boost executor_work_guard</font>
<div>=C2=A0</div>
</div>
<div>
<div style=3D"border:1px solid rgb(0,0,120);background:repeat rgb(255,181,9=
2);padding:0.3em">
<div style=3D"font-size:10pt;font-family:sans-serif;font-style:normal;color=
:black">
<b style=3D"font-family:sans-serif">Notice:</b> This e-mail has originated =
from an external email service, so do not click on any links, nor open any =
attachments unless you know who the sender is and are sure the content is s=
ecure.</div>
</div>
<p></p>
=C2=A0
<p></p>
<div>
<div dir=3D"ltr">
<div dir=3D"ltr">
<div style=3D"font-family:arial,sans-serif"><span style=3D"font-family:Aria=
l,Helvetica,sans-serif">On Mon, Apr 7, 2025 at 7:07=E2=80=AFAM Jo=C3=A3o Fe=
rnando Silva via Boost-users &lt;<a href=3D"mailto:[email protected].=
org" target=3D"_blank" style=3D"font-family:Arial,Helvetica,sans-serif">boo=
[email protected]</a>&gt;
 wrote:</span></div>
</div>
<div>
<blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-=
left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
<div>
<div dir=3D"ltr">
<div dir=3D"ltr" id=3D"m_4494024422668839357x_m_-2992333426574709036divRply=
FwdMsg"></div>
<div style=3D"direction:ltr;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFo=
ntService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style=3D"font-size:12pt;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MS=
FontService,Calibri,Helvetica,sans-serif"><span style=3D"font-family:arial,=
sans-serif">...</span>despite the work_guard still being valid, we see that=
 the threads exit because boost::asio::detail::</span><span style=3D"font-s=
ize:12pt;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,H=
elvetica,sans-serif">scheduler::outstanding_work
 reaches 0.<br>
</span></div>
</div>
</div>
</blockquote>
<div style=3D"font-family:arial,sans-serif"><br>
If you could create a small, self-contained program which demonstrates this=
 behavior it would be very helpful for diagnosing the problem.<br>
<br>
Thanks<br>
<br>
</div>
</div>
</div>
</div>
</div>
<div style=3D"font-size:10pt;text-align:justify;line-height:10pt;font-famil=
y:Calibri">
The information in this communication may contain confidential or legally p=
rivileged information. It is intended solely for the use of the individual =
or entity it addresses and others authorized to receive it. If you are not =
an intended recipient, you are hereby
 notified that any disclosure, copying, distribution or action in reliance =
on the contents of this information is strictly prohibited and may be unlaw=
ful. If you have received this communication by error, please notify us imm=
ediately by responding to this e-mail
 and then delete it from your system. Critical TechWorks is not liable for =
the proper and complete transmission of the information in this communicati=
on nor for any delay in its receipt
<br>
<p style=3D"font-family:Calibri"></p>
<p style=3D"font-family:Calibri"></p>
<p style=3D"font-family:Calibri"><span style=3D"font-size:10pt;text-align:j=
ustify;line-height:10pt;font-family:Calibri"><i style=3D"font-family:Calibr=
i">This e-mail is environmentally friendly, just like Critical TechWorks, w=
hich lives in a paper-free atmosphere. Therefore, please consider the envir=
onment before
 printing it!<i style=3D"font-family:Calibri"> </i></i></span></p>
</div>

</div>

_______________________________________________<br>
Boost-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Boost-user=
[email protected]</a><br>
<a href=3D"https://lists.boost.org/mailman/listinfo.cgi/boost-users" rel=3D=
"noreferrer" target=3D"_blank">https://lists.boost.org/mailman/listinfo.cgi=
/boost-users</a><br>
</blockquote></div></div>

--00000000000078001406323337d5--

--===============2846032154942081944==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

--===============2846032154942081944==--