Bug #2777

Async send future is not canceled after remote server is deactivated.

Added by M. Pohling about 1 year ago.

Status:NewStart date:10/17/2018
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Java
Target version:rsb-0.18

Description

error Async send future is not canceled after remote server is deactivated.
setup
spread configured via global config file and started.

test code

public static void main(String[] args) {
    RemoteServer remote = Factory.getInstance().createRemoteServer("/test/scope");

    System.out.println("activate");
    try {
        remote.activate();
    } catch (RSBException e) {
        e.printStackTrace();
    }

    System.out.println("trigger server task");
    new Thread(() -> {
        try {
            remote.callAsync("mymethod").get();
        } catch (RSBException | ExecutionException | InterruptedException | CancellationException e) {
            e.printStackTrace();
        }
    }).start();
    try {
        Thread.sleep(1000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    System.out.println("deactivate");
    try {
        if (remote.isActive()) {
            remote.deactivate();
        }
    } catch (RSBException | InterruptedException e) {
        e.printStackTrace();
    }

    System.out.println("done");
}

output
/usr/lib/jvm/default-java/bin/java -Dvisualvm.id=397395080057204 -javaagent:/home/divine/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.4892.20/lib/idea_rt.jar=44202:/home/divine/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.4892.20/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/default-java/jre/lib/charsets.jar:/usr/lib/jvm/default-java/jre/lib/deploy.jar:/usr/lib/jvm/default-java/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/default-java/jre/lib/ext/dnsns.jar:/usr/lib/jvm/default-java/jre/lib/ext/jaccess.jar:/usr/lib/jvm/default-java/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/default-java/jre/lib/ext/localedata.jar:/usr/lib/jvm/default-java/jre/lib/ext/nashorn.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunec.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/default-java/jre/lib/ext/zipfs.jar:/usr/lib/jvm/default-java/jre/lib/javaws.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/jfr.jar:/usr/lib/jvm/default-java/jre/lib/jfxswt.jar:/usr/lib/jvm/default-java/jre/lib/jsse.jar:/usr/lib/jvm/default-java/jre/lib/management-agent.jar:/usr/lib/jvm/default-java/jre/lib/plugin.jar:/usr/lib/jvm/default-java/jre/lib/resources.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/home/divine/local_data/workspace/openbase/bco/module/jul/extension/rsb/com/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/extension/rst/interface/target/classes:/home/divine/local_data/.m2/repository/rsb/rst/0.18-SNAPSHOT/rst-0.18-20180206.145148-16.jar:/home/divine/local_data/.m2/repository/rsb/rst-sandbox/0.18-SNAPSHOT/rst-sandbox-0.18-20180206.145155-16.jar:/home/divine/local_data/.m2/repository/rsb/rst-experimental/0.18-SNAPSHOT/rst-experimental-0.18-20181011.150504-30.jar:/home/divine/local_data/workspace/openbase/bco/module/jul/extension/rst/util/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/extension/rsb/interface/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/exception/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/extension/rsb/scope/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/extension/rst/processing/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/extension/protobuf/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/processing/target/classes:/home/divine/local_data/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.7.5/jackson-core-2.7.5.jar:/home/divine/local_data/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.7.5/jackson-databind-2.7.5.jar:/home/divine/local_data/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.7.0/jackson-annotations-2.7.0.jar:/home/divine/local_data/.m2/repository/com/googlecode/protobuf-java-format/protobuf-java-format/1.4/protobuf-java-format-1.4.jar:/home/divine/local_data/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/home/divine/local_data/.m2/repository/java3d/vecmath/1.3.1/vecmath-1.3.1.jar:/home/divine/local_data/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:/home/divine/local_data/workspace/openbase/bco/module/jul/interface/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/annotation/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/schedule/target/classes:/home/divine/local_data/workspace/openbase/bco/module/jul/pattern/default/target/classes:/home/divine/local_data/.m2/repository/rsb/rsb/0.18-SNAPSHOT/rsb-0.18-20180913.092653-31.jar:/home/divine/local_data/.m2/repository/com/google/protobuf/protobuf-java/2.6.1/protobuf-java-2.6.1.jar:/home/divine/local_data/.m2/repository/com/github/jnr/jnr-ffi/2.0.9/jnr-ffi-2.0.9.jar:/home/divine/local_data/.m2/repository/com/github/jnr/jffi/1.2.11/jffi-1.2.11.jar:/home/divine/local_data/.m2/repository/com/github/jnr/jffi/1.2.11/jffi-1.2.11-native.jar:/home/divine/local_data/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:/home/divine/local_data/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar:/home/divine/local_data/.m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar:/home/divine/local_data/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/home/divine/local_data/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar:/home/divine/local_data/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar:/home/divine/local_data/.m2/repository/org/openbase/jps/3.4.9/jps-3.4.9.jar:/home/divine/local_data/.m2/repository/org/fusesource/jansi/jansi/1.17.1/jansi-1.17.1.jar:/home/divine/local_data/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/home/divine/local_data/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/home/divine/local_data/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/home/divine/local_data/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar org.openbase.jul.extension.rsb.com.RSBTest
activate
trigger server task
deactivate
Oct 17, 2018 3:17:19 PM rsb.introspection.IntrospectionParticipantObserver destroyed
INFO: Deactivating introspection protocol handler since no more participants exist
done


Related issues

Related to Robotics Service Bus - Bug #2776: Synchronized send is still blocking after remote server i... New 10/17/2018

History

#1 Updated by J. Wienke 12 months ago

  • Related to Bug #2776: Synchronized send is still blocking after remote server is deactivated. added

Also available in: Atom PDF