Runtime.exec() affects other threads?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anastasios Kotsikonas

    Runtime.exec() affects other threads?


    Hi all,

    here's the situtation:

    1) JDK 1.4.2_02 & Tomcat 4.1.x (no difference with any 1.4.x)

    2) Multiple threads (testing with 5) access non-sync methods in a single instance of a class
    with ThreadLocals as appropriate (turns out using different instances
    of the class sans ThreadLocal doesn't change anything)

    3) One of the methods does a Runtime.exec() - when this happens,
    only one or two (and only once, all five) threads were
    able to execute and return normally. The other threads seem to
    abort with no trace and are returned to the pool, if a thread
    dump during a successful call by one of the threads to Runtime.exec()
    (which takes time to complete) is any indication... and I don't see any
    exceptions...
    Making that method sync does not help.

    I've read in other topics that Runtime.exec has buffer overflow
    problems??? Any ideas?

    tia

Working...