PDA

View Full Version : Return code = 2 and non-executable tmp directory


Mike Donovan
05-04-2011, 05:37 PM
Issue:
When attempting to create a standby database via the dbvisit_setup program, a customer was encountering the following process failure with an internal Perl error.

Transferring dbv_functions to host serverABC:dbv_functions
Can't load '/tmp/p2xtmp-24636/Fcntl.so' for module Fcntl: /tmp/p2xtmp-24636/Fcntl.so: failed to map segment from shared object: Operation not permitted at PERL2EXE_STORAGE/DynaLoader.pm line 203.
at PERL2EXE_STORAGE/Fcntl.pm line 216
BEGIN failed--compilation aborted at PERL2EXE_STORAGE/Fcntl.pm line 216.
Compilation failed in require at PERL2EXE_STORAGE/POSIX.pm line 16.
BEGIN failed--compilation aborted at PERL2EXE_STORAGE/POSIX.pm line 16.
Compilation failed in require at /usr/local/dbvisit/dbv_functions line 102.
BEGIN failed--compilation aborted at /usr/local/dbvisit/dbv_functions line 102.
Waiting for 5 seconds (RETRIES_WAIT_IN_SEC) until retry.
Can't load '/tmp/p2xtmp-24660/Fcntl.so' for module Fcntl: /tmp/p2xtmp-24660/Fcntl.so: failed to map segment from shared object: Operation not permitted at PERL2EXE_STORAGE/DynaLoader.pm line 203.
at PERL2EXE_STORAGE/Fcntl.pm line 216
BEGIN failed--compilation aborted at PERL2EXE_STORAGE/Fcntl.pm line 216.
Compilation failed in require at PERL2EXE_STORAGE/POSIX.pm line 16.
BEGIN failed--compilation aborted at PERL2EXE_STORAGE/POSIX.pm line 16.
Compilation failed in require at /usr/local/dbvisit/dbv_functions line 102.
BEGIN failed--compilation aborted at /usr/local/dbvisit/dbv_functions line 102.
201105021712 - Problem with calculating checksum for
/usr/local/dbvisit/dbv_functions on 184.106.63.78.

Please check permission and if program /usr/local/dbvisit/dbv_functions exists and is executable on serverABC. Please also check network connection, else please contact Dbvisit support.
Dbvisit terminated. Return code = 2

Their standby server was RHEL5, and /tmp was mounted (rw,noexec,nosuid,nodev).

Solution:
In this case they correctly identified that Dbvisit was trying to execute a program from /tmp, and this was the cause of the failure.

They confirmed that by removing the 'noexec' option when mounting /tmp, dbvisit_setup successfully completed its operations on the standby server.

note: please also see the following forum post where the recommendation is made to use a directory other than /tmp for the Dbvisit temp files:
http://www.dbvisit.com/forums/showthread.php?t=302

Mike Donovan
05-16-2011, 10:06 PM
Further details:
The customer were using a hosting provider who configured all their Linux systems with /tmp as a separate mount with noexec, and then symlinks /usr/tmp and /var/tmp to /tmp.

So even though they were using /usr/tmp (as per the Dbvisit defaults), it was still against a noexec mount point.

So they just removed noexec, and everything worked fine after that.