Project

General

Profile

Actions

Bug #2595

closed

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

Added by xdriver over 9 years ago. Updated about 8 years ago.

Status:
Invalid
Priority:
Normal
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

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:

  1. 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 << "&lt;html&gt;\n";
cout << "&lt;head&gt;\n";
cout << "&lt;title&gt;Hello World - First CGI Program&lt;/title&gt;\n";
cout << "&lt;/head&gt;\n";
cout << "&lt;body&gt;\n";
cout << "&lt;h2&gt;Hello World! This is my first CGI program&lt;/h2&gt;\n";
cout << "&lt;/body&gt;\n";
cout << "&lt;/html&gt;\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

Actions #1

Updated by gstrauss about 8 years ago

For testing purposes, have you tried replacing the compiled cpp "Hello World" project with a shell script? It is possible that there is some incompatibility in the way the cpp was built and the platform on which it is now running, whether than be 32-bit vs 64-bit, or incompatible shared library support.

Try this shell script (and make sure it is executable (chmod a+x))

#!/bin/sh
echo "Content-Type: text/html" 
echo
echo "<html><head></head><body>Hello World!</body></html>" 

Actions #2

Updated by gstrauss about 8 years ago

Try using strace lighttpd -D -f lighttpd.conf (without setting server.max-workers in config file) and seeing why the execve of the CGI is failing.

( In the future, finding this info might be easier with the pull request https://github.com/lighttpd/lighttpd1.4/pull/21 )

Actions #3

Updated by stbuehler about 8 years ago

  • Status changed from New to Invalid

#2302 hopefully improves logging; but it won't make go the problem away, as it probably isn't a lighty bug.

Actions

Also available in: Atom