Deadlock and max CPU in CoursesCalendarAdapter.calculateFirstMeetingStartTime
Description
At Oakland saw a deadlock that caused two threads to consume 100% cpu and hang. They are using OpenJDK 64-Bit Server VM (24.79-b02 mixed mode).
They used top and did shift-H to identify the java threads that were hanging; 4603 and 6874. Attached snippets of thread dumps from jstack and kill -3.
I noticed there are 3 thread dumps in catalina.out. Thread 850 (6874) is blocked in two of them, but running in the last. However it still seems to be at the exact same place despite 9 minutes of clock time between the dumps. Thread 833 (4603) is running in two of them, but blocked in the third. This further indicates this is the source of the issue.
At Oakland saw a deadlock that caused two threads to consume 100% cpu and hang. They are using OpenJDK 64-Bit Server VM (24.79-b02 mixed mode).
They used top and did shift-H to identify the java threads that were hanging; 4603 and 6874. Attached snippets of thread dumps from jstack and kill -3.
I noticed there are 3 thread dumps in catalina.out. Thread 850 (6874) is blocked in two of them, but running in the last. However it still seems to be at the exact same place despite 9 minutes of clock time between the dumps. Thread 833 (4603) is running in two of them, but blocked in the third. This further indicates this is the source of the issue.
Per http://www.gitshah.com/2011/02/deadly-deadlock-fixing-issue-with.html I think the solution is to refactor org.jasig.portlet.calendar.adapter.CoursesCalendarAdapter.calculateFirstMeetingStartTime and related methods to use joda time for calculations rather than Calendar.