You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Samuel Cox <cr...@gmail.com> on 2021/12/15 22:23:23 UTC

Async WriteListener#onWritePossible not getting called

Hello,

We are using tomcat-embedded 9.0.55.  OS is mac 10.15.7.  We have
quite a bit of config, but I'm guessing the most relevant is that we
use the NIO2 protocol.

We have been working on a reproducer, but we have many, many layers
involved.  However, I believe what we are experiencing is described in
this old mailing list post:
https://www.mail-archive.com/users@tomcat.apache.org/msg124043.html

In our case, we are registering a listener on for request 1 on a
container thread for a request-other-than-1.  When that happens,
onWritePossible never fires.  We do not have this problem when we run
with Jetty and the thread usage looks very similar.

I still see that marked as @Ignore in the 9.0.x source.  Is this still
viewed as an issue?  I'm trying to get ant installed so I can run the
test:)

--
Samuel Cox

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Async WriteListener#onWritePossible not getting called

Posted by Samuel Cox <cr...@gmail.com>.
On Sat, Dec 18, 2021 at 11:09 AM Mark Thomas <ma...@apache.org> wrote:
>
> On 15/12/2021 22:23, Samuel Cox wrote:
> > Hello,
> >
> > We are using tomcat-embedded 9.0.55.  OS is mac 10.15.7.  We have
> > quite a bit of config, but I'm guessing the most relevant is that we
> > use the NIO2 protocol.
> >
> > We have been working on a reproducer, but we have many, many layers
> > involved.  However, I believe what we are experiencing is described in
> > this old mailing list post:
> > https://www.mail-archive.com/users@tomcat.apache.org/msg124043.html
> >
> > In our case, we are registering a listener on for request 1 on a
> > container thread for a request-other-than-1.
>
> That is unusual. I don't see any obvious reason why that wouldn't work
> but equally, I could well believe that in that scenario correct
> operation would be very dependent on timing. I'm not sure that the API
> exposes everything you would need to make sure that it would always work.
>
> > When that happens, onWritePossible never fires.
>
> That the behaviour is consistent at least means it should be easy to debug.
>
> > We do not have this problem when we run
> > with Jetty and the thread usage looks very similar.
> >
> > I still see that marked as @Ignore in the 9.0.x source.  Is this still
> > viewed as an issue?
>
> I can't find anything in the commit log or on the dev list that would
> explain why this issue wasn't resolved.
>
> > I'm trying to get ant installed so I can run the
> > test:)
>
> It fails.
>
> I suggest opening a Bugzilla issue either it isn't forgotten or if there
> is a good reason for not fixing it, we have that reason documented.
> Include a reference to the test.

Done.  It can be found at https://bz.apache.org/bugzilla/show_bug.cgi?id=65757

> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Async WriteListener#onWritePossible not getting called

Posted by Mark Thomas <ma...@apache.org>.
On 15/12/2021 22:23, Samuel Cox wrote:
> Hello,
> 
> We are using tomcat-embedded 9.0.55.  OS is mac 10.15.7.  We have
> quite a bit of config, but I'm guessing the most relevant is that we
> use the NIO2 protocol.
> 
> We have been working on a reproducer, but we have many, many layers
> involved.  However, I believe what we are experiencing is described in
> this old mailing list post:
> https://www.mail-archive.com/users@tomcat.apache.org/msg124043.html
> 
> In our case, we are registering a listener on for request 1 on a
> container thread for a request-other-than-1.

That is unusual. I don't see any obvious reason why that wouldn't work 
but equally, I could well believe that in that scenario correct 
operation would be very dependent on timing. I'm not sure that the API 
exposes everything you would need to make sure that it would always work.

> When that happens, onWritePossible never fires.

That the behaviour is consistent at least means it should be easy to debug.

> We do not have this problem when we run
> with Jetty and the thread usage looks very similar.
> 
> I still see that marked as @Ignore in the 9.0.x source.  Is this still
> viewed as an issue?

I can't find anything in the commit log or on the dev list that would 
explain why this issue wasn't resolved.

> I'm trying to get ant installed so I can run the
> test:)

It fails.

I suggest opening a Bugzilla issue either it isn't forgotten or if there 
is a good reason for not fixing it, we have that reason documented. 
Include a reference to the test.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org