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 62667 - cannot restore segment prot after reloc: Permission denied
Summary: cannot restore segment prot after reloc: Permission denied
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
: 65060 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-19 13:47 UTC by Jiri Sedlacek
Modified: 2007-04-03 14:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception from messages.log (3.12 KB, text/plain)
2005-08-19 13:48 UTC, Jiri Sedlacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Sedlacek 2005-08-19 13:47:10 UTC
Fresh Fedora Core 4, NetBeans 4.1 and Profiler Milestone 8 (v3) installation.
I'm getting following error message everytime I start NetBeans:

Failed to initialize the Profiler engine: Problem with a required JFluid
installation directory or file
/opt/netbeans-4.1/profiler1/lib/deployed/jdk142/linux/libclient.so

Original message: Could not load a the 'client' native library. Original exception:
java.lang.UnsatisfiedLinkError:
/opt/netbeans-4.1/profiler1/lib/deployed/jdk142/linux/libclient.so:
/opt/netbeans-4.1/profiler1/lib/deployed/jdk142/linux/libclient.so: cannot
restore segment prot after reloc: Permission denied,

message = /opt/netbeans-4.1/profiler1/lib/deployed/jdk142/linux/libclient.so:
/opt/netbeans-4.1/profiler1/lib/deployed/jdk142/linux/libclient.so: cannot
restore segment prot after reloc: Permission denied
Comment 1 Jiri Sedlacek 2005-08-19 13:48:41 UTC
Created attachment 24079 [details]
Exception from messages.log
Comment 2 Jiri Sedlacek 2005-08-19 13:57:54 UTC
The reason of this error is that SELinux is enabled and preventing the Profiler
(shared) native library to be loaded.

There are two possible workarounds:

 1) change default security context for Profiler native libraries by calling
chcon -t texrel_shlib_t
/opt/netbeans-4.1/profiler1/lib/deployed/jdk142/linux/*.so (recommended)

 2) disable SELinux by setting SELINUX=disabled in /etc/sysconfig/selinux config
file (not recommended)
Comment 3 Jiri Sedlacek 2005-08-19 14:24:08 UTC
Workaround #1 has to be applied also on native libraries in /opt/netbeans-
4.1/profiler1/lib/deployed/jdk15/linux/ when using JDK 5.0 or 6.0 for profiling.
Comment 4 iformanek 2005-09-19 11:18:56 UTC
Cannot be fixed, this should be documented in FAQs
Comment 5 Kenneth Ganfield 2005-09-19 15:35:14 UTC
does workaround #1 work?
is this specific to SELinux? are there other security enhanced
configurations/installations that could cause this?
Comment 6 Jiri Sedlacek 2005-09-19 15:40:24 UTC
Both workarounds are tested to work, however the #2 completely disables 
enhanced security and thus is not recommended (but maybe could be noted).

The "cannot restore segment prot after reloc: Permission denied" message is 
related only to SELinux, no other configurations are known to cause this.
Comment 7 Jiri Sedlacek 2005-09-25 21:44:58 UTC
*** Issue 65060 has been marked as a duplicate of this issue. ***
Comment 8 Tomas Hurka 2006-03-03 20:15:28 UTC
This issue can be fixed.
Comment 9 Tomas Hurka 2006-03-03 20:26:09 UTC
Fixed in trunk.
Comment 10 Tomas Hurka 2006-04-27 09:39:58 UTC
fix merged to release55 branch
Comment 11 Jiri Sedlacek 2007-04-03 14:48:48 UTC
Verified.