powered by Jive Software

GraphDeadEndException in "Low Level" SINT execution

When running Smack Integration Tests from a current-ish main branch (4.5.0-alpha), I’m seeing the following exception: org.jivesoftware.smack.fsm.StateMachineException$SmackStateGraphDeadEndException. It appears to be thrown by the orchestration around the test execution itself.

It’s somewhat inconsistent, but seems to affect the tests that extend from AbstractSmackLowLevelIntegrationTest only.

I’ll add the full output of a run for good measure. I’ve started this run with these arguments:

-Dsinttest.service=example.org
-Dsinttest.adminAccountUsername=admin
-Dsinttest.adminAccountPassword=admin
-Dsinttest.securityMode=disabled
-Dsinttest.enabledTests=LowLevelRosterIntegrationTest
-Dsinttest.replyTimeout=5000

The full output:

22:42:05: Executing task 'SmackIntegrationTestFramework.main()'...

> Task :smack-core:createVersionResource UP-TO-DATE
> Task :smack-xmlparser:compileJava UP-TO-DATE
> Task :smack-core:compileJava UP-TO-DATE
> Task :smack-bosh:compileJava UP-TO-DATE
> Task :smack-bosh:processResources NO-SOURCE
> Task :smack-bosh:classes UP-TO-DATE
> Task :smack-bosh:jar UP-TO-DATE
> Task :smack-core:processResources UP-TO-DATE
> Task :smack-core:classes UP-TO-DATE
> Task :smack-core:jar UP-TO-DATE
> Task :smack-debug:compileJava UP-TO-DATE
> Task :smack-debug:processResources UP-TO-DATE
> Task :smack-debug:classes UP-TO-DATE
> Task :smack-debug:jar UP-TO-DATE
> Task :smack-im:compileJava UP-TO-DATE
> Task :smack-extensions:compileJava UP-TO-DATE
> Task :smack-experimental:compileJava UP-TO-DATE
> Task :smack-experimental:processResources UP-TO-DATE
> Task :smack-experimental:classes UP-TO-DATE
> Task :smack-experimental:jar UP-TO-DATE
> Task :smack-extensions:processResources UP-TO-DATE
> Task :smack-extensions:classes UP-TO-DATE
> Task :smack-extensions:jar UP-TO-DATE
> Task :smack-im:processResources UP-TO-DATE
> Task :smack-im:classes UP-TO-DATE
> Task :smack-im:jar UP-TO-DATE
> Task :smack-resolver-javax:compileJava UP-TO-DATE
> Task :smack-sasl-javax:compileJava UP-TO-DATE
> Task :smack-xmlparser-stax:compileJava UP-TO-DATE
> Task :smack-java8:compileJava UP-TO-DATE
> Task :smack-legacy:compileJava UP-TO-DATE
> Task :smack-omemo:compileJava UP-TO-DATE
> Task :smack-openpgp:compileJava UP-TO-DATE
> Task :smack-resolver-minidns:compileJava UP-TO-DATE
> Task :smack-resolver-minidns-dox:compileJava UP-TO-DATE
> Task :smack-streammanagement:compileJava UP-TO-DATE
> Task :smack-tcp:compileJava UP-TO-DATE
> Task :smack-websocket:compileJava UP-TO-DATE
> Task :smack-websocket-okhttp:compileJava UP-TO-DATE
> Task :smack-java8-full:compileJava UP-TO-DATE
> Task :smack-resolver-dnsjava:compileJava UP-TO-DATE
> Task :smack-websocket-java11:compileJava UP-TO-DATE
> Task :smack-integration-test:compileJava UP-TO-DATE
> Task :smack-integration-test:processResources NO-SOURCE
> Task :smack-integration-test:classes UP-TO-DATE
> Task :smack-java8:processResources NO-SOURCE
> Task :smack-java8:classes UP-TO-DATE
> Task :smack-java8:jar UP-TO-DATE
> Task :smack-java8-full:processResources NO-SOURCE
> Task :smack-java8-full:classes UP-TO-DATE
> Task :smack-java8-full:jar UP-TO-DATE
> Task :smack-legacy:processResources UP-TO-DATE
> Task :smack-legacy:classes UP-TO-DATE
> Task :smack-legacy:jar UP-TO-DATE
> Task :smack-omemo:processResources UP-TO-DATE
> Task :smack-omemo:classes UP-TO-DATE
> Task :smack-omemo:jar UP-TO-DATE
> Task :smack-openpgp:processResources UP-TO-DATE
> Task :smack-openpgp:classes UP-TO-DATE
> Task :smack-openpgp:jar UP-TO-DATE
> Task :smack-resolver-dnsjava:processResources NO-SOURCE
> Task :smack-resolver-dnsjava:classes UP-TO-DATE
> Task :smack-resolver-dnsjava:jar UP-TO-DATE
> Task :smack-resolver-javax:processResources NO-SOURCE
> Task :smack-resolver-javax:classes UP-TO-DATE
> Task :smack-resolver-javax:jar UP-TO-DATE
> Task :smack-resolver-minidns:processResources NO-SOURCE
> Task :smack-resolver-minidns:classes UP-TO-DATE
> Task :smack-resolver-minidns:jar UP-TO-DATE
> Task :smack-resolver-minidns-dox:processResources NO-SOURCE
> Task :smack-resolver-minidns-dox:classes UP-TO-DATE
> Task :smack-resolver-minidns-dox:jar UP-TO-DATE
> Task :smack-sasl-javax:processResources NO-SOURCE
> Task :smack-sasl-javax:classes UP-TO-DATE
> Task :smack-sasl-javax:jar UP-TO-DATE
> Task :smack-streammanagement:processResources NO-SOURCE
> Task :smack-streammanagement:classes UP-TO-DATE
> Task :smack-streammanagement:jar UP-TO-DATE
> Task :smack-tcp:processResources UP-TO-DATE
> Task :smack-tcp:classes UP-TO-DATE
> Task :smack-tcp:jar UP-TO-DATE
> Task :smack-websocket:processResources NO-SOURCE
> Task :smack-websocket:classes UP-TO-DATE
> Task :smack-websocket:jar UP-TO-DATE
> Task :smack-websocket-java11:processResources UP-TO-DATE
> Task :smack-websocket-java11:classes UP-TO-DATE
> Task :smack-websocket-java11:jar UP-TO-DATE
> Task :smack-websocket-okhttp:processResources UP-TO-DATE
> Task :smack-websocket-okhttp:classes UP-TO-DATE
> Task :smack-websocket-okhttp:jar UP-TO-DATE
> Task :smack-xmlparser:processResources NO-SOURCE
> Task :smack-xmlparser:classes UP-TO-DATE
> Task :smack-xmlparser:jar UP-TO-DATE
> Task :smack-xmlparser-stax:processResources UP-TO-DATE
> Task :smack-xmlparser-stax:classes UP-TO-DATE
> Task :smack-xmlparser-stax:jar UP-TO-DATE

