This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Interrupted Exception when re-executing a WebApp on Internal Tomcat | ||
---|---|---|---|
Product: | platform | Reporter: | Sakthivel Gopal <sakthivelg> |
Component: | -- Other -- | Assignee: | Petr Nejedly <pnejedly> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | cfqacore, dstrupl, jtulach, ttran |
Priority: | P2 | Keywords: | API |
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows 3.1/NT | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Possible solution for the problem. |
Description
Sakthivel Gopal
2002-04-04 22:50:41 UTC
looks like core problem looks like problem in internal execution the problem is in Mutex. When the IDE executing something and then abruptly kills the execution it also spawns a watcher thread . This thread is the one who is trying to enter the Mutex. However approx. at the same time the IDE is also killing (interrupting?) the watcher thread causing InterruptedException to be thrown somewhere deep inside Mutex. Mutex should rethrow the exception up. Instead of it it reports the exception to the user. From the design point of view I thinks this is wrong. Exceptions should be caught at the level where there is enough information to process them. What now? We can either extend the signiature of Mutex.enter() to have it throw InterruptedException (== breaking backward comp) or silently swallow the exc, or something else? Assigning to Petr Nejedly to investigate further We can swallow the exception or only put it into the log, it should not harm anything (The code in mutex will not give up). Anyway, the IDE should not interrupt the watcher thread should it? From looking at the code, it seems that only the execution thread gets interrupted, not any watcher thread, and that the problem is that: The started Runnable gets interruped, stops its processing but doesn't clear the interruped status, so the next sleep will throw InterruptedException. IMHO the best solution to teh problem is to call Thread.interruped() just after the user runnable to clear the status. lets the Created attachment 5333 [details]
Possible solution for the problem.
I can't reproduce it here and web folks told me that it happens only about once a month to them, so I have hard time testing it, but I've developed a possible fix for it. I've attached a testing jar, please try to place it to <instalation>/lib/patches and report us whether the problem persists. I've placed the "possible solution" to trunk. Still waiting for confirmation from the reporter. Great! This seems to work now. I have copied the jar into <IDEHOME>/lib/patches. Tried to execute my web app multiple times (execute force/reload), it worked without this Interrupted exception. If I remove this patch jar and repeat this exercise, i get everytime i execute my web app. So, this patch is a cool fix ! Thanks, Sakthi Good news indeed. Petr, please integrate this fix into trunk and ask for integration into orion_fcs. Thanks Thanks for testing. The fix works so I've integrated it in orion_fcs as well. Sakthi, please verify this in Orion, thanks in advance. Verified this Orion Builds and now in Siera Build 020817. I am able to "execute forace load" a servlet when tomcat is running and there's no interrupted exception. Hence closing this issue. -sakthi |