Subject: | child pid 13466 exit signal Segmentation fault in mod_perl |
Platforms
Distributor ID: Ubuntu
Description: Ubuntu 8.04
Release: 8.04
Codename: hardy
Linux william-pc 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008
i686 GNU/Linux
Server version: Apache/2.2.8 (Ubuntu)
SWI-Prolog version 5.6.55 for i686-linux
mod_perl 2.0
Language-Prolog-Yaswi-0.14
Apache config
<VirtualHost *>
ServerAdmin webmaster@localhost
ServerName localhost
DocumentRoot /var/www/
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Alias /modperl/ /var/www/modperl/
#PerlSetEnv PERLDB_OPTS "NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2"
#PerlModule Apache::DB
PerlModule ModPerl::RegistryPrefork
<Location /modperl/>
# PerlFixupHandler Apache::DB
SetHandler perl-script
PerlResponseHandler ModPerl::RegistryPrefork
PerlOptions +ParseHeaders
Options +ExecCGI
Order allow,deny
Allow from all
</Location>
# ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
# <Directory "/usr/lib/cgi-bin">
# AllowOverride None
# Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
# Order allow,deny
# Allow from all
# </Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
#When running
use CGI qw(:standard);
print header;
use Language::Prolog::Yaswi qw(:query :run);
use Language::Prolog::Types::overload;
use Language::Prolog::Sugar functors => { equal => '=',
is => 'is' },
chains => { orn => ';',
andn => ',',
add => '+' },
vars => [qw (X Y Z)];
swi_set_query( equal(X, Y),
orn( equal(X, 27),
equal(Y, 'hello')));
while (swi_next) {
printf "Query=".swi_query()."\n";
printf " X=%_, Y=%_\n\n", swi_var(X), swi_var(Y);
}
#error
[PROLOG SYSTEM ERROR: Thread 1
Recursively received fatal signal 11
PROLOG STACK:
]
#When the nosignals is added
swi_init('-nosignals');
[Thu May 22 17:07:48 2008] [notice] child pid 13466 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13492 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13493 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13494 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13495 exit signal
Segmentation fault (11)
I found the potential solution might be at
http://gollem.science.uva.nl/SWI-Prolog/Manual/foreigninclude.html#sec:9.6.20.1
9.6.20.1 Threading, Signals and embedded Prolog
But when I uninstall and install the swi-prolog from source, also using
sh configure --disable-segv-handling
Now I got the new error of
pl: Usage:
1) pl --help Display this message (also -h)
2) pl --version Display version information (also -v)
3) pl --arch Display architecture
4) pl --dump-runtime-variables[=format]
Dump link info in sh(1) format
5) pl [options]
6) pl [options] [-o output] -c file ...
7) pl [options] [-o output] -b bootfile -c file ...
Options:
-x state Start from state (must be first)
-[LGTA]size[KMG] Specify {Local,Global,Trail,Argument} limits
-t toplevel Toplevel goal
-g goal Initialisation goal
-f file User initialisation file
-F file System initialisation file
-s file Script source file
[+/-]tty Allow tty control
-O Optimised compilation
--nosignals Do not modify any signal handling
--nodebug Omit generation of debug info
--quiet Quiet operation (also -q)
--home=DIR Use DIR as SWI-Prolog home
[Sun May 25 16:50:40 2008] [error] unable to start prolog engine at
/usr/local/lib/perl/5.8.8/Language/Prolog/Yaswi/Low.pm line 63.\n
Seems like the wrong command argument has been passed by Yaswi.
Thanks.