> Task :smack-integration-test:SmackIntegrationTestFramework.main()
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:07 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework run
INFO: SmackIntegrationTestFramework [ap7u1]: Starting
Smack version: 4.5.0-alpha1-SNAPSHOT (4.4.2-154-gd176da198 2021-07-07)
Jul 07, 2021 10:42:07 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework run
INFO: SmackIntegrationTestFramework [ap7u1]: Finished scanning for tests, preparing environment
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:07 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework runTests
INFO: Smack Integration Test Framework
################################
Available tests: 5 (Disabled 39 classes and 0 tests)

Jul 07, 2021 10:42:07 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework runConcreteTest
INFO: LowLevelRosterIntegrationTest.testPresenceEventListenersOffline (LowLevel, tcp) Start
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:07 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework runConcreteTest
INFO: LowLevelRosterIntegrationTest.testPresenceEventListenersOffline (LowLevel, tcp) Success
Jul 07, 2021 10:42:07 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework runConcreteTest
INFO: LowLevelRosterIntegrationTest.testPresenceEventListenersOffline (LowLevel, modular-nocompress) Start
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.fsm.StateDescriptorGraph handleStateDescriptorGraphVertex
SEVERE: StateDescriptor ResumeStream points to a superior 'class org.jivesoftware.smack.compression.CompressionModule$CompressionStateDescriptor' which is not part of the successor set
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.fsm.StateDescriptorGraph handleStateDescriptorGraphVertex
SEVERE: StateDescriptor ResumeStream points to a superior 'class org.jivesoftware.smack.compression.CompressionModule$CompressionStateDescriptor' which is not part of the successor set
Jul 07, 2021 10:42:07 PM org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints resolveDomain
INFO: Could not resolve DNS SRV resource records for _xmpp-client._tcp.example.org. Consider adding those.
Jul 07, 2021 10:42:08 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework runConcreteTest
INFO: LowLevelRosterIntegrationTest.testPresenceEventListenersOffline (LowLevel, modular-nocompress) Success
Jul 07, 2021 10:42:08 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework runConcreteTest
INFO: LowLevelRosterIntegrationTest.testPresenceEventListenersOffline (LowLevel, modular-websocket-okhttp) Start
Jul 07, 2021 10:42:08 PM org.igniterealtime.smack.inttest.SmackIntegrationTestFramework run
SEVERE: Unexpected abort because runTests() threw throwable
org.jivesoftware.smack.fsm.StateMachineException$SmackStateGraphDeadEndException: GraphVertex State StateDescriptor LookupRemoteConnectionEndpoints ModularXmppClientToServerConnection[not-authenticated] (8) [color=white, identityHashCode=1755634886, outgoingEdgeCount=1, outgoingEdges={GraphVertex State StateDescriptor EstablishingWebSocketConnection ModularXmppClientToServerConnection[not-authenticated] (8) [color=white, identityHashCode=1684802151, outgoingEdgeCount=1]}] has no successor vertexes
	at org.jivesoftware.smack.fsm.StateMachineException$SmackStateGraphDeadEndException.from(StateMachineException.java:80)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraphInternal(ModularXmppClientToServerConnection.java:361)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraph(ModularXmppClientToServerConnection.java:287)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraphInternal(ModularXmppClientToServerConnection.java:367)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraph(ModularXmppClientToServerConnection.java:287)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.connectInternal(ModularXmppClientToServerConnection.java:1056)
	at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:532)
	at org.igniterealtime.smack.inttest.XmppConnectionManager.constructConnectedConnection(XmppConnectionManager.java:413)
	at org.igniterealtime.smack.inttest.XmppConnectionManager.constructConnectedConnections(XmppConnectionManager.java:401)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework$LowLevelTestMethod.invoke(SmackIntegrationTestFramework.java:856)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.lambda$invokeLowLevel$2(SmackIntegrationTestFramework.java:548)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runConcreteTest(SmackIntegrationTestFramework.java:480)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework$PreparedTest.run(SmackIntegrationTestFramework.java:681)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runTests(SmackIntegrationTestFramework.java:468)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.run(SmackIntegrationTestFramework.java:229)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.main(SmackIntegrationTestFramework.java:107)

