users@grizzly.java.net

Re: CometEngine in 1.0.20 dropping packets

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 05 May 2009 13:50:40 -0400

Salut,

oups just saw:

> [#|2009-05-05T13:49:36.416-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpWorkerThread-8080-2;_RequestID=0ad0aafd-22a7-4e58-a834-a4084ab4f333;|WebModule[/MWEB]Error loading WebappClassLoader
> delegate: true
> repositories:
> /WEB-INF/classes/
> ----------> Parent Classloader:
> EJBClassLoader :
> urlSet = []
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_5dd915
>
> com.rebelmonkey.mweb.test.ChatTestServlet
> java.lang.ClassNotFoundException: com.rebelmonkey.mweb.test.ChatTestServlet
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1576)
> at org.apache.catalina.core.StandardWrapper.loadServletClass(StandardWrapper.java:1273)
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1049)
> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:848)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:667)
> at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:609)
> at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:356)
> at com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:84)
> at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
> at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
> at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)

I've deployed MWEB.war...do I need to deploy more as well?

Thanks

-- Jeanfrancpos

Jeanfrancois Arcand wrote:
> Salut,
>
> Jeffrey Kesselman wrote:
>> Here is the version of my code I'm working with right now. I've
>> included a readme with reproduction instructions.
>>
>> I really hope its something dumb I'm doing...
>
> I've updated to 1.0.27 and I'm not able to reproduce the issue, e.g. I
> don't see any exception in the log. Can you try with 1.0.27 and let me
> know if you see the issue? I do see:
>
>> 8080-2;|Check to send <<< |#]
>>
>> [#|2009-05-05T13:46:37.019-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=19;_ThreadName=CometSelector;|++interrupt|#]
>>
>>
>> [#|2009-05-05T13:46:37.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|++initialize|#]
>>
>>
>> [#|2009-05-05T13:46:37.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check
>> to send >>> |#]
>>
>> [#|2009-05-05T13:46:37.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check
>> to send <<< |#]
>>
>> [#|2009-05-05T13:47:07.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=19;_ThreadName=CometSelector;|++interrupt|#]
>>
>>
>> [#|2009-05-05T13:47:07.277-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|++initialize|#]
>>
>>
>> [#|2009-05-05T13:47:07.277-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check
>> to send >>> |#]
>>
>> [#|2009-05-05T13:47:07.277-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check
>> to send <<< |#]
>
> But I'm getting a JS script error when I add a name
>
>> sendMessage is not defined
>> http://192.168.0.101:8080/MWEB/chattest.jsp/event/2y7%2FjoMJjaFCCu0nQItmrQ%3D%3D
>>
>> Line 2
>
> Any idea?
>
> Thanks
>
> -- Jeanfrancois
>
>>
>> JK
>>
>> The attachment(s) "" has been removed from this email because it
>> contained a type of attachment known to carry viruses and other
>> harmful software. The attachment has been removed for your protection,
>> as well as that of Sun's network.
>> If you know the sender and were expecting the attachment, please
>> contact the sender and have them re-send the file using the .zip
>> format. If the sender is unknown or if the email looks unusual or is
>> unexpected, please delete it now.
>> Additional information: http://antivirus.central.sun.com/
>>
>>
>>
>> On May 4, 2009, at 1:25 PM, Jeanfrancois Arcand wrote:
>>
>>> Salut,
>>>
>>> can you share a test case? If you can't share it public, drop me an
>>> email at jfarcand_at_apache.org
>>>
>>> Thanks!
>>>
>>> -- Jeanfrancois
>>>
>>> Jeffrey Kesselman wrote:
>>>> Unfortunately, it didn't help :/
>>>> Still the same behavior. I do the two notifies one right after the
>>>> other and the second one is dropped silently.
>>>> I put a 500ms sleep ebwteen the two and it works.
>>>> Both states are 100% reproducible.
>>>> JK
>>>> On May 4, 2009, at 12:44 PM, Jeffrey Kesselman wrote:
>>>>>
>>>>> Hi JeanFrancois
>>>>>
>>>>> Thanks for the quick answer. I have my onEvent synchronized
>>>>> already. (Tried that first thing to make sure it
>>>>> wasn't MY race somehow :) )
>>>>>
>>>>> I'll try CometContext.setBlockingNotification(true)
>>>>>
>>>>> Thanks
>>>>>
>>>>> JK
>>>>>
>>>>>
>>>>>> Salut,
>>>>>>
>>>>>> Jeffrey Kesselman wrote:
>>>>>> > Hey Guys,
>>>>>> > > I've run into what seems to be a clear race condition. I have
>>>>>> two calls > to notify in a row in my code. (One is a READ type
>>>>>> the other is a > Notify type).
>>>>>> > When they occur immediately right after each other, the second
>>>>>> packet is > silently dropped. if i put a 500 ms sleep between
>>>>>> them, they work fine.
>>>>>> > > is this a known race condition? Are there known work arounds
>>>>>> other then > the evil sleep?
>>>>>>
>>>>>> If you synchronize your onEvent method, does it help? Another
>>>>>> workaround is to call
>>>>>> CometContext.setBlockingNotification(true)....but I would try
>>>>>> first with sync to see if that help.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> -- Jeanfrancois
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>