Fatal error on rput(remote_cx::as_rpc())

Issue #128 resolved
Dan Bonachea created an issue

Test code, based on a bug reported via email by @hadia620

Issuing an rput with only remote_cx::as_rpc completion compiles, but then aborts at runtime.

#include <upcxx/upcxx.hpp>
#include <iostream>
#include "../util.hpp"

using namespace std;
using namespace upcxx;

int main() {
    upcxx::init();
    print_test_header();

    global_ptr<int> gptr = new_<int>(0);
    auto f = rput(10, gptr);
    f.wait();

    static int done = 0;
    rput(10, gptr, remote_cx::as_rpc([]() { done = 1; }));
    while (!done) progress();

    static int done2 = 0;
    int x = 42;
    int cnt = 1;
    rput(&x, gptr, cnt, remote_cx::as_rpc([](int z) { done2 = 1; },77));
    while (!done2) progress();

    print_test_success(true);
    upcxx::finalize();
    return 0;
}

On Linux/x86_64(dirac) with smp/debug/assertions, using the nightly automatic install from last night (which should correspond to a6b16d2):

$ /usr/local/pkg/openmpi-2.1.1/gcc-7.2.0/bin/mpicxx rput-remotecx.cpp -DUPCXX_ASSERT_ENABLED=1 -DUPCXX_BACKEND=1 -DUPCXX_BACKEND_GASNET_SEQ=1 -DUPCXX_LPC_INBOX_lockfree=1 -D_GNU_SOURCE=1 -DGASNET_SEQ -I/usr/local/pkg/upcxx-dirac/gcc-7.2.0/nightly-2018.03.13/gasnet.debug/include -I/usr/local/pkg/upcxx-dirac/gcc-7.2.0/nightly-2018.03.13/gasnet.debug/include/smp-conduit -I/usr/local/pkg/upcxx-dirac/gcc-7.2.0/nightly-2018.03.13/upcxx.debug.gasnet_seq.smp/include -g3 -Wno-unused -Wunused-result -Wno-unused-parameter -Wno-address -std=c++11 -L/usr/local/pkg/upcxx-dirac/gcc-7.2.0/nightly-2018.03.13/upcxx.debug.gasnet_seq.smp/lib -lupcxx -L/usr/local/pkg/upcxx-dirac/gcc-7.2.0/nightly-2018.03.13/gasnet.debug/lib -lgasnet-smp-seq -lrt -L/usr/local/pkg/gcc/7.2.0/lib/gcc/x86_64-pc-linux-gnu/7.2.0 -lgcc -lm -o rput-remotecx -I../../test/regression

$ upcxx-run -np 1 ./rput-remotecx 
Test: ecx.cpp
Ranks: 1
*** FATAL ERROR: 
//////////////////////////////////////////////////
UPC++ assertion failure:
 rank=0
 file=/usr/local/pkg/upcxx-dirac/gcc-7.2.0/nightly-2018.03.13/upcxx.debug.gasnet_seq.smp/include/upcxx/rput.hpp:265

Failed condition: (detail::completions_has_event<Cxs, operation_cx_event>::value)

To have UPC++ freeze during these errors so you can attach a debugger, rerun the program with GASNET_FREEZE_ON_ERROR=1 in the environment.
//////////////////////////////////////////////////

NOTICE: Before reporting bugs, run with GASNET_BACKTRACE=1 in the environment to generate a backtrace. 
*** Caught a fatal signal: SIGABRT(6) on node 0/1
Abort

Comments (2)

  1. john bachan

    This was already fixed in serializable_view PR. When that merge happens this can be ticked "resolved".

  2. Log in to comment