Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 900392 - (JBPAPP6-1408) Singleton Service could fail with "IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results"
Singleton Service could fail with "IllegalStateException: JBAS010350: Expecte...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Clustering (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity high
: ER1
: EAP 6.1.0
Assigned To: Radoslav Husar
http://jira.jboss.org/jira/browse/JBP...
:
Depends On:
Blocks: JBPAPP6-1179 JBPAPP6-1159 JBPAPP6-1422
  Show dependency treegraph
 
Reported: 2012-05-09 09:37 EDT by Radoslav Husar
Modified: 2014-06-28 08:32 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The `SingletonService` sometimes failed with the following output in the log: ---- IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results ---- The error occurred in the `getValueRef` method and was triggered when a view change occurred because the old master node was stopping and the new one was still starting. To resolve this, `getValueRef` has been changed to retry if no results are returned. The `SingletonService` now performs as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-08 10:35:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPAPP6-1408 Major Closed CLONE - Singleton Service fails on Windows with "IllegalStateException: JBAS010350: Expected result from singleton provi... 2015-04-21 06:03:49 EDT

  None (edit)
Description Radoslav Husar 2012-05-09 09:37:58 EDT
Affects: Release Notes
project_key: JBPAPP6

As seen on hudson runs and observed by Tom C. (thanks Tom) :

http://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-AS-Testsuite/job/eap-60-as-testsuite-Windows-matrix-OracleJDK7/17/jdk=java17_default,label=Win2k8_x86/testReport/junit/org.jboss.as.test.clustering.cluster.singleton/SingletonTestCase%28UDP%29/testSingletonService/

{noformat}
07:34:17,664 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/singleton].[org.jboss.as.test.clustering.cluster.singleton.service.MyServiceServlet]] (http--10.16.92.4-8080-1) Servlet.service() for servlet org.jboss.as.test.clustering.cluster.singleton.service.MyServiceServlet threw exception: java.lang.IllegalStateException: java.lang.IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results.
	at org.jboss.as.clustering.singleton.SingletonService$RpcHandler.getValueRef(SingletonService.java:225) [jboss-as-clustering-singleton-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.clustering.singleton.SingletonService.getValue(SingletonService.java:176) [jboss-as-clustering-singleton-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.clustering.singleton.SingletonService.getValue(SingletonService.java:53) [jboss-as-clustering-singleton-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1203) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
	at org.jboss.as.test.clustering.cluster.singleton.service.MyServiceServlet.doGet(MyServiceServlet.java:40) [classes:]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
	at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.15.Final-redhat-1.jar:]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]
