oseeliger has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm pretty new to the C++ and XS embedding and I'm not sure if this the correct section to place my question.
I've created a XS module that includes precompiled libraries and functions. One of these included C++ functions creates a shared memory segment in order to communicate with another process. Using apache's mod_cgi and simple perl scripts it works. But using mod_perl does not work.
How can I find out where the problem is? Does mod_perl deny access to the shared memory? Does anybody have a clue or an advice where I can start investigating? One possible issue could be, that the main apache process is started as root and all child processes are run as www-data. But the shared memory segment (shown by ipcs) is owned by www-data so it should be ok.
I have no possibility to debug the libs or anything like that.
Kind regards, Olli
Ubuntu 10.04.1 LTS perl v5.10.1 libapache2-mod-perl2 2.0.4-6ubuntu1 Server version: Apache/2.2.14 (Ubuntu) Server built: Apr 13 2010 19:29:28 Server's Module Magic Number: 20051115:23 Server loaded: APR 1.3.8, APR-Util 1.3.9 Compiled using: APR 1.3.8, APR-Util 1.3.9 Architecture: 32-bit Server MPM: Worker threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/worker" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="" -D SUEXEC_BIN="/usr/lib/apache2/suexec" -D DEFAULT_PIDLOG="/var/run/apache2.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache, mod_perl, C++, XS and Shared Memory
by cdarke (Prior) on Sep 06, 2010 at 12:26 UTC | |
by oseeliger (Initiate) on Sep 06, 2010 at 12:52 UTC | |
by cdarke (Prior) on Sep 08, 2010 at 07:23 UTC | |
|
Re: Apache, mod_perl, C++, XS and Shared Memory
by Khen1950fx (Canon) on Sep 06, 2010 at 21:35 UTC | |
by Anonymous Monk on Sep 13, 2010 at 10:56 UTC |