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 267715

Summary: Tests can't add remote host, because "New Remote Host Setup" wizard fails
Product: cnd Reporter: soldatov <soldatov>
Component: RemoteAssignee: Vladimir Kvashin <vkvashin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 8.2   
Hardware: PC   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:
Attachments: Fix prototype

Description soldatov 2016-08-26 12:13:10 UTC
Sceanario:
- Remote host is Solaris
- Call "New Remote Host Setup" wizard
- Type host and press Next button
- Type login and password
==> for 2 hours I see "Initializing tools collections" progress bar only. In log I see:

FINEST [nativeexecution.support.logger]: [328491 ms.] SFTP max. busy channels reached: 3
FINE [nativeexecution.support.logger]: [328492 ms.] Getting stat for .....:/net/0:0:0:0:0:0:0:1/var/smb/cvol finished in 1 attempt(s)
FINE [nativeexecution.support.logger]: [336074 ms.] Getting stat for .....:/net/.../var/smb/cvol failed
FINE [nativeexecution.support.logger]: [336074 ms.] Getting stat for .....:/net/.../var/smb/cvol failed
Comment 1 Vladimir Kvashin 2016-08-26 15:44:47 UTC
I think that's a problem of this host.
Try 
ls -l /
on this host

I tried... and it still hangs. 
Also the message is printed
NFS server scar.xx.xxxxxxx.com not responding still trying
Comment 2 Vladimir Kvashin 2016-08-26 15:56:19 UTC
truss -p `pgrep fs_server`
shows that it waits forever on
/5:     lstat("//ws", 0xFFFF80FFBED7DBA8) (sleeping...)
Comment 3 Vladimir Kvashin 2016-08-27 14:27:48 UTC
I pushed some fixes in cnd-main
http://hg.netbeans.org/cnd-main/rev/7eafd312d615
http://hg.netbeans.org/cnd-main/rev/fa913fdab592
http://hg.netbeans.org/cnd-main/rev/005a7aea262a
http://hg.netbeans.org/cnd-main/rev/e5031299abcf

The fixes above are mostly aimed on use of timed waiting instead of waiting forever. I wasn't able to switch of calling lstat on /ws so far.

Doing so requires changes in fs_server binary. 
I'm planning to do this shortly, but this is definitely not for today.

Unfortunately it is not possible to solve via ignoring directories on client side, since it's call to "ls /" that makes fs_server hang forever.
Comment 4 Vladimir Kvashin 2016-08-27 22:41:55 UTC
Created attachment 161786 [details]
Fix prototype

Issues to be solved prior than pushing the fix:
1) Lack of synchronization with determining mount points
2) In fs_server is_dir_forbidden_to_stat uses mutex, which will definitely lead to too much concurrency between threads.
Comment 5 Quality Engineering 2016-08-28 01:55:38 UTC
Integrated into 'main-silver', will be available in build *201608280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7eafd312d615
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixing #267715 (Tests can't add remote host, because "New Remote Host Setup" wizard fails).  Step 1, don't wait forever, always set (a long) timeout (by default 60-seconds; can be set via -J-Dremote.fs_server.default.timeout)
Comment 6 Quality Engineering 2016-08-29 01:44:10 UTC
Integrated into 'main-silver', will be available in build *201608290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/005a7aea262a
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixing #267715 (Tests can't add remote host, because "New Remote Host Setup" wizard fails).  Step 3, proper exception handling
Comment 8 Quality Engineering 2016-09-04 01:57:27 UTC
Integrated into 'main-silver', will be available in build *201609040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f579585d35b5
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Fixing #267715 (Tests can't add remote host, because "New Remote Host Setup" wizard fails): native code changes