[jboss-dev-forums] [Design of POJO Server] - Strange classloading behavior -- thread stuck
bstansberry@jboss.com
do-not-reply at jboss.com
Mon Feb 2 14:18:23 EST 2009
When testing mod_cluster, Bela's reported a couple different occurences where a thread appears to be unable to make progress inside some jboss-cl code. The thread is bringing messages up from the cluster which has the effect of locking up the cluster.
Bela provided some thread dump info, which I'll post below. I've been poking around in the relevant code, but it's intricate enough that I'd better call in the experts. In all cases the thread that isn't progressing is inside this section of ClassLoaderManager.unregisterLoaderInThread():
| // Any ThreadTasks associated with this thread must be reassigned
| List<ThreadTask> taskList = loadTasksByThread.get(thread);
| if (taskList != null)
| {
| synchronized (taskList)
| {
| while (taskList.isEmpty() == false)
| {
| ThreadTask threadTask = taskList.remove(0);
| ClassLoadingTask loadTask = threadTask.getLoadTask();
| Thread requestingThread = loadTask.getRequestingThread();
| if( trace )
| log.trace("Reassigning task: " + threadTask+" to " + requestingThread);
| threadTask.setThread(null);
| // Insert the task into the front of requestingThread task list
| List<ThreadTask> toTaskList = loadTasksByThread.get(requestingThread);
| synchronized (toTaskList)
| {
| toTaskList.add(0, threadTask);
| loadTask.nextEvent();
| toTaskList.notify();
| }
| }
| }
| }
Specifically, it's inside the "while (taskList.isEmpty() == false)" block, which leads me to question whether somehow the taskList is never empty. (Uneducated guess: somehow taskList == toTaskList, so this becomes a loop adding and removing threadTask???)
Will post stack traces separately and inform Bela of this thread so he can answer any questions about what exactly he was doing.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206331#4206331
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206331
More information about the jboss-dev-forums
mailing list