Jul 07, 2021 10:42:08 PM org.jivesoftware.smack.roster.Roster$PresencePacketListener processStanza
WARNING: Roster not loaded while processing Presence Stanza [from=sinttest-ap7u1-6@example.org/41ulqnuvky,type=unavailable,]
Jul 07, 2021 10:42:08 PM org.jivesoftware.smack.roster.Roster$PresencePacketListener processStanza
WARNING: Roster not loaded while processing Presence Stanza [from=sinttest-ap7u1-4@example.org/1o3t1ejst,type=unavailable,]
Jul 07, 2021 10:42:08 PM org.igniterealtime.smack.inttest.XmppConnectionManager disconnectAndCleanup
INFO: Successfully deleted all created accounts ✔
Exception in thread "main" org.jivesoftware.smack.fsm.StateMachineException$SmackStateGraphDeadEndException: GraphVertex State StateDescriptor LookupRemoteConnectionEndpoints ModularXmppClientToServerConnection[not-authenticated] (8) [color=white, identityHashCode=1755634886, outgoingEdgeCount=1, outgoingEdges={GraphVertex State StateDescriptor EstablishingWebSocketConnection ModularXmppClientToServerConnection[not-authenticated] (8) [color=white, identityHashCode=1684802151, outgoingEdgeCount=1]}] has no successor vertexes
	at org.jivesoftware.smack.fsm.StateMachineException$SmackStateGraphDeadEndException.from(StateMachineException.java:80)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraphInternal(ModularXmppClientToServerConnection.java:361)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraph(ModularXmppClientToServerConnection.java:287)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraphInternal(ModularXmppClientToServerConnection.java:367)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraph(ModularXmppClientToServerConnection.java:287)
	at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.connectInternal(ModularXmppClientToServerConnection.java:1056)
	at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:532)
	at org.igniterealtime.smack.inttest.XmppConnectionManager.constructConnectedConnection(XmppConnectionManager.java:413)
	at org.igniterealtime.smack.inttest.XmppConnectionManager.constructConnectedConnections(XmppConnectionManager.java:401)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework$LowLevelTestMethod.invoke(SmackIntegrationTestFramework.java:856)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.lambda$invokeLowLevel$2(SmackIntegrationTestFramework.java:548)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runConcreteTest(SmackIntegrationTestFramework.java:480)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework$PreparedTest.run(SmackIntegrationTestFramework.java:681)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runTests(SmackIntegrationTestFramework.java:468)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.run(SmackIntegrationTestFramework.java:229)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.main(SmackIntegrationTestFramework.java:107)

> Task :smack-integration-test:SmackIntegrationTestFramework.main() FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
61 actionable tasks: 1 executed, 60 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':smack-integration-test:SmackIntegrationTestFramework.main()'.
> Process 'command '/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 3s
22:43:08: Task execution finished 'SmackIntegrationTestFramework.main()'.

Thanks for the report.

This is likely a bug in Smack’s relatively new modular XMPP connection. Note that you can change the default connection type used by Smack’s Integration Test Framework (sinttest) via ConnectionConfiguration.Builder.setDefaultConnection(String).

I do not understand how that is used to work around the problem. This seems to affect tests that extend from a certain abstract class - probably for a good reason?