Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 153389 - Re: Failure to connect to C/C++ Development Host
Re: Failure to connect to C/C++ Development Host
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: -- Other --
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Sergey Grinev
issues@cnd
65fixes2-verified
:
: 153621 153762 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-18 14:41 UTC by twhite
Modified: 2009-02-19 20:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description twhite 2008-11-18 14:41:21 UTC
I am trying to add a remote development server in the new NetBeans 6.5RC2 bundle.  The development server has a valid 
SSH login account (confirmed access with our SecureCRT SSH terminal application) and has the latest version of the 
SUNWspro package installed on it.

The project is hosted on the development server and shared via NFS (mounted locally with Humingbird NFS Client).  I 
confirmed that the project directory is readable and writable from my desktop.

I see a lot of NFS and some SSH traffic when I initially try to add the host (for about 30 seconds), and then it hangs 
with a status of "Initializing...".  If I "Cancel" the request, any subsequent attempts to connect will hang the entire 
application.  I have to use the Windows Task Manager to kill the java process.

I don't see a way to log what it is trying to do, so I can't tell what isn't working.    

Below are the thread states (from the JavaMonitor) of Netbeans on a subsequent attempt to connect to the server.

Name: Reference Handler
State: WAITING on java.lang.ref.Reference$Lock@19f4192
Total blocked: 0  Total waited: 235

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)


Name: Finalizer
State: WAITING on java.lang.ref.ReferenceQueue$Lock@335aa
Total blocked: 14  Total waited: 180

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

Name: Signal Dispatcher
State: RUNNABLE
Total blocked: 0  Total waited: 0

Stack trace: 


Name: Attach Listener
State: RUNNABLE
Total blocked: 0  Total waited: 0

Stack trace: 


Name: Active Reference Queue Daemon
State: WAITING on java.lang.ref.ReferenceQueue$Lock@1e956bd
Total blocked: 0  Total waited: 92

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
org.openide.util.Utilities$ActiveQueue.run(Utilities.java:3088)
java.lang.Thread.run(Thread.java:619)

Name: CLI Requests Server
State: RUNNABLE
Total blocked: 0  Total waited: 0

Stack trace: 
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
   - locked java.net.SocksSocketImpl@10613e
java.net.ServerSocket.implAccept(ServerSocket.java:453)
java.net.ServerSocket.accept(ServerSocket.java:421)
org.netbeans.CLIHandler$Server.run(CLIHandler.java:1010)


Name: Timer-0
State: TIMED_WAITING on java.util.TaskQueue@6d1158
Total blocked: 28  Total waited: 20,927

Stack trace: 
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:509)
java.util.TimerThread.run(Timer.java:462)

Name: Code Model Parser 1
State: WAITING on java.lang.Object@ac6995
Total blocked: 4  Total waited: 11

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserQueue.waitReady(ParserQueue.java:415)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread._run(ParserThread.java:87)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:66)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:89)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)


Name: Java2D Disposer
State: WAITING on java.lang.ref.ReferenceQueue$Lock@12c03ac
Total blocked: 0  Total waited: 85

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
sun.java2d.Disposer.run(Disposer.java:125)
java.lang.Thread.run(Thread.java:619)


Name: AWT-Shutdown
State: WAITING on java.lang.Object@f2eb18
Total blocked: 0  Total waited: 14

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
java.lang.Thread.run(Thread.java:619)


Name: AWT-Windows
State: RUNNABLE
Total blocked: 5  Total waited: 4

Stack trace: 
sun.awt.windows.WToolkit.eventLoop(Native Method)
sun.awt.windows.WToolkit.run(WToolkit.java:290)
java.lang.Thread.run(Thread.java:619)

Name: Repository writer 0
State: TIMED_WAITING
Total blocked: 7  Total waited: 3,606

