Pushing a persona in progress
The following program pushes a new persona within the dynamic scope of a progress call:
#include <upcxx/upcxx.hpp>
int main() {
upcxx::init();
upcxx::rpc(0,[](){
upcxx::persona p;
upcxx::persona_scope s(p);
}).wait();
upcxx::finalize();
return 0;
}
At runtime in ef95a45 this results in a runtime crash:
UPC++ assertion failure on rank 0 [/home/pcp1/bonachea/UPC/inst-upcxx/upcxx.debug.gasnetex_par.smp/include/upcxx/persona.hpp:189]: Cannot change active persona stack while in progress.
This is not currently prohibited by the specification. I don't see a particular semantic problem with this (and even some hypothetical cases where it may be useful).
We need to either fix the implementation to support this, or change the spec to prohibit it.
Comments (9)
-
Account Deleted -
reporter - changed milestone to 2018.03.31 release
-
reporter - changed milestone to 2017.12.31 release
-
Stack pushing instead of singleton?
-
reporter - changed milestone to 2018.03.31 release
This issue was discussed in the 1/10/18 meeting, and John agreed to investigate for the March release.
The tentative plan put forth is for the persona stack to remain unchanged when entering progress (so the callback runs with all the "credentials" of the call to progress), but have the runtime push an entry corresponding to the callback being run before invoking it (and pop it after return). This ensures the "active" persona for that callback is always at the top of the stack, and as a side effect ensures that callbacks attempting to modify the pre-progress stack (eg doing anything other than balanced push and pop operations) get UB.
-
-
assigned issue to
-
assigned issue to
-
reporter - changed milestone to 2018.09.30 release
Mass roll-over of unresolved issues to the next milestone.
-
reporter This issue was triaged at the 2018-06-13 Pagoda meeting.
John noted he thinks the issue may be fixed and wants to re-evaluate.
-
- changed status to resolved
This was implemented. Dan's snippet test passes.
- Log in to comment
We should probably consider the implementation deficient and support this.