Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 115648 - SWT error (No more handles) thrown when running Manual Test View on SMP Linux.
Summary: SWT error (No more handles) thrown when running Manual Test View on SMP Linux.
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 201850 (view as bug list)
Depends on: 115822 115857
Blocks:
  Show dependency tree
 
Reported: 2005-11-09 11:29 EST by Samson Wai CLA
Modified: 2016-05-05 10:29 EDT (History)
2 users (show)

See Also:


Attachments
Test class. (1.90 KB, application/octet-stream)
2005-11-09 12:20 EST, Paul Slauenwhite CLA
no flags Details
Test class with a SWT Browser. (2.22 KB, application/octet-stream)
2006-04-11 15:50 EDT, Paul Slauenwhite CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samson Wai CLA 2005-11-09 11:29:46 EST
I have tried using both RAC and IAC and the manual test client does not come up.
It prints an exception like the following:

org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
	at org.eclipse.swt.SWT.error(SWT.java:2968)
	at org.eclipse.swt.widgets.Display.createDisplay(Display.java:757)
	at org.eclipse.swt.widgets.Display.create(Display.java:746)
	at org.eclipse.swt.graphics.Device.<init>(Device.java:141)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:429)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:420)
	at
org.eclipse.tptp.test.manual.runner.ui.internal.ManualTestView.<init>(ManualTestView.java:125)
	at
org.eclipse.tptp.test.manual.runner.core.internal.ManualTestRunner.main(ManualTestRunner.java:194)
Comment 1 Paul Slauenwhite CLA 2005-11-09 11:47:08 EST
Configuration: RHEL v4 with the IBM JRE v1.4.2.
Comment 2 Paul Slauenwhite CLA 2005-11-09 12:17:59 EST
SWT requires the following libraries with the specified versions or later: 

-GTK 2.2.1 
-ATK 1.2.0 
-glib 2.2.1 
-Pango 1.2.1 
-Freetype 2.1.3 

The test machine is at gtk2-2.4.13-12 and an uplevel of all other packages.
Comment 3 Paul Slauenwhite CLA 2005-11-09 12:19:32 EST
This line of code in the Manual Test View simply creates a new display:

Display display = new Display();

Confirming no other SWT dependencies required for Linux.
Comment 4 Paul Slauenwhite CLA 2005-11-09 12:20:41 EST
Created attachment 29620 [details]
Test class.

