Bug 226123

Summary: Provide a better way for controlling cnd tmpdir base location
Product: cnd Reporter: Andrew Krasny <akrasny>
Component: executionAssignee: ilia
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3    
Version: 7.4   
Target Milestone: Dev   
Hardware: PC   
OS: All   
See Also: http://netbeans.org/bugzilla/show_bug.cgi?id=225920
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:

Description Andrew Krasny 2013-02-14 14:11:01 UTC
Based on #225920. 
Now if tmp dir, selected by the IDE for storing temporary files/executables is not usable for some reasons (like mounted with noexec), nb is just fails to start any process and doesn't give any clue to a user about the reason of a failure. 

IDE should gracefully handle this situation...
Comment 1 Maria Tishkova 2014-11-20 10:49:16 UTC
I think we need to provide some visual hint to the user if we have faced the situation when we do print in messages log messages like 

WARNING [nativeexecution.support.logger]: [42547 ms.] Failed to upload pty
WARNING [nativeexecution.support.logger]: [42547 ms.] File /var/tmp/dlight_<user_name/...>/pty doesnt exist, and cannot be uploaded. Do you have enough privileges?
WARNING [nativeexecution.support.logger]: [42547 ms.] You could try to use -J-Dcnd.tmpbase=<other base location> to re-define default one.

Now the message is printed to the messages.log but it doesn't help the user to fix the problem by him(her)self
Comment 2 ilia 2014-11-23 23:29:08 UTC
I agree with Maria.

Another, and much worse case:
* pty was successfully uploaded to the default location (/var/tmp)
* files in this location have no execution rights.

In that case log just shows
INFO [nativeexecution.support.logger]: [318495 ms.] bash: /var/tmp/dlight_igromov/206118ba/1579889241/pty: Permission denied

About "Do you have enough privileges?" in log:

"/tmp" and "/var/tmp" are mount as noexec on almost every public hosting in the sake of safety. Unfortunately, these dirs are still displayed as dirs with execution rights by ls -la, that may confuse user. 

For example:
ls -la /var/tmp/dlight_igromov/206118ba/1579889241/pty 
-rwx------ 1 igromov igromov 19904 Ноя 23 15:33 /var/tmp/dlight_igromov/206118ba/1579889241/pty*

,but
[ -x /var/tmp/dlight_igromov/206118ba/1579889241/pty ] && echo YES

gives no output.
Comment 3 ilia 2014-11-24 08:34:46 UTC
I didn't see, noexec has been already mentioned in the comment #1
Comment 4 Quality Engineering 2014-11-27 04:23:25 UTC
Integrated into 'main-silver', will be available in build *201411270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9ae5cc89a281
User: Ilia Gromov <ilia@netbeans.org>
Log: fixed Bug #226123 - Provide a better way for controlling cnd tmpdir base location
Comment 5 Vladimir Kvashin 2015-01-26 15:20:31 UTC
It seems this does not work on Solaris 10. To put it more precise, it does not work run on a system with ssh not being a link to ksh or bash. That's because the previous fix (http://hg.netbeans.org/cnd-main/rev/9ae5cc89a281) introduced an incompatibility with classic sh.

However the rest of cnd functionality seems to work more ore less ok - at least a the first glance.
Comment 7 Quality Engineering 2015-01-28 04:12:30 UTC
Integrated into 'main-silver', will be available in build *201501280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e6528ec2b815
User: Ilia Gromov <ilia@netbeans.org>
Log: Additional fix for Bug #226123 - Provide a better way for controlling cnd tmpdir base location
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