Caused by: java.lang.IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results.
	at org.jboss.as.clustering.singleton.SingletonService$RpcHandler.getValueRef(SingletonService.java:221) [jboss-as-clustering-singleton-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	... 21 more

{noformat}

Test itself then fails with
{noformat}
Error Message

Deployment with name deployment-1 could not be undeployed. Container container-1 must be still running.
{noformat}
Comment 1 Radoslav Husar 2012-05-09 09:37:59 EDT
Link: Added: This issue Cloned from AS7-4751
Comment 2 Radoslav Husar 2012-05-09 09:38:50 EDT
Workflow: Removed: GIT Pull Request workflow  Added: jira
Security: Added: Public
Docs QE Status: Added: NEW
Comment 3 Radoslav Husar 2012-05-09 09:39:14 EDT
Link: Added: This issue is incorporated by JBPAPP-7577
Comment 4 Rajesh Rajasekaran 2012-05-09 22:57:27 EDT
Labels: Added: eap6_need_triage
Comment 5 Tomaz Cerar 2012-05-10 10:48:17 EDT
Link: Added: This issue is a dependency of JBPAPP-8860
Comment 9 Radoslav Husar 2012-06-04 07:38:17 EDT
Release Notes Docs Status: Added: Not Yet Documented
Comment 10 Rajesh Rajasekaran 2012-06-06 16:44:16 EDT
Link: Added: This issue is a dependency of JBPAPP-9290
Comment 11 Rajesh Rajasekaran 2012-06-06 16:52:30 EDT
Link: Removed: This issue is incorporated by JBPAPP-7577 
Comment 12 Rostislav Svoboda 2012-06-07 09:29:42 EDT
Link: Added: This issue is a dependency of JBPAPP-9188
Comment 13 Misty Stanley-Jones 2012-06-12 06:27:39 EDT
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Known Issue
Release Notes Text: Added: <para>
                        An error like the following can be seen on Microsoft Windows:
                    </para>
                    <screen>IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results</screen>
                    <para>
                        This issue is under investigation and seems to be due to timing. The fix will be to make the <code>getValueRef</code> method retry if the new master has not yet been notified. Until this fix is in place, the workaround is to add a <code>Thread.sleep()</code> call to your code to delay the <code>getValueRef()</code> call.
                    </para>
Affects: Added: Release Notes
Comment 14 Rajesh Rajasekaran 2012-07-11 15:41:55 EDT
Labels: Removed: eap6_need_triage Added: eap601candidate
Comment 15 Brian Stansberry 2012-08-08 10:27:14 EDT
This was resolved in upstream master and 7.1 in late May; can this be resolved here?
Comment 16 Radoslav Husar 2012-08-08 10:35:29 EDT
Test is @Ignore-d again, due to AS7-5210.
Comment 18 Rajesh Rajasekaran 2012-09-20 15:43:07 EDT
Labels: Removed: eap601candidate Added: eap601-qe-triage
Comment 19 Anne-Louise Tangring 2012-10-08 11:07:45 EDT
Not approved for EAP 6.0.1. If this should be reconsidered, please add the label: eap601-qe-triage
Comment 20 Anne-Louise Tangring 2012-10-08 11:07:45 EDT
Labels: Removed: eap601-qe-triage 
Comment 21 Dana Mison 2012-10-16 01:53:17 EDT
Writer: Added: mistysj
Comment 22 Dana Mison 2012-10-28 01:22:43 EDT
Release Notes Text: Removed: <para>
                        An error like the following can be seen on Microsoft Windows:
                    </para>
                    <screen>IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results</screen>
                    <para>
                        This issue is under investigation and seems to be due to timing. The fix will be to make the <code>getValueRef</code> method retry if the new master has not yet been notified. Until this fix is in place, the workaround is to add a <code>Thread.sleep()</code> call to your code to delay the <code>getValueRef()</code> call.
                    </para> Added: An error like the following can be seen on Microsoft Windows:

    IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results

This issue is under investigation and seems to be due to timing. The fix will be to make the `getValueRef` method retry if the new master has not yet been notified. Until this fix is in place, the workaround is to add a `Thread.sleep()` call to your code to delay the `getValueRef()` call.
Comment 23 Anne-Louise Tangring 2012-11-13 15:57:55 EST
Release Notes Docs Status: Removed: Documented as Known Issue 
Writer: Removed: mistysj 
Release Notes Text: Removed: An error like the following can be seen on Microsoft Windows:

    IllegalStateException: JBAS010350: Expected result from singleton provider only, but instead received 0 results

This issue is under investigation and seems to be due to timing. The fix will be to make the `getValueRef` method retry if the new master has not yet been notified. Until this fix is in place, the workaround is to add a `Thread.sleep()` call to your code to delay the `getValueRef()` call. 
Docs QE Status: Removed: NEW 
Comment 29 Radoslav Husar 2013-05-13 10:24:46 EDT
@rdickens, 

Continuing the IRC chat, the actual description and fix for the issue is here:

https://issues.jboss.org/browse/AS7-4751?focusedCommentId=12693750&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12693750

I have rewritten the Doc Text with the updates.

Also please note that this does not only influence Windows OS, but other OSes as well. It is just that the Windows OS exposed this issue. I have updated the fields and description of the Jira to reflect that.

Note You need to log in before you can comment on or make changes to this bug.