SWT libraries shipped in the Agent Controller or the workbench are required to
run this test class.
Comment 5 Paul Slauenwhite CLA 2005-11-09 12:21:27 EST
(In reply to comment #4)

Test class does not produce the symptoms on the test machine.
Comment 6 Paul Slauenwhite CLA 2005-11-09 12:32:16 EST
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=106396#c7
Comment 7 Paul Slauenwhite CLA 2005-11-09 12:42:55 EST
[Eclipse Project Release Notes, Release 3.1.1]

gtk_init_check and X11 socket failure when using the IBM 1.4.2 JRE (GTK only)
Under RHEL 3.1 with the IBM 1.4.2 JRE and a large number of plugins, Eclipse 
may fail to launch with an exception from gtk_init_check along with this error:

_X11TransSocketOpen: socket() failed for local
_X11TransSocketOpenCOTSClient: Unable to open socket for local

A workaround is to set the environment variable JAVA_HIGH_ZIPFDS to a value of 
500 before starting Eclipse. (bug 106396)

Comment 8 Paul Slauenwhite CLA 2005-11-09 12:46:35 EST
Potential for a readme entry.  Originator is testing this potential 
workaround.  Potential readme entry:

For Linux, you must create an environment variable called
JAVA_HIGH_ZIPFDS and set its value to a high number, such as 500, to tell
the IBM JRE to create that many file descriptors in a separate area of
memory for later use. 

Comment 9 Paul Slauenwhite CLA 2005-11-09 12:47:23 EST
Highly desirable and planned for this release, but not stop ship
Prevents function from being used, but a work around is possible
Comment 10 Paul Slauenwhite CLA 2005-11-09 15:47:55 EST
This is only happening on the originator test machine.  As such, it appears to 
be a configuration issue or SWT defect.  Still investigating....
Comment 11 Paul Slauenwhite CLA 2005-11-10 08:58:49 EST
Two different test machines, each with the required SWT dependencies, produce 
differing test results:

Test machine 1 (Originator's machine - purple):

OS: Linux purple 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 
i386 GNU/Linux
GTK: gtk2-2.4.13-12
ATK: atk-1.8.0-2
glib: glib-1.2.10-15/glib2-2.4.7-1
Pango: pango-1.6.0-7
Freetype: freetype-2.1.9-1

Test machine 2 (Tester's machine - dungeon):

OS: Linux dungeon 2.6.9-11.ELsmp #1 Fri May 20 18:17:57 EST 2005 i686 i686 i386 
GNU/Linux
GTK: gtk2-2.4.13-14
ATK: atk-1.8.0-2
glib: glib-1.2.10-15/glib2-2.4.7-1
Pango: pango-1.6.0-9
Freetype: freetype-2.1.9-1
Comment 12 Paul Slauenwhite CLA 2005-11-10 09:36:23 EST
(In reply to comment #11)

NOTE:  The machine producing the symptoms is a multiprocessor machine with a 
different Linux kernel.
Comment 13 Paul Slauenwhite CLA 2005-11-10 09:53:57 EST
(In reply to comment #8)

Potential workaround did not work.

Comment 14 Paul Slauenwhite CLA 2005-11-10 10:08:51 EST
Opened SWT bug report (https://bugs.eclipse.org/bugs/show_bug.cgi?id=115822).  
Since there is no solution to this problem and the problem is with a TPTP 
dependency, deferring to the TPTP v4.2 release.
Comment 15 Marius Slavescu CLA 2005-11-10 10:38:25 EST
Can you run Eclipse/TPTP or Manual Test Client directly (not through IAC or AC)
the dual CPU machine?
Comment 16 Paul Slauenwhite CLA 2005-11-10 11:06:00 EST
(In reply to comment #15)

Eclipse/TPTP works independent of IAC or Agent Controller.  However, the Manual 
Test View does not work independent of IAC or Agent Controller 
(org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]).
Comment 17 Marius Slavescu CLA 2005-11-10 11:18:54 EST
My question was if you were able to run Eclipse or TPTP on that machine or you
get the same error?

You should be able to run Manual Test client independently, please let me know
if you need help to do that.
Comment 18 Paul Slauenwhite CLA 2005-11-10 11:22:27 EST
(In reply to comment #17)

See Comment #16.

Comment 19 Marius Slavescu CLA 2005-11-10 11:33:40 EST
Is it yes or not? sorry but I cannot infer that anwser from Comment #16 :-)
Comment 20 Paul Slauenwhite CLA 2005-11-10 11:43:50 EST
(In reply to comment #19)

The Manual Test View does not work independent of IAC or Agent Controller 
(org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]).
Comment 21 Paul Slauenwhite CLA 2005-11-10 12:41:09 EST
(In reply to comment #20)

This defect occurs when running the Manual Test View on SMP Linux with the 
following scenarios:

1) Manual Test View executed by the IAC.
2) Manual Test View executed by the Agent Controller.
3) Manual Test View executed stand-alone (see defect #115822).
Comment 22 Paul Slauenwhite CLA 2006-02-20 12:42:45 EST
Targeting to the next iteration since this defect is blocked by SWT defect 115822.
Comment 23 Paul Slauenwhite CLA 2006-04-03 14:57:50 EDT
No change in state for dependent SWT defect.  As such, cannot contain in TPTP V4.2.0 (i2).
Comment 24 Paul Slauenwhite CLA 2006-04-11 12:29:24 EDT
Update the manual test runner to return an error message to the launching client workbench instructing the user of the issue and any possible solution.
Comment 25 Paul Slauenwhite CLA 2006-04-11 15:50:18 EDT
Created attachment 38323 [details]
Test class with a SWT Browser.
Comment 26 Andy (Aleksander) Rozman CLA 2006-05-14 11:17:13 EDT
(In reply to comment #25)
> Created an attachment (id=38323) [edit]
> Test class with a SWT Browser.
> 

Hi !

I noticed the same problem with non-SMP kernel in FreeBSD. I am FreeBSD user, and I have SWT library (3.1) installed on two computers. One is working ok, but other is not. Only difference betwen computers is that one is connected to internal network (that one is working), and the other one is connected to internet directly (through other internet line). I have tried to "fix" all 4 points and I have somewhat succeeded.

1. The DISPLAY environment variable is unset
    I have set it to localhost:0
2. The host/port information is wrong
    I have added my hostname to /etc/hosts and X doesn't complain anymore
3. The X server is down
    IS NOT.
4. The socket to the X server is on too high of a file descriptor
    Mhm. i can't do anything with this. I tried to set that JAVA_HIGH...    
    variable, but it doesn't work on FreeBSD

I am using FreeBSD 6.1 (RC1 on first computer and RELEASE on second), Java version 1.5.0_06 (I tried with both versions, with home build and that that is available as download now). Application producing this error is Azureus. Computer is AMD 2.2 Gb (Single core 32-bit), 512 Mb of memory.

I have also tried with this sample in this forum, and I get the same problem.

Andy
Comment 27 Samson Wai CLA 2006-05-24 13:04:41 EDT
*** Bug 138596 has been marked as a duplicate of this bug. ***
Comment 28 Ahmed Farrag CLA 2006-05-25 13:22:20 EDT
This bug is blocking bidi testing activities, we are expecting a fix for this bug before eclipse 3.2 is shipped in order to verify and close these bugs.
Comment 29 Paul Slauenwhite CLA 2006-05-31 16:29:14 EDT
(In reply to comment #26)

Andy, thanks for your comments.  This defect (SMP Linux IA32) has been verified as working as designed using TPTP V4.2.0.  Please open a SWT defect for your issue with the sample code from this defect (https://bugs.eclipse.org/bugs/attachment.cgi?id=38323).
Comment 30 Paul Slauenwhite CLA 2006-05-31 16:48:56 EDT
Using the TPTP-4.2.0-200605290100 workbench and Agent Controller (SWT V3.2 RC6) on the SMP test machine (Linux purple 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux) and IBM JRE V1.5.0 (SR 2), the Manual Test View is working as designed after verifying the following:

 1. The DISPLAY environment variable is set.
 2. The host/port information is correct (e.g. added to /etc/hosts). 
 3. The X server is up.

Opened defect https://bugs.eclipse.org/bugs/show_bug.cgi?id=144777 to address the information dialog (https://bugs.eclipse.org/bugs/show_bug.cgi?id=115648#c24).
Comment 31 Paul Slauenwhite CLA 2006-11-16 09:03:12 EST
ACTION: Please verify/close this defect.
Comment 32 Samson Wai CLA 2006-11-16 09:09:43 EST
Closing.
Comment 33 Shane Hathaway CLA 2007-01-05 19:28:16 EST
I ran into this problem as well.  I could not solve until I noticed a peculiarity in the environment tab of the run configuration dialog: normally, the radio buttons "Append environment to native environment" and "Replace native environment with the specified environment" are available, but in this case they are both disabled and grayed out.  I suppose this means the environment is replaced rather than appended, which is most certainly not what I want.  In any case, I worked around this by manually configuring the DISPLAY and HOME environment variables.  I looked at /proc/$pid/environ to confirm these variables did not exist in the environment.

I suggest that these radio buttons should not be disabled, and append should be the default, as it is when not running under the profiler.
Comment 34 Paul Slauenwhite CLA 2007-01-16 09:44:50 EST
(In reply to comment #33)

Thanks Shane for this information.  When the user launches a TPTP Manual Test using the Test Launch Configuration (opposed to a SWT Applciat5ion Launch Configuration), the Environment tab is not exposed since the Manual Test View is launched by the Integrated/Agent Controller using its configuration.  Ultimately, the DISPLAY and HOME environment variables must be configured on the machine (as well as Mozilla) for the Manual Test View to successfully launch.
Comment 35 Paul Slauenwhite CLA 2007-10-01 14:10:13 EDT
*** Bug 201850 has been marked as a duplicate of this bug. ***