Bug 230040 - [Proxy] Hang when using system detected proxy with Gnome window manager
Summary: [Proxy] Hang when using system detected proxy with Gnome window manager
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 3.4 RC1   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-05-02 17:15 EDT by Francis Upton IV CLA
Modified: 2008-05-19 10:25 EDT (History)
3 users (show)

See Also:
Szymon.Brandys: review+
tomasz.zarna: review+


Attachments
Patch (2.15 KB, patch)
2008-05-06 02:43 EDT, Francis Upton IV CLA
no flags Details | Diff
Szymon's changes in Patch (3.70 KB, patch)
2008-05-07 09:42 EDT, Szymon Brandys CLA
no flags Details | Diff
Patch v03 (4.00 KB, patch)
2008-05-08 04:40 EDT, Szymon Brandys CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Upton IV CLA 2008-05-02 17:15:02 EDT
Build ID: I20080502-0100

Steps To Reproduce:
1. Start eclipse
2. Go to Preferences -> Network, select System Proxy Configuration
3. Then go to the CVS repository view (the eclipse source) and  open the HEAD branch.

Most times this will hang, regardless of the Gnome proxy settings.


More information:
This is caused by the latest patch that was checked in for bug  228738 (https://bugs.eclipse.org/bugs/attachment.cgi?id=97612).

I had previously diagnosed and fixed this issue with the patch here: https://bugs.eclipse.org/bugs/attachment.cgi?id=97572

But the subsequent patch (that was actually checked in) removed my fix in order to get the Gnome configuration in a lazy manner.  The fix is to make sure the Gnome configuration is accessed (using the native code) from the UI thread.
Comment 1 Francis Upton IV CLA 2008-05-02 17:19:30 EDT
Oh, and I'm running Fedora 8 on an x86_64 system, though I'm using 32-bit Java and Eclipse.
Comment 2 Francis Upton IV CLA 2008-05-02 17:36:00 EDT
Hi, I saw you change this to team, but the reason is happens in the CVS view is because CVS does the network access to the repository while not on the UI thread, and that causes the Gnome initialization (gconf calls) to be made on a thread other than the UI thread.

This has nothing to do with the team component and was caused by the system proxy detection stuff.

Have a look at this comment for more details:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=228738#c7
Comment 3 Szymon Brandys CLA 2008-05-02 17:45:40 EDT
Francis, the proxy manager is owned by the team component. That's why Oleg reassigned it to Team.

As I understand the problem is related to lazy initialization introduced by one of the patches in bug 228738. Moreover I see that it is reproducible. We will return to the previous version then.

If bug 228738 is reopened, this bug is its duplicate, right? However I think that we should leave 228738 closed, since the work related to it is already in cvs. This bug is about special case related to threads.
Comment 4 Francis Upton IV CLA 2008-05-02 17:49:32 EDT
(In reply to comment #3)
> Francis, the proxy manager is owned by the team component. That's why Oleg
> reassigned it to Team.
> 
> As I understand the problem is related to lazy initialization introduced by one
> of the patches in bug 228738. Moreover I see that it is reproducible. We will
> return to the previous version then.
> 
> If bug 228738 is reopened, this bug is its duplicate, right? However I think
> that we should leave 228738 closed, since the work related to it is already in
> cvs. This bug is about special case related to threads.
> 
I agree, I just closed 228738.

Do you want me to do a patch to make this right?

Comment 5 Szymon Brandys CLA 2008-05-02 18:03:05 EDT
Sure. I will apply it on Monday.
Comment 6 Francis Upton IV CLA 2008-05-05 03:11:31 EDT
(In reply to comment #5)
> Sure. I will apply it on Monday.
> 

I was not able to get to the patch for this and the other UI issue this weekend, but I can do it on Monday (my time).  Sorry about the delay.
Comment 7 Francis Upton IV CLA 2008-05-06 02:43:40 EDT
Created attachment 98752 [details]
Patch

Fixes the initialization to be back on the main thread.  Tested several times (you need to restart eclipse each time and test with CVS) and it works correctly.
Comment 8 Szymon Brandys CLA 2008-05-07 05:42:39 EDT
Adding Tomek as RC1 committer/reviewer.
Comment 9 Szymon Brandys CLA 2008-05-07 09:42:39 EDT
Created attachment 99070 [details]
Szymon's changes in Patch
Comment 10 Szymon Brandys CLA 2008-05-07 09:47:46 EDT
Francis, could you please check if the latest changes works fine for you?
Comment 11 Francis Upton IV CLA 2008-05-07 10:29:00 EDT
(In reply to comment #10)
> Francis, could you please check if the latest changes works fine for you?
> 

Just a minor comment, I see you are relying on the flag to not make calls to the native code if the library is not loaded (which is fine, and better).  However, if you are doing that then the UnsatisfiedLinkException when accessing the gnome libraries should be logged as an error since it's not expected (and could indicate some kind of bug).

But as I said this is a minor point.
Comment 12 Szymon Brandys CLA 2008-05-07 11:57:39 EDT
Right. Good remark.
Comment 13 Szymon Brandys CLA 2008-05-08 04:40:30 EDT
Created attachment 99239 [details]
Patch v03
Comment 14 Tomasz Zarna CLA 2008-05-09 05:49:03 EDT
Reviewed and released to HEAD with some minor modifications.
Comment 15 Szymon Brandys CLA 2008-05-19 10:25:32 EDT
Verified.