Re: setWriteListener and async operations concurrency

2016-10-27 Thread tomcat

On 27.10.2016 13:41, Sergey Mashkov wrote:

On Thu, Oct 27, 2016 at 2:19 PM André Warnier (tomcat) 
wrote:


On 27.10.2016 12:15, Sergey Mashkov wrote:

Hi

I am experiencing deadlock when trying to set output stream write

listener:

The thread from my own thread pool is trying to set a write listener (my
code via setWriteListener call) and another one thread is
https-jsse-nio-N-exec is trying to close and flush (there is no my code

in

the stack trace) and no more threads locked.
..
So the question is: is it even legal to call any async operation from
non-server thread? I see a lot of existing code in the web assumes that

it

is. I also used to write so many times with no issues until now. This is
why I suppose it could be a tomcat bug.



Hi.
Not an answer to your questions, but :
It would be good practice, and probably help a lot the people here to
answer your
questions, if you provided :
- the Tomcat version
- the Java version
- the platform OS and version
You can find all of those in the Tomcat logs, or by running the
(tomcat_dir)/bin/VERSION.(sh|bat)



It's more about the API and requirements: the documentation is not clear
about threading. But if it's a bug then it could be significant


The documentation also corresponds to the version of Tomcat, so it is significant and 
useful (and mainly it saves time for the list volunteers) if you specify what you are 
looking at.


You want free expert advice. You will get it on this list.
But the easier and less time-consuming you make it for these experts, the quicker you will 
have your expert response.




Versions are 9.0.0M6 and M11, java 8u112, Linux x86_64


Thank you.



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



Re: setWriteListener and async operations concurrency

2016-10-27 Thread Sergey Mashkov
On Thu, Oct 27, 2016 at 2:19 PM André Warnier (tomcat) 
wrote:

> On 27.10.2016 12:15, Sergey Mashkov wrote:
> > Hi
> >
> > I am experiencing deadlock when trying to set output stream write
> listener:
> > The thread from my own thread pool is trying to set a write listener (my
> > code via setWriteListener call) and another one thread is
> > https-jsse-nio-N-exec is trying to close and flush (there is no my code
> in
> > the stack trace) and no more threads locked.
> > ..
> > So the question is: is it even legal to call any async operation from
> > non-server thread? I see a lot of existing code in the web assumes that
> it
> > is. I also used to write so many times with no issues until now. This is
> > why I suppose it could be a tomcat bug.
> >
>
> Hi.
> Not an answer to your questions, but :
> It would be good practice, and probably help a lot the people here to
> answer your
> questions, if you provided :
> - the Tomcat version
> - the Java version
> - the platform OS and version
> You can find all of those in the Tomcat logs, or by running the
> (tomcat_dir)/bin/VERSION.(sh|bat)
>

It's more about the API and requirements: the documentation is not clear
about threading. But if it's a bug then it could be significant

Versions are 9.0.0M6 and M11, java 8u112, Linux x86_64


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


Re: setWriteListener and async operations concurrency

2016-10-27 Thread tomcat

On 27.10.2016 12:15, Sergey Mashkov wrote:

Hi

I am experiencing deadlock when trying to set output stream write listener:
The thread from my own thread pool is trying to set a write listener (my
code via setWriteListener call) and another one thread is
https-jsse-nio-N-exec is trying to close and flush (there is no my code in
the stack trace) and no more threads locked.
..
So the question is: is it even legal to call any async operation from
non-server thread? I see a lot of existing code in the web assumes that it
is. I also used to write so many times with no issues until now. This is
why I suppose it could be a tomcat bug.



Hi.
Not an answer to your questions, but :
It would be good practice, and probably help a lot the people here to answer your 
questions, if you provided :

- the Tomcat version
- the Java version
- the platform OS and version
You can find all of those in the Tomcat logs, or by running the
(tomcat_dir)/bin/VERSION.(sh|bat)



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



setWriteListener and async operations concurrency

2016-10-27 Thread Sergey Mashkov
Hi

I am experiencing deadlock when trying to set output stream write listener:
The thread from my own thread pool is trying to set a write listener (my
code via setWriteListener call) and another one thread is
https-jsse-nio-N-exec is trying to close and flush (there is no my code in
the stack trace) and no more threads locked.
.
So the question is: is it even legal to call any async operation from
non-server thread? I see a lot of existing code in the web assumes that it
is. I also used to write so many times with no issues until now. This is
why I suppose it could be a tomcat bug.