Project

General

Profile

[Solved] (mod_cgi.c.1312) cleaning up CGI: process died with signal 6

Added by xdriver over 9 years ago

Hi,

I have a Beaglebone white and I have downloaded the Sitara OS from TI site. I have configured the lighttpd present in the Sitara for to show my Start.html page. In the start page I have a button that call a cgi program. The cgi is a cpp project that show the Hello world! string. I have cross compiled the cgi. All is ok, the lighttpd web server show my Start page and the cgi run ok. The button show the Hello world! string in the browser.

I have configured Buildroot for to made my personal linux distribution for my Beaglebone white. In the configuration I have added lighttpd with SSL, Perl with pcre and PHP.

Then I have moved the Start.html page and the Hello world cgi object file in the new os built with Buildroot.

The Start page is ok but the cgi show a blank page!

In the lighttpd-error.log file there is the following string:
"(mod_cgi.c.1312) cleaning up CGI: process died with signal 6"

In the following lines there are the version of the lighttpd in the Sitara OS:

root@am335x-evm:~# lighttpd -V
lighttpd/1.4.32 - a light and fast webserver
Build-Date: Mar 4 2014 12:27:52

Event Handlers:

+ select (generic)
+ poll (Unix)
- rt-signals (Linux 2.4+)
+ epoll (Linux 2.6)
- /dev/poll (Solaris)
- eventports (Solaris)
- kqueue (FreeBSD)
- libev (generic)

Network handler:

- linux-sendfile
- freebsd-sendfile
- solaris-sendfilev
+ writev
+ write
- mmap support

Features:

+ IPv6 support
+ zlib support
- bzip2 support
+ crypt support
- SSL Support
+ PCRE support
- mySQL support
- LDAP support
- memcached support
- FAM support
- LUA support
- xml support
- SQLite support
- GDBM support

root@am335x-evm:~#

These are the version of the languages installed in the Sitara OS:

perl - 5.14.3-r1
php - 5.4.14-r4.0-arago2
php-cgi - 5.4.14-r4.0-arago2
php-cli - 5.4.14-r4.0-arago2

Here there are the version of the lighttpd installed by Buildroot in my
personal OS:

lighttpd -V
lighttpd/1.4.35 (ssl) - a light and fast webserver
Build-Date: Sep 7 2014 07:21:51

Event Handlers:

+ select (generic)
+ poll (Unix)
- rt-signals (Linux 2.4+)
+ epoll (Linux 2.6)
- /dev/poll (Solaris)
- eventports (Solaris)
- kqueue (FreeBSD)
- libev (generic)

Network handler:

- linux-sendfile
- freebsd-sendfile
- solaris-sendfilev
+ writev
+ write
- mmap support

Features:

- IPv6 support
+ zlib support
+ bzip2 support
+ crypt support
+ SSL Support
+ PCRE support
- mySQL support
- LDAP support
- memcached support
- FAM support
- LUA support
- xml support
- SQLite support
- GDBM support

#

These are the version of the languages installed by Buildroot:

pcre-8.35.tar.gz
perl-5.18.2.tar.bz2
perl-5.18.2-cross-0.8.5.tar.gz
php-5.5.16.tar.gz

This is the configuration used in the .conf file:

cgi.assign = ( ".php" => "/lighttpd/sbin/php",
".cgi" => "/usr/bin/perl",
".rb" => "/usr/bin/ruby",
".erb" => "/usr/bin/eruby",
".py" => "/usr/bin/python" )

I have tested also the old version, but without results:

alias.url += ( "/cgi-bin" => server_root + "/cgi-bin" )
$HTTP["url"] =~ "^/cgi-bin" {
cgi.assign = ( "" => "" )
}

This the cpp project compiled and renamed as test.cgi:

#include <iostream>
using namespace std;

int main () {

cout << "Content-type:text/html\r\n\r\n";
cout << "<html>\n";
cout << "<head>\n";
cout << "<title>Hello World - First CGI Program</title>\n";
cout << "</head>\n";
cout << "<body>\n";
cout << "<h2>Hello World! This is my first CGI program</h2>\n";
cout << "</body>\n";
cout << "</html>\n";

return 0;
}

Could help me about this error?
Perl with pcre is all I need for run the C++ cgi program?
It is necessary to add something else to the buildroot package for run cgi program in C++?

Many thanks in advance


Replies (1)

RE: [Solved] (mod_cgi.c.1312) cleaning up CGI: process died with signal 6 - Added by gstrauss about 7 years ago

If your C++ program worked when cross-compiled and linked against base distribution, but aborts with SIGSEGV on your custom-built distribution, then you need to re-cross-compile and link your C++ program with the cross-compiler, linker, and base libraries built for your custom distribution.

    (1-1/1)