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 226123 - Provide a better way for controlling cnd tmpdir base location
Summary: Provide a better way for controlling cnd tmpdir base location
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 7.4
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-14 14:11 UTC by Andrew Krasny
Modified: 2015-01-28 04:12 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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