Stack trace: 
java.lang.Thread.sleep(Native Method)
org.netbeans.modules.cnd.repository.queue.RepositoryWritingThread.waitReady(RepositoryWritingThread.java:94)
org.netbeans.modules.cnd.repository.queue.RepositoryWritingThread.run(RepositoryWritingThread.java:128)
org.netbeans.modules.cnd.repository.queue.RepositoryThreadManager$Wrapper.run(RepositoryThreadManager.java:84)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

Name: Thread-3
State: WAITING on java.util.LinkedList@18f5c10
Total blocked: 0  Total waited: 1

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1461)


Name: Code Model Parser 0
State: WAITING on java.lang.Object@ac6995
Total blocked: 3  Total waited: 5

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserQueue.waitReady(ParserQueue.java:415)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread._run(ParserThread.java:87)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:66)
org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:89)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)


Name: TimerQueue
State: TIMED_WAITING on javax.swing.TimerQueue@147bc1e
Total blocked: 14  Total waited: 63,387

Stack trace: 
java.lang.Object.wait(Native Method)
javax.swing.TimerQueue.run(TimerQueue.java:236)
java.lang.Thread.run(Thread.java:619)


Name: AWT-EventQueue-1
State: BLOCKED on java.lang.String@44dd8c owned by: Default RequestProcessor
Total blocked: 1,860  Total waited: 20,930

Stack trace: 
org.netbeans.modules.cnd.remote.server.RemoteServerRecord.resetOfflineState(RemoteServerRecord.java:165)
org.netbeans.modules.cnd.remote.ui.EditServerListDialog.revalidateRecord(EditServerListDialog.java:145)
org.netbeans.modules.cnd.remote.ui.EditServerListDialog.showAddServerDialog(EditServerListDialog.java:235)
org.netbeans.modules.cnd.remote.ui.EditServerListDialog.actionPerformed(EditServerListDialog.java:310)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
java.awt.Component.processMouseEvent(Component.java:6041)
javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
java.awt.Component.processEvent(Component.java:5806)
java.awt.Container.processEvent(Container.java:2058)
java.awt.Component.dispatchEventImpl(Component.java:4413)
java.awt.Container.dispatchEventImpl(Container.java:2116)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
java.awt.Container.dispatchEventImpl(Container.java:2102)
java.awt.Window.dispatchEventImpl(Window.java:2440)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
java.awt.Dialog$1.run(Dialog.java:1045)
java.awt.Dialog$3.run(Dialog.java:1097)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Dialog.show(Dialog.java:1095)
org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:867)
org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:901)
org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:889)
org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:109)
org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
org.openide.util.Mutex.readAccess(Mutex.java:268)
org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:874)
java.awt.Component.show(Component.java:1422)
java.awt.Component.setVisible(Component.java:1375)
java.awt.Window.setVisible(Window.java:806)
java.awt.Dialog.setVisible(Dialog.java:985)
org.netbeans.modules.cnd.remote.server.RemoteServerList.show(RemoteServerList.java:266)
org.netbeans.modules.cnd.ui.options.ToolsPanel.editDevHosts(ToolsPanel.java:975)
org.netbeans.modules.cnd.ui.options.ToolsPanel.actionPerformed(ToolsPanel.java:905)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
java.awt.Component.processMouseEvent(Component.java:6041)
javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
java.awt.Component.processEvent(Component.java:5806)
java.awt.Container.processEvent(Container.java:2058)
java.awt.Component.dispatchEventImpl(Component.java:4413)
java.awt.Container.dispatchEventImpl(Container.java:2116)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
java.awt.Container.dispatchEventImpl(Container.java:2102)
java.awt.Window.dispatchEventImpl(Window.java:2440)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


Name: DestroyJavaVM
State: RUNNABLE
Total blocked: 0  Total waited: 0

Stack trace: 


Name: Class View Updater
State: WAITING on java.lang.Object@188e507
Total blocked: 0  Total waited: 1

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.netbeans.modules.cnd.classview.ClassViewUpdater$BlockingQueue.get(ClassViewUpdater.java:65)
org.netbeans.modules.cnd.classview.ClassViewUpdater.run(ClassViewUpdater.java:144)


