Project

General

Profile

Necessary Maintenance #15676

art - Milestone #15372: art multi-threading phase 1

art - Feature #15380: Introduction of multi-threaded running

art - Feature #15383: Introduce StreamSchedule, etc.

art - Feature #15384: Introduce context system.

Signal sentries need to behave properly when an invoked slot throws an exception in the sentry's destructor

Added by Christopher Green over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/27/2017
Due date:
% Done:

100%

Estimated time:
24.00 h
Spent time:
Scope:
Internal
Experiment:
-
SSI Package:
Duration:

Description

From Issue #15673:

This is especially important for the signal sentries due to the fact that e.g., if a module's main entry point throws, then the signals invoked will be invoked while the stack is being unwound as a consequence.

Possible solutions include:

  • Catching and swallowing any exception.
  • Catching and saving the exception outside the sentry in an object provided by reference, and dealing with it when the original exception is caught.
  • Other magic with e.g. nested_exception.

Related issues

Related to cet-is - Necessary Maintenance #15673: XXXSignalSentry classes need some workClosed2017-02-27

Related to cet-is - Necessary Maintenance #15677: All sentries need to behave properly when an exception is thrown within the sentry's destructorAccepted2017-02-27

Associated revisions

Revision b3caa7c7 (diff)
Added by Kyle Knoepfel over 2 years ago

Resolve issue #15676: Remove signal sentries.

History

#1 Updated by Christopher Green over 2 years ago

#2 Updated by Christopher Green over 2 years ago

  • Related to Necessary Maintenance #15677: All sentries need to behave properly when an exception is thrown within the sentry's destructor added

#3 Updated by Christopher Green over 2 years ago

  • Status changed from New to Accepted

#4 Updated by Kyle Knoepfel over 2 years ago

  • Parent task set to #15384

#5 Updated by Kyle Knoepfel over 2 years ago

  • Related to deleted (Necessary Maintenance #15677: All sentries need to behave properly when an exception is thrown within the sentry's destructor)

#6 Updated by Kyle Knoepfel over 2 years ago

  • Related to Necessary Maintenance #15677: All sentries need to behave properly when an exception is thrown within the sentry's destructor added

#7 Updated by Kyle Knoepfel over 2 years ago

Another option is that the signal sentry classes could be removed. Yes, this would be a change in behavior, but it would be consistent with some recent changes in the signal invocations as committed in (e.g.) art:dcc26cf. The interpretation for the post* signals would be that they would be called whenever a module call did not result in an exception throw.

Note that I am not suggesting we remove all of the sentries in art, thus abandoning the RAII idiom, but it may be appropriate for this particular use case. The question is would the experiments approve of the change in behavior?

#8 Updated by Kyle Knoepfel over 2 years ago

After discussion, this last option of removing the signal sentries altogether seems to make the most sense. However, we will need to investigate what effect this has for art-provided services (e.g. TimeTracker).

#9 Updated by Kyle Knoepfel over 2 years ago

  • Status changed from Accepted to Resolved
  • Assignee set to Kyle Knoepfel
  • Target version set to 1209
  • % Done changed from 0 to 100

A proposal has been made to the users and stakeholders to remove the signal sentries. Commit art:b3caa7c implemented their removal, in anticipation of the users' acceptance of the proposal.

#10 Updated by Kyle Knoepfel over 2 years ago

  • Target version changed from 1209 to 2.07.01

#11 Updated by Kyle Knoepfel over 2 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF