Problem:
"Mmap failed" when running VisiBroker application on HP platforms
Resolution:
Product Name: VisiBroker for C
Product Version: All
Platform / OS Version: HP-UX
Problem Description
VisiBroker"s Server application could not start by the error below on HP-UX platforms.
dld.so: Mmap failed for the library : Permission denied.
For example:
$ make clean_cpp
make -f Makefile_cpp clean
rm -f core *.o *.hh *.cc Client Server
rm -rf SunWS_cache
$ make cpp
make -f Makefile_cpp
/opt/borland/VB7/bin/idl2cpp -I/opt/borland/VB7/idl Bank.idl
aCC DD64 -mt -AA -D_VIS_STD -I. -I/opt/borland/VB7/include -I/opt/borland/VB7/include/stubs -g -DBITS64 -DHPUX_11 -DHPUX_aCC -DINCLUDE_FSTREAM -D_REENTRANT -D_KERNEL_THREADS -D_THREAD_SAFE -DTHREAD -D_VIS_LONG_LONG -D_VIS_LONG_DOUBLE -D_VIS_UNICODE -D_VIS_STREAM_WCHAR -D_VIS_NO_IOSTREAM_WCHAR -D_VIS_NO_IOSTREAM_LONGDOUBLE W1039 -c -o Bank_c.o Bank_c.cc
aCC DD64 -mt -AA -D_VIS_STD -I. -I/opt/borland/VB7/include -I/opt/borland/VB7/include/stubs -g -DBITS64 -DHPUX_11 -DHPUX_aCC -DINCLUDE_FSTREAM -D_REENTRANT -D_KERNEL_THREADS -D_THREAD_SAFE -DTHREAD -D_VIS_LONG_LONG -D_VIS_LONG_DOUBLE -D_VIS_UNICODE -D_VIS_STREAM_WCHAR -D_VIS_NO_IOSTREAM_WCHAR -D_VIS_NO_IOSTREAM_LONGDOUBLE W1039 -c -o Client.o Client.C
aCC DD64 -mt -AA -D_VIS_STD -o Client Client.o Bank_c.o \\
-L/opt/borland/VB7/lib -g -Wl, s -lorb64_r -lvdlog64_r -lvport64_r -llmgr64 -lpthread
aCC DD64 -mt -AA -D_VIS_STD -I. -I/opt/borland/VB7/include -I/opt/borland/VB7/include/stubs -g -DBITS64 -DHPUX_11 -DHPUX_aCC -DINCLUDE_FSTREAM -D_REENTRANT -D_KERNEL_THREADS -D_THREAD_SAFE -DTHREAD -D_VIS_LONG_LONG -D_VIS_LONG_DOUBLE -D_VIS_UNICODE -D_VIS_STREAM_WCHAR -D_VIS_NO_IOSTREAM_WCHAR -D_VIS_NO_IOSTREAM_LONGDOUBLE W1039 -c -o Bank_s.o Bank_s.cc
aCC DD64 -mt -AA -D_VIS_STD -I. -I/opt/borland/VB7/include -I/opt/borland/VB7/include/stubs -g -DBITS64 -DHPUX_11 -DHPUX_aCC -DINCLUDE_FSTREAM -D_REENTRANT -D_KERNEL_THREADS -D_THREAD_SAFE -DTHREAD -D_VIS_LONG_LONG -D_VIS_LONG_DOUBLE -D_VIS_UNICODE -D_VIS_STREAM_WCHAR -D_VIS_NO_IOSTREAM_WCHAR -D_VIS_NO_IOSTREAM_LONGDOUBLE W1039 -c -o Server.o Server.C
aCC DD64 -mt -AA -D_VIS_STD -o Server Server.o Bank_s.o Bank_c.o \\
-L/opt/borland/VB7/lib -g -Wl, s -lorb64_r -lvdlog64_r -lvport64_r -llmgr64 -lpthread
$ Server
/usr/lib/hpux64/dld.so: Mmap failed for the library : Permission denied.
Killed
Resolution
The cause is the missing execute permission by the user of the library. If you have changed from default permission (rwxrwxr-x), please put it back to the value by:
$ chmod 775 <$VBROKEDIR>/lib/liborb64_r.so
This exception may not occur on other UNIX platforms.
Author: Naoki Kawasumi
#Security
#VisiBroker