Name: org.netbeans.modules.gsfret.source.usages.RepositoryUpdater
State: WAITING on java.util.TaskQueue@128fa3c
Total blocked: 0  Total waited: 1

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
java.util.TimerThread.mainLoop(Timer.java:483)
java.util.TimerThread.run(Timer.java:462)

Name: Default RequestProcessor
State: WAITING on java.lang.Object@d13e2e
Total blocked: 5  Total waited: 19

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.netbeans.modules.tasklist.impl.FileScanningWorker.run(FileScanningWorker.java:205)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)


Name: GSF Source Worker Thread
State: TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@fe9552
Total blocked: 0  Total waited: 1,538

Stack trace: 
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
java.util.concurrent.PriorityBlockingQueue.poll(PriorityBlockingQueue.java:245)
org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1337)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)


Name: RMI TCP Accept-0
State: RUNNABLE
Total blocked: 0  Total waited: 0

Stack trace: 
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
   - locked java.net.SocksSocketImpl@11e05d3
java.net.ServerSocket.implAccept(ServerSocket.java:453)
java.net.ServerSocket.accept(ServerSocket.java:421)
sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
java.lang.Thread.run(Thread.java:619)


Name: RMI Scheduler(0)
State: TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@131a519
Total blocked: 0  Total waited: 7

Stack trace: 
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:582)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:575)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:946)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:906)
java.lang.Thread.run(Thread.java:619)


Name: JMX server connection timeout 46
State: TIMED_WAITING on [I@117843d
Total blocked: 0  Total waited: 55

Stack trace: 
java.lang.Object.wait(Native Method)
com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150)
java.lang.Thread.run(Thread.java:619)


Name: RMI TCP Connection(3)-192.9.201.12
State: RUNNABLE
Total blocked: 2  Total waited: 0

Stack trace: 
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
java.io.BufferedInputStream.read(BufferedInputStream.java:237)
   - locked java.io.BufferedInputStream@1a75ed4
java.io.FilterInputStream.read(FilterInputStream.java:66)
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:517)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)


Name: RMI TCP Connection(5)-192.9.201.12
State: TIMED_WAITING on com.sun.jmx.remote.internal.ArrayNotificationBuffer@1394e2d
Total blocked: 0  Total waited: 29

Stack trace: 
java.lang.Object.wait(Native Method)
com.sun.jmx.remote.internal.ArrayNotificationBuffer.fetchNotifications(ArrayNotificationBuffer.java:417)
com.sun.jmx.remote.internal.ArrayNotificationBuffer$ShareBuffer.fetchNotifications(ArrayNotificationBuffer.java:209)
com.sun.jmx.remote.internal.ServerNotifForwarder.fetchNotifs(ServerNotifForwarder.java:258)
javax.management.remote.rmi.RMIConnectionImpl$2.run(RMIConnectionImpl.java:1227)
javax.management.remote.rmi.RMIConnectionImpl$2.run(RMIConnectionImpl.java:1225)
javax.management.remote.rmi.RMIConnectionImpl.fetchNotifications(RMIConnectionImpl.java:1231)
sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
sun.rmi.transport.Transport$1.run(Transport.java:159)
java.security.AccessController.doPrivileged(Native Method)
sun.rmi.transport.Transport.serviceCall(Transport.java:155)
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)
Name: Default RequestProcessor
State: RUNNABLE
Total blocked: 11  Total waited: 162

Stack trace: 
java.lang.ProcessImpl.waitFor(Native Method)
org.netbeans.modules.cnd.remote.mapper.HostMappingProviderWindows.findMappings(HostMappingProviderWindows.java:66)
org.netbeans.modules.cnd.remote.mapper.HostMappingsAnalyzer.populateMappingsList(HostMappingsAnalyzer.java:103)
org.netbeans.modules.cnd.remote.mapper.HostMappingsAnalyzer.getMappings(HostMappingsAnalyzer.java:69)
org.netbeans.modules.cnd.remote.mapper.RemotePathMap.init(RemotePathMap.java:121)
   - locked java.util.HashMap@994311
