Bug 1365 - Frozen process or similar when deflating or launching the test-executable-file to determine 'executable temp base directory' on Windows
Summary: Frozen process or similar when deflating or launching the test-executable-fil...
Status: RESOLVED FIXED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2.4.0
Hardware: pc_x86_32 windows
: P4 blocker
Assignee: Sven Gothel
URL:
: 1308 (view as bug list)
Depends on: 1219 1231
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-29 15:27 CET by Sven Gothel
Modified: 2019-03-30 04:16 CET (History)
1 user (show)

See Also:
Type: DEFECT
SCM Refs:
e7ac6b284eb3515f552cba491c43efe75f0a4eba 4375d2824ac6ff656df184ea0c19ab781e3524e8 0c567321c6d594ec11edfd3aa848a0a634c544ef
Workaround: TRUE


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2019-03-29 15:27:01 CET
(Continuation of bug 1219 and bug 1231)

On certain Windows platforms, depending on the installed anti-virus or security technology, the process deflating or launching the windows-test-executable-file gets frozen.

This might occur due to a false positive of a Virus Scanner or other interactions by 'security tools'.
Comment 1 Sven Gothel 2019-03-29 15:29:28 CET
Commit e7ac6b284eb3515f552cba491c43efe75f0a4eba

Adding 'jogamp.gluegen.TestTempDirExec' property, allowing to disable testing executable of temp dir

This also avoids trying to unpack the test executable on Windows,
which may cause a virus scanner to halt the process or otherwise cause issues.

+++

Commit 4375d2824ac6ff656df184ea0c19ab781e3524e8

Bug 1219, Bug 1231: Avoid deflating test-exe on Windows using java.nio.file.Files.isExecutable(Path)
    
Attempt to resolved virus scanner false positive detection on Windows
while deflating the native code test-exe file in the temporary folder.
    
As Julien Gouesse suggested, using Java 1.7's java.nio.file.Files.isExecutable(Path)
_may_ resolve the issue, this has to be thorougly tested.
    
This patch favors the nio's isExecutable file's ACL test
over the more intrusive execution itself using a simple shell script file w/ set executable flag.
    
Mind that previous tests allowed the shell script's execution,
even if the temp folder did not allow execution of native code.
    
We have to see how our testing results will be on this attempt.

+++

Commit 0c567321c6d594ec11edfd3aa848a0a634c544ef

Bug 1219, Bug 1231: Re-add executable test by execution
    
Re-adding executable test by execution is required for 'blocker technology'
like Windows's 'Software Restriction Policies (SRP)',
which only gets activated by the actual execution attempt.
Merely testing the file's (ACL) execution flags via NIO's isExecutable is not sufficient.

Implementation first tests the file's (ACL) execution flags via NIO's isExecutable.
If the NIO test was successful or not available, the actual execution test is performed.

To mitigate the virus scanner's false positive, we use an executable shell script
per default now, which may be overriden by the new environment 'jogamp.gluegen.UseNativeExeFile=true'

Tested on GNU/Linux with one temp folder having mount options 'noexec'
and on Windows using Software Restriction Policies (SRP) disallowing one temp folder.
Both temp folder were first in line via environment 'java.io.tmpdir'.
Comment 2 Sven Gothel 2019-03-30 04:16:56 CET
*** Bug 1308 has been marked as a duplicate of this bug. ***