[jira] [Commented] (BOOKKEEPER-648) BasicJMSTest failed

2013-07-25 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13719324#comment-13719324
 ] 

Mridul Muralidharan commented on BOOKKEEPER-648:



On going over the code again, the testcase is extremely simple - it tests the 
sync and async api.

a) Create one publisher and two subscriber sessions for the topic (one via sync 
api, another async api of jms).

b) Send 4 messages through publisher session.

c) Sleep for 10 ms to ensure all messages have been sent - this should not be 
required, but hedwig sometimes takes a lot of time.

d) For sync test, wait for 100 ms for each message to be received : null is 
returned if it times out without receiving any message.
The number of times receive is called is equal to the number of times we sent 
messages - the test expects in-order-delivery without loss of messages as per 
hedwig api contract.
This is what is failing : we are not receiving all the messages we sent.

e) The async session listener does the same as (d) - except on the async 
listener : this did not get tested in this specific case due to validation 
failure in (d).
Looking more, we should probably add a sleep before checking the 
'messageCount.getValue() != CHAT_MESSAGES.length' condition - in case async 
listener is still running in parallel : though this is not the failure we are 
observing ...



Assuming you noticed the same assertion stacktrace in each case when it failed, 
it means no message was received before timeout in sync invocation.
This can be due to :

1) Hedwig or bookkeeper is inordinately slow for some reasons (slow hdd, filled 
up /tmp, low mem, tlb thrashing, etc ?) : in which case, simply bumping up the 
sleep time and receive timeout param will circumvent the issue.

2) There is some bug somewhere in the chain which is causing message drops - 
either at publish time or while sending it to subscribers or somewhere else ?

To get additional debugging info, there are log messages in jms module : but 
(particularly for this testcase) the jms module is a thin wrapper delegating to 
corresponding hedwig client api - so enabling debug there would be more helpful.
Actually, I would validate if the server actually sent messages to both the 
subscribers and they were received by the client - if yes, rest would be a 
client side bug (hedwig client or jms).


If you could reproduce the issue with debug logging enabled for root logger, I 
can definitely help narrow down the issue with those logs !
Unfortunately, there are almost no testcases in hedwig client : so I am not 
sure what design or implementation changes happened in client (or server ?) - 
since I am not keeping track of bookkeeper/hedwig anymore.


 BasicJMSTest failed
 ---

 Key: BOOKKEEPER-648
 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-648
 Project: Bookkeeper
  Issue Type: Bug
  Components: hedwig-client
Reporter: Flavio Junqueira
Assignee: Mridul Muralidharan

 While running tests, I got once a failure for this hedwig-client-jms test: 
 BasicJMSTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (BOOKKEEPER-648) BasicJMSTest failed

2013-07-25 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13719348#comment-13719348
 ] 

Mridul Muralidharan commented on BOOKKEEPER-648:



Flavio, I am not sure what the expectation of this bug is - is it appropriate 
debug message for this testcase ?
As I detailed above - the only message possible is : no message was received 
before timeout - unfortunately, I dont think that is going to help us much in 
debugging it.
The reason I did not add descriptive message for every assertion in the tests 
is because the corresponding JMS api's detail the error conditions in detail 
(when a null can be returned from receive is detailed in JMS api javadocs for 
example).


To actually debug/fix the issue, we will need to enable debug logging in 
server, client api and jms mode.
Subsequently, when issue is observed, we will need to trace whether message was 
actually sent to server, whether server dispatched to both subscribers, whether 
client api received it, and whether it was dispatched to jms.
The jms module does nothing different from any other api user of hedwig - 
barring bugs in it ofcourse :-)

This is an assertion which is typically not expected to fail unless there is 
something broken elsewhere which is causing message loss.

 BasicJMSTest failed
 ---

 Key: BOOKKEEPER-648
 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-648
 Project: Bookkeeper
  Issue Type: Bug
  Components: hedwig-client
Reporter: Flavio Junqueira
Assignee: Mridul Muralidharan

 While running tests, I got once a failure for this hedwig-client-jms test: 
 BasicJMSTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (BOOKKEEPER-648) BasicJMSTest failed

2013-07-24 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13718267#comment-13718267
 ] 

Mridul Muralidharan commented on BOOKKEEPER-648:


I was not able to reproduce this with latest svn trunk.

{noformat} 
$ mvn test

