Monday, October 30, 2006

Cannot Restore Segment Prot after Reloc Error

When running a BOINC application on Linux you may find the following in stderr.txt:
Error: cannot restore segment prot after reloc: Permission denied pointed me in the right direction on this one. It is an interaction with SELinux.

The most secure solution is to run a command like:
$ chcon -t texrel_shlib_t
This allows the BOINC application's graphics library to be relocated in memory, which should be safe, but I make no warrantees of any sort with respect to this. This command may need to be run again each time the graphics library is relinked.

The final filename given above will vary depending upon the name of your application, but this example works for the uppercase BOINC sample.

There are other solutions, but they involve either turning off this protection system-wide or turning off SELinux entirely, which I do not recommend.

1 comment:

Anonymous said...

you fix my problem, thank you very much.