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 258517 - Execution of /sbin/ldconfig during startup
Summary: Execution of /sbin/ldconfig during startup
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 8.2
Hardware: PC Unix
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2016-03-24 09:34 UTC by Jiri Skrivanek
Modified: 2016-09-06 07:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2016-03-24 09:34:50 UTC
org.netbeans.test.ide.IDECommitValidationTest.testWriteAccess fails because /sbin/ldconfig is touched during startup. Please, fix it. Error message is as follows:

No writes during startup.
Writing any files to disk during start is inefficient and usualy unnecessary.
Consider using declarative registration in your layer.xml file, or delaying
the initialization of the whole subsystem till it is really used.
In case it is necessary to perform the write, you can modify the
'allowed-file-write.txt' file in ide.kit module. More details at
http://wiki.netbeans.org/FitnessViaWhiteAndBlackList
checkExec: /sbin/ldconfig
java.lang.Exception
	at org.netbeans.test.ide.CountingSecurityManager.checkExec(CountingSecurityManager.java:567)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1018)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:450)
	at java.lang.Runtime.exec(Runtime.java:347)
	at com.sun.jna.NativeLibrary.getLinuxLdPaths(NativeLibrary.java:930)
	at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:877)
	at com.sun.jna.Library$Handler.<init>(Library.java:147)
	at com.sun.jna.Native.loadLibrary(Native.java:502)
	at com.sun.jna.Native.loadLibrary(Native.java:481)
	at org.netbeans.modules.masterfs.watcher.linux.LinuxNotifier.<init>(LinuxNotifier.java:103)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.openide.util.lookup.implspi.SharedClassObjectBridge.newInstance(SharedClassObjectBridge.java:64)
	at org.openide.util.lookup.MetaInfServicesLookup$Item.getInstance(MetaInfServicesLookup.java:514)
	at org.netbeans.modules.masterfs.watcher.Watcher.getNotifierForPlatform(Watcher.java:476)
	at org.netbeans.modules.masterfs.watcher.Watcher.<init>(Watcher.java:86)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.openide.util.lookup.implspi.SharedClassObjectBridge.newInstance(SharedClassObjectBridge.java:64)
	at org.openide.util.lookup.MetaInfServicesLookup$Item.getInstance(MetaInfServicesLookup.java:514)
	at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:422)
	at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:222)
	at org.netbeans.modules.masterfs.watcher.Watcher.ext(Watcher.java:90)
	at org.netbeans.modules.masterfs.watcher.Watcher.isEnabled(Watcher.java:96)
	at org.netbeans.modules.masterfs.Installer.run(Installer.java:54)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Comment 1 Jaroslav Havlin 2016-08-26 07:12:47 UTC
Fixed, hopefully: http://hg.netbeans.org/core-main/rev/7c85c9c925e4

Thank you for reporting.
Comment 2 Quality Engineering 2016-08-27 02:19:55 UTC
Integrated into 'main-silver', will be available in build *201608270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7c85c9c925e4
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #258517: Execution of /sbin/ldconfig during startup
Comment 3 Jiri Skrivanek 2016-08-29 08:51:21 UTC
I am affraid it did not help.
Comment 4 Martin Entlicher 2016-08-30 11:30:49 UTC
I do not much understand this issue.
/sbin/ldconfig is touched and what? Why this is an issue?
There is certainly no write. According to https://github.com/java-native-access/jna/blob/master/src/com/sun/jna/NativeLibrary.java there is:
Runtime.getRuntime().exec("/sbin/ldconfig -p")
No write, just an exec.

At CountingSecurityManager.checkExec(), no exec is permitted with an exception of "chmod" and Mercurial commands.

There was no change in NetBeans, there was only a change in NativeLibrary:
https://github.com/java-native-access/jna/pull/478/files

Therefore I think that the Jarda's fix should be reverted and the test should add a condition to ignore execs from Native.loadLibrary(), for instance.

This should be classified as a test error, not an IDE error.
Comment 5 Jiri Skrivanek 2016-08-30 11:56:29 UTC
Thank you Martin for evaluation. As I am not owner of this test I filed the issue in order someone knowlegable decide whether problem is in IDE or in test.
Comment 6 Martin Entlicher 2016-09-01 16:04:38 UTC
I've backed out rev. 7c85c9c925e4 and added ignore of execs from com.sun.jna.Native.loadLibrary():
http://hg.netbeans.org/core-main/rev/dba29e8eba42
http://hg.netbeans.org/core-main/rev/9ea47b8a9cfe
Comment 7 Quality Engineering 2016-09-03 02:14:34 UTC
Integrated into 'main-silver', will be available in build *201609030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9ea47b8a9cfe
User: mentlicher@netbeans.org
Log: #258517: Ignore execs from com.sun.jna.Native.loadLibrary().
Comment 8 Jiri Skrivanek 2016-09-06 07:21:48 UTC
Verified. Thanks.