[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building hedwig-client-jms 4.3.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- javacc-maven-plugin:2.6:jjtree-javacc (jjtree-javacc) @ 
hedwig-client-jms ---
[INFO] Skipping - all parsers are up to date
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ 
hedwig-client-jms ---
[INFO] Setting property: classpath.resource.loader.class = 
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ 
hedwig-client-jms ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ 
hedwig-client-jms ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 76 source files to 
/home/mridulm/work/bookkeeper/trunk/hedwig-client-jms/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ 
hedwig-client-jms ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/home/mridulm/work/bookkeeper/trunk/hedwig-client-jms/src/test/resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ 
hedwig-client-jms ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 104 source files to 
/home/mridulm/work/bookkeeper/trunk/hedwig-client-jms/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.9:test (default-test) @ hedwig-client-jms ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-surefire-plugin:2.9:test (unit-tests) @ hedwig-client-jms ---
[INFO] Surefire report directory: 
/home/mridulm/work/bookkeeper/trunk/hedwig-client-jms/target/surefire-reports

---
 T E S T S
---

---
 T E S T S
---
Running org.apache.hedwig.jms.BasicJMSTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.516 sec
Running org.apache.hedwig.jms.selector.activemq.SelectorTest
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.208 sec
Running org.apache.hedwig.jms.selector.activemq.SelectorParserTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.195 sec
Running org.apache.hedwig.jms.selector.BasicSelectorGrammarTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.238 sec

Results :

Tests run: 26, Failures: 0, Errors: 0, Skipped: 0

{noformat}

 BasicJMSTest failed
 ---

 Key: BOOKKEEPER-648
 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-648
 Project: Bookkeeper
  Issue Type: Bug
  Components: hedwig-client
Reporter: Flavio Junqueira
Assignee: Mridul Muralidharan

 While running tests, I got once a failure for this hedwig-client-jms test: 
 BasicJMSTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (BOOKKEEPER-648) BasicJMSTest failed

2013-07-24 Thread Flavio Junqueira (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13718353#comment-13718353
 ] 

Flavio Junqueira commented on BOOKKEEPER-648:
-

have you tried running in a loop? it fails intermittently.

 BasicJMSTest failed
 ---

 Key: BOOKKEEPER-648
 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-648
 Project: Bookkeeper
  Issue Type: Bug
  Components: hedwig-client
Reporter: Flavio Junqueira
Assignee: Mridul Muralidharan

 While running tests, I got once a failure for this hedwig-client-jms test: 
 BasicJMSTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (BOOKKEEPER-648) BasicJMSTest failed

2013-07-24 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13718365#comment-13718365
 ] 

Mridul Muralidharan commented on BOOKKEEPER-648:


I tried it 3 times -
a) mvn test
b) mvn install
Both from the jms subdir

and
c) mvn install for entire bookkeeper.

Was there any other env difference ? Like hdd space constraint, mem
constraint, etc ?
The basic test is actually pretty basic - send msg, and receive the same 

On Wed, Jul 24, 2013 at 6:51 PM, Flavio Junqueira (JIRA)


 BasicJMSTest failed
 ---

 Key: BOOKKEEPER-648
 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-648
 Project: Bookkeeper
  Issue Type: Bug
  Components: hedwig-client
Reporter: Flavio Junqueira
Assignee: Mridul Muralidharan

 While running tests, I got once a failure for this hedwig-client-jms test: 
 BasicJMSTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (BOOKKEEPER-648) BasicJMSTest failed

2013-07-24 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13718369#comment-13718369
 ] 

Mridul Muralidharan commented on BOOKKEEPER-648:


I tried it 3 times -
a) mvn test
b) mvn install
Both from the jms subdir

and
c) mvn install for entire bookkeeper.

Was there any other env difference when it failed ? Like hdd space constraint, 
mem constraint, etc ?
The basic test is actually pretty basic - send msg, and receive the same  
if that fails, everything else should also fail.
I did not notice any deprecation warnings, so wondering what has changed !


 BasicJMSTest failed
 ---

 Key: BOOKKEEPER-648
 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-648
 Project: Bookkeeper
  Issue Type: Bug
  Components: hedwig-client
Reporter: Flavio Junqueira
Assignee: Mridul Muralidharan

 While running tests, I got once a failure for this hedwig-client-jms test: 
 BasicJMSTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (BOOKKEEPER-648) BasicJMSTest failed

2013-07-13 Thread Flavio Junqueira (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13707764#comment-13707764
 ] 

Flavio Junqueira commented on BOOKKEEPER-648:
-

The logs don't contain much information, this is what I got:

{noformat}
---
Test set: org.apache.hedwig.jms.BasicJMSTest
---
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.597 sec  
FAILURE!
testSimpleChat(org.apache.hedwig.jms.BasicJMSTest)  Time elapsed: 2.506 sec  
 FAILURE!
junit.framework.AssertionFailedError: null
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNotNull(Assert.java:214)
at junit.framework.Assert.assertNotNull(Assert.java:207)
at 
org.apache.hedwig.jms.BasicJMSTest.simpleChatTestImpl(BasicJMSTest.java:221)
at 
org.apache.hedwig.jms.BasicJMSTest.testSimpleChat(BasicJMSTest.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at 
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at 
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at 
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:78)


startHubServers done ... [org.apache.hedwig.server.netty.PubSubServer@8408396]
stopHubServers done ... []
startHubServers done ... [org.apache.hedwig.server.netty.PubSubServer@6139a6a1]
stopHubServers done ... []
startHubServers done ... [org.apache.hedwig.server.netty.PubSubServer@a456424]
stopHubServers done ... []
{noformat}

 BasicJMSTest failed
 ---

 Key: BOOKKEEPER-648
 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-648
 Project: Bookkeeper
  Issue Type: Bug
  Components: hedwig-client
Reporter: Flavio Junqueira
Assignee: Mridul Muralidharan

 While running tests, I got once a failure for this hedwig-client-jms test: 
 BasicJMSTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira