Bug 257123 - Eclipse workbench deadlock when attaching sources
Summary: Eclipse workbench deadlock when attaching sources
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 RC4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL: http://www.rim.com
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2008-12-01 14:21 EST by Cristian Malinescu CLA
Modified: 2009-06-15 12:39 EDT (History)
3 users (show)

See Also:


Attachments
MyMaangedBean.java file (5.15 KB, text/plain)
2008-12-01 14:21 EST, Cristian Malinescu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Malinescu CLA 2008-12-01 14:21:09 EST
Created attachment 119198 [details]
MyMaangedBean.java file

Build ID:  M20080911-1700

Steps To Reproduce:
Introduction:
The scenario and the steps mentioned here reflect exactly an existing scenario and the steps we take for developing with Eclipse for some of our internal workspaces. Apache Geronimo and Log4J are mentioned solely for exemplifying purposes.  

I. System:
   - Dell/Intel Core 2 6600 processor
   - 2GB RAM
   - Windows XP Pro SP3
   - SUN Java 5.0 SDK/RTE build 016.
   - Eclipse SDK 3.4.1

II. Prerequisites:
1. Download Apache Geronimo Windows binaries archive and unpack locally.

2. Get locally the latest revision of the Apache Geronimo trunk sources.

3. Create a new Eclipse workspace.

4. Create a new Java project, let’s call it ‘p00’, chose to separate the sources and the binaries.  

5. Create a new Elipse user-library classpath container, name it MYLIB.

6. From the Geronimo binaries path add geronimo-kernel-2.1.3.jar and geronimo-transformer-2.1.3.jar as dependencies wrapped by the MYLIB container.

7. Using the Apache Log4J binaries path do the same for log4j-1.2.15.jar.

8. In the p00 project -> Properties -> Java Build Path -> Libraries chose *Add Library* -> User Library and select the previously created MYLIB container.

9. In the p00 src folder create a new type/class, name it   net.rim.test.my.MyManagedBean. 

10. Make this class implement  org.apache.geronimo.kernel.proxy.GeronimoManagedBean interface.

11. Complete the getStateInstance() method like the snippet:

/**
     * Gets the state of this component as a State instance.
     *
     * @return the current state of this component
     */
    public State getStateInstance() {
    	State state = State.fromInt(getState());
    	
    	if (log.isDebugEnabled())
    		log.debug(state.getName() + ", " + state.getEventTypeValue());
    	
    	return state;
    }

12. Save the project and the workspace

13. Via Eclipse copy-and-paste operation multiply p00 99 times, so that you end up with 100 projects in the workspace, the last one being *p99*.


III. Test problem flow:
14. Open the p90 project and expand/navigate to its MyManagedBean.java file. Into the 
getStateInstance() method, position your selection on the *fromInt* segment of the code
into the first line of the method body.  

15. Press F3 or chose from the context menu *Open Declaration*.

16. In the Class File Editor execute *Attach Source* action. 

17. In the *Source Attachment Configuration* dialog execute *External Folder …* action. 

18. Navigate your filesystem for the repository location where you stored Apache Geronimo sources.  Execute *OK* and observe.
The *Progress Operation*/*Operation in progress …* modal dialog and monitor
get started. The machine usage sky-rockets, nothing responds anymore on the machine for some tens of seconds, then suddenly the usage drops to 0 and Eclipse workbench is blocked, not responding anymore, deadlocked. In the Windows Task Manager the Eclipse process reports deadlock context, no CPU nor memory usage variations. The developer can continue only by killing the Eclipse process and restarting the workbench.    



More information:
Disclaimer:
The libraries/API mentioned here are solely for the purpose of reporting a problem we encounter for our internal development, and it is not an indication of their usage for the purpose of developing applications by RIM or its partners.
Comment 1 Mike CLA 2008-12-02 12:10:10 EST
Filed with the wrong project, ACTF = Accessibility Tools Framework. Think you wanted ATF or WebTools or something more appropriate.
Comment 2 Cristian Malinescu CLA 2008-12-02 12:26:49 EST
Actually, ACTF was selected automatically for me after entering the Eclipse build id.   
Comment 3 Jerome Lanneluc CLA 2008-12-05 11:19:16 EST
Unfortunately, even with good steps deadlock are hard to reproduce. Instead could you please take a thread dump (see http://wiki.eclipse.org/index.php/How_to_report_a_deadlock) and attach it to this bug?
Comment 4 Olivier Thomann CLA 2009-06-12 11:20:29 EDT
Closing as WORKSFORME. Please reopen once the requested info is provided.
Comment 5 Olivier Thomann CLA 2009-06-15 12:39:13 EDT
Verified.