This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 182669 - [69cat] NullPointerException at org.netbeans.modules.nativeexecution.PtyNativeProcess.waitResult
Summary: [69cat] NullPointerException at org.netbeans.modules.nativeexecution.PtyNativ...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
: 182744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-24 14:19 UTC by Vladimir Voskresensky
Modified: 2010-04-07 05:18 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 166893


Attachments
stacktrace (596 bytes, text/plain)
2010-03-24 14:20 UTC, Vladimir Voskresensky
Details
stacktrace (1.20 KB, text/plain)
2010-03-26 20:32 UTC, misterm
Details
stacktrace (1.20 KB, text/plain)
2010-03-26 20:43 UTC, misterm
Details
stacktrace (1.20 KB, text/plain)
2010-03-26 20:53 UTC, misterm
Details
screenshot.jpg (208.20 KB, image/jpeg)
2010-04-05 18:41 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2010-03-24 14:19:57 UTC
Build: NetBeans IDE Dev (Build 100324-9983c7b2019a)
VM: Java HotSpot(TM) Server VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: SunOS

User Comments:
vv159170: *6.197




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.nativeexecution.PtyNativeProcess.waitResult(PtyNativeProcess.java:122)
   at org.netbeans.modules.nativeexecution.AbstractNativeProcess.waitFor(AbstractNativeProcess.java:252)
   at org.netbeans.modules.nativeexecution.pty.IOConnectorImpl$Reaper.run(IOConnectorImpl.java:186)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1356)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1894)
Comment 1 Vladimir Voskresensky 2010-03-24 14:20:00 UTC
Created attachment 95683 [details]
stacktrace
Comment 2 Andrew Krasny 2010-03-24 14:48:54 UTC
confirmed.
Comment 3 Andrew Krasny 2010-03-24 15:22:49 UTC
The problem was that hostinfo.sh script wrongly detected this host operates in 64-bit mode...
Comment 4 Andrew Krasny 2010-03-24 15:31:09 UTC
Fixed: http://hg.netbeans.org/cnd-main/rev/6ac4bafdb460
Comment 5 Maria Tishkova 2010-03-25 15:21:39 UTC
*** Bug 182744 has been marked as a duplicate of this bug. ***
Comment 6 misterm 2010-03-26 20:32:18 UTC
Created attachment 96022 [details]
stacktrace
Comment 7 misterm 2010-03-26 20:43:30 UTC
Created attachment 96023 [details]
stacktrace
Comment 8 misterm 2010-03-26 20:53:29 UTC
Created attachment 96025 [details]
stacktrace
Comment 9 Andrew Krasny 2010-03-29 05:51:41 UTC
misterm,

could you, please, provide a scenario of how to reproduce the problem? 

Thanks, 
=Andrew
Comment 10 misterm 2010-03-29 13:37:03 UTC
It happens to me every time I try to execute a remote terminal. I'm using Windows XP and Java 1.6u4.
Comment 11 Andrew Krasny 2010-03-29 14:39:28 UTC
Seems to be the same issue as IZ182584

*** This bug has been marked as a duplicate of bug 182584 ***
Comment 12 Vladimir Voskresensky 2010-03-29 15:29:19 UTC
misterm, please, remove folder /var/tmp/dlight_* or /tmp/dlight_* on remote host.
Do you have remote Linux host?
Please, confirm if problem is fixed after removing remote folder, and restarting IDE.
Comment 13 Vladimir Voskresensky 2010-03-29 15:33:19 UTC
see http://netbeans.org/bugzilla/show_bug.cgi?id=183099
Comment 14 misterm 2010-03-29 16:24:51 UTC
Still doesn't work. There was indeed a directory on the remote server. I removed, but the last two reports in the exception reporter show the error still occurs.
Comment 15 Andrew Krasny 2010-03-29 16:42:14 UTC
Thanks for the info. What OS is on your remote host?

Could you, please, check what permissions are set to files named pty_open and process_start in /var/tmp/dlight_*/... 

=Andrew
Comment 16 misterm 2010-03-29 16:48:01 UTC
uname -a 
Linux SERVER_NAME 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux

[jboss42@SERVER_NAME bdad46e6]$ ls -al
total 32
drwxrwxr-x    2 jboss42  jboss42      4096 Mar 29 13:23 .
drwxrwxr-x    3 jboss42  jboss42      4096 Mar 29 13:23 ..
-rwxr-xr-x    1 jboss42  jboss42      9083 Mar 29 13:23 process_start
-rwxr-xr-x    1 jboss42  jboss42      9349 Mar 29 13:23 pty_open
Comment 17 Andrew Krasny 2010-03-29 21:12:44 UTC
I was able to reproduce the issue on 'slow' connection (from home).
I have made several improvements. It would be great if misterm can verify tomorrows build... 

Will not close for now, as will look at it more..

changeset: http://hg.netbeans.org/cnd-main/rev/6d93ec4b2a04
Comment 18 misterm 2010-03-30 12:39:23 UTC
Now it works for another server here, but still not for the one I've initially used. And when I try to connect to new server after a failed attempt to connect to the other one, I get bug # 183180.
Comment 19 Andrew Krasny 2010-03-30 13:42:37 UTC
OK, good... Thanks.
Comment 20 Andrew Krasny 2010-04-05 05:26:33 UTC
misterm,

could you, please, try it once again?

thanks, 
=Andrew
Comment 21 misterm 2010-04-05 18:41:07 UTC
Created attachment 96704 [details]
screenshot.jpg

Now I get this error
Comment 22 Andrew Krasny 2010-04-06 11:23:12 UTC
OK, thanks.

Could I ask you to do some experiments?
To start a process in a terminal I use 2 native applications.
The first one (seems it fails in your case) called pty_open, the second one - process_start

pty_open allocates a pty and does a loop that redirects 'attached' applications' I/O... 

so to try it:

- login to the 'problematic' host
- open a terminal and start pty_open without any arguments:

$ ./pty_open
PID: 12723
TTY: /dev/pts/17

It should report PID of the process and a string with the name of allocated pty (like above).

In another terminal you can test if process_start works:
Do not terminate started pty_open and try this:

$ ./process_start -p /dev/pts/17 /bin/ls
12856

It should start /bin/ls, report it's PID to the stdout and do all I/O in the specified pty... 


You can find pty_open and process_start using:

find /var/tmp/dlight_{user}/ -name process_start


Thanks, 
=Andrew
Comment 23 misterm 2010-04-06 16:25:07 UTC
Executing pty_open gives:


./pty_open: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by /pty_open)
Comment 24 Andrew Krasny 2010-04-07 05:08:13 UTC
Thanks!
This is the reason. 

From my side I have to improve logging of such problems (and show this message to the end user). And from your side you could either try to install all required libraries or try to compile pty_open on your machine... (cnd-main/dlight.nativeexecution/tools/pty_open.c in hg repository)..
Comment 25 Andrew Krasny 2010-04-07 05:18:48 UTC
I'm closing this one (as NPE is fixed).
To follow up the actual reason of failure I have opened   
Bug 183619 - pty_open silently fails in case of missing libraries