-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dong,

JiaDong Huang wrote:
> Let's step back and see the whole picture, more widely. Let's presume
> the symptom as: the company's Web developers have done the same test
> with MT on single CPU and nothing wrong found. And the issue only
> happens within the MP environment. That should be defined/considered
> as MP specific - what I meant by MP issue but not MT issue.

Just because a result is more easily obtained in particular environment
doesn't mean that the environment is the cause. This is a correlation,
not a causality. You are likely to have to try much harder to reproduce
this problem on single CPU hardware. The same can be said about any
threading problem, ever.

> The Tomcat code you had dug out (having problem and throwing the
> exception) has been designed as single threaded. But in MP
> environment, multiple threads get in and cause issue like this. That
> means somewhere in Tomcat or JVM, the synchronization facility has
> already been broken, before running the code shown.

Dude, what are you talking about? The Tomcat team "designed" this to be
single-threaded, yes, but that means that they hadn't intended for
someone to use that object by multiple threads. The number of processors
is irrelevant... even if you have 100 CPUs, the same single thread
cannot run twice at the same time on the same object... you need another
thread. Thus, a threading issue.

> The root is where the synchronization facility was broken.

There is no synchronization at all. It's not broken... it's missing.
Because the Tomcat team designed it as single-threaded.

> As far as I understand, Tomcat connector may use JNI, not sure the
> threads we are talking about had run through the code implemented
> with JNI.

Irrelevant.

> To dig out this root is not simple. Ideally, we should have the issue
>  reproduced and check what sort of thread synchronization problem it
> may be - to see if my above guess is the case.

Another big problem is that the team having the problem no longer cares
to investigate it.

> Or, Tomcat could be enhanced to prevent this sort synchronization 
> issue from happening.

It could, but you'll have a hard time getting anyone on the Tomcat team
to add the word "synchronized" to any part of the TC code.

> To have the thread scheduler single threaded with single CPU would be
>  safer/better, and a reasonable thing to do.

This is a terrible idea. One person has a threading issue somewhere and
so the entire Tomcat user community now needs to discard the ability to
use multiple processors? Foolish.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFfXcv9CaO5/Lv0PARAp7bAJ446ue9rSvIRO4I5ydbryVC4QrHQACdG5hN
Jtd8IeYxMlI3I334fPDHsPs=
=9Jdd
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to