org.netbeans.modules.cnd.remote.mapper.RemotePathMap.<init>(RemotePathMap.java:88)
org.netbeans.modules.cnd.remote.mapper.RemotePathMap.getMapper(RemotePathMap.java:70)
   - locked java.util.HashMap@3d0d8d
org.netbeans.modules.cnd.remote.server.RemoteServerRecord.init(RemoteServerRecord.java:154)
   - locked java.lang.String@44dd8c
   - locked org.netbeans.modules.cnd.remote.server.RemoteServerRecord@1751189
org.netbeans.modules.cnd.remote.ui.EditServerListDialog$1.run(EditServerListDialog.java:161)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)


Name: RMI TCP Connection(6)-192.9.201.12
State: RUNNABLE
Total blocked: 0  Total waited: 0

Stack trace: 
sun.management.ThreadImpl.dumpThreads0(Native Method)
sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:374)
sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:167)
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:96)
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:33)
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
javax.management.StandardMBean.invoke(StandardMBean.java:391)
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
sun.rmi.transport.Transport$1.run(Transport.java:159)
java.security.AccessController.doPrivileged(Native Method)
sun.rmi.transport.Transport.serviceCall(Transport.java:155)
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)
Comment 1 twhite 2008-11-18 15:20:23 UTC
I noticed on the development server that there were 5 successful SSH connection reported, while I was trying to add the 
server.

I also made my project local to the PC and shared it via NFS to the development server.  Again, it failed to get past 
the "Initializing.." message.
Comment 2 twhite 2008-11-18 16:05:49 UTC
I saw in another ticket, where login messages can confuse the connector.  So, I removed all messages during the login 
process (including those generated by SSH -- last login).  Now when I login from the terminal app, I see only my prompt.

I am using the bash shell, and my PATH contains both netbeans and SUNWspro binaries(on the server).  What exactly is it 
trying to do when it creates a development host????  I can not find any documentation anywhere on this.

Comment 3 mclaassen 2008-11-18 17:44:31 UTC
Glancing at the code, it certainly seems that this is a big dangerous.  RemoteServerRecord.stateLock is acquired, and
then if a RemotePathMap is created, then the RemotePathMap.pmtable and map locks are acquired.  So with those three
locks, the preferences are gotten.  It is hard to tell where it goes from there.  It also does some other calls, which
should not take too long...but might. 

--
I had Tom run it again and obtain a thread dump from when the "add server" dialog is trying to connect and never
completing.  It is hanging and this is the crux of the problem:

HostMappingProviderWindows
            Process process = Runtime.getRuntime().exec("net use"); //NOI18N
            InputStream output = process.getInputStream();
            process.waitFor();

The input stream is obtained first and then the thread waits for the process to complete.  If the buffer in the input
stream is too small, the running process cannot complete because there is nowhere for the output to go.  However, the
way the code is written, the stream will not be read until the process has completed.  So we have a producer with no
consumer and wait.

Here is what Tom's "net use" command displays:
Status       Local     Remote                    Network

-------------------------------------------------------------------------------
             O:        \\192.9.201.235\opt\SUNWspro
                                                 Hummingbird NFS
Unavailable  Z:        \\elkhorn.dev.donnell.com\users1 /P:600 /D:700 /R:32768:8 /W:32768:8 /L:c /U /S /M:p /A:u /c:o
/f:1?1?Donnell
Systems
                                                 Hummingbird NFS The command completed successfully.



Why hummingbird NFS has such a long string is on them, but since NFS mounts are a prerequisite, this can happen. 
Probably this could be changed to something like the following, without modifying too much other code.  The Process API
needs to be verified that it works like I think it does, but you will get the gist.

Process process = Runtime.getRuntime().exec("net use"); //NOI18N
InputStream output = process.getInputStream();
byte[] buffer = new byte[8192];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int x = output.read(buffer);
if (x == -1) {
	//throw some exception here
}
baos.write(buffer,0,x);
while (x != -1) {
		x = output.read(buffer);
		if (x != -1)
			baos.write(buffer,0,x);
}
try {
	int exitVal = process.exitValue();
	if (exitVal != 0) {
		//throw some exception here
	}
}
catch (IllegalThreadStateException ex) {
	//Process is not done, but should have been
}
byte[] outputBuffer = baos.toByteArray();
output = new ByteArrayInputStream(outputBuffer);
//continue with old code


-------------
Where is hung for Tom initially:

Name: Default RequestProcessor
State: RUNNABLE
Total blocked: 0  Total waited: 25

Stack trace: 
java.lang.ProcessImpl.waitFor(Native Method)
org.netbeans.modules.cnd.remote.mapper.HostMappingProviderWindows.findMappings(HostMappingProviderWindows.java:66)
org.netbeans.modules.cnd.remote.mapper.HostMappingsAnalyzer.populateMappingsList(HostMappingsAnalyzer.java:103)
org.netbeans.modules.cnd.remote.mapper.HostMappingsAnalyzer.getMappings(HostMappingsAnalyzer.java:69)
org.netbeans.modules.cnd.remote.mapper.RemotePathMap.init(RemotePathMap.java:121)
   - locked java.util.HashMap@10cc039
org.netbeans.modules.cnd.remote.mapper.RemotePathMap.<init>(RemotePathMap.java:88)
org.netbeans.modules.cnd.remote.mapper.RemotePathMap.getMapper(RemotePathMap.java:70)
   - locked java.util.HashMap@200ff6
org.netbeans.modules.cnd.remote.server.RemoteServerRecord.init(RemoteServerRecord.java:154)
   - locked java.lang.String@f7e5b2
   - locked org.netbeans.modules.cnd.remote.server.RemoteServerRecord@1ea41b5
org.netbeans.modules.cnd.remote.ui.EditServerListDialog$1.run(EditServerListDialog.java:161)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

Comment 4 Petr Dvorak 2008-11-25 11:00:31 UTC
Please do not paste large portions of text in the description next time - attach them as separate file...
Comment 5 Leonid Lenyashin 2008-11-25 14:48:37 UTC
Sergey,

Pls take a look, if it is something new or it has been fixed in FCS.

LL
Comment 6 Sergey Grinev 2008-11-25 16:45:33 UTC
Fixed by http://hg.netbeans.org/main?cmd=changeset;node=e4d2382c6650

Thanks for the one of the most detailed bug reports I ever seen. The root all evil was in excessive process.waitFor() call. 
I've nominated this bug for release 6.5 patch 2, so I hope it will be available soon.

Current workaround is to temporary remove all network shares on Windows except one before creating remote host in NB.

Comment 7 Sergey Grinev 2008-11-25 16:46:34 UTC
*** Issue 153621 has been marked as a duplicate of this issue. ***
Comment 8 Sergey Grinev 2008-11-26 13:10:42 UTC
*** Issue 153762 has been marked as a duplicate of this issue. ***
Comment 9 Quality Engineering 2008-11-27 05:35:09 UTC
Integrated into 'main-golden', will be available in build *200811270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e4d2382c6650
User: Sergey Grinev <sergius@netbeans.org>
Log: fixed #153389 Re:  Failure to connect to C/C++ Development Host
Comment 10 ahot 2008-12-16 16:20:11 UTC
ok in Build 200812150201
Comment 11 jinb 2009-01-07 19:52:56 UTC
fix backported into release65_fixes branch
http://hg.netbeans.org/release65_fixes/rev/e493cc9ca64c
Comment 12 Alexander Pepin 2009-01-20 16:47:26 UTC
verified in patch2


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo