You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Brian Carr <br...@usa.net> on 1998/08/26 20:27:11 UTC

mod_cgi/2909: SSI does not usually work with exec (cgi) options under OS/2

>Number:         2909
>Category:       mod_cgi
>Synopsis:       SSI does not usually work with exec (cgi) options under OS/2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Aug 26 11:30:02 PDT 1998
>Last-Modified:
>Originator:     brian_carr@usa.net
>Organization:
apache
>Release:        1.2.4 and 1.3.1
>Environment:
OS/2 Warp 4.0 Fixpak 5+ (special version for Lotus SmartSuite) Rev 9.029
and OS/2 Warp 3.0 SMP with Fixpak 32, rev 8.256
>Description:
A test SSI page (.shtml) includes links to a .EXE and 
perl (.cmd) cgi programs as well as SSI links to the
same programs.  The cgi works great by itself, but I
get:
[Wed Aug 26 08:35:54 1998] [error] (24)Too many open files: couldn't spawn child process: /os2httpd/cgi-bin/test.exe
httpd: exec of CMD.EXE failed, reason: Invalid executable file format (errno = 8)
when I request the SSI page.

The .shtml page includes:
<!--#exec cmd="/cgi-bin/runperl.cmd?src=935%start=5" -->
<!--#exec cgi="/cgi-bin/test.exe" -->

These are the identical errors I got from the 1.2.4 OS/2 binary
(I upgraded to 1.3.1 OS/2 binary to try to resolve the problem).
Another odd effect is that the SSI of test.exe works fine when 
apache is run under gdb.  I am considering always running apache
under gdb until a fix is available.  Needless to say I can not
run apache under IPMD (the OS/2 debugger) as fork does not run
correctly when apache is linked under Link386.  Apache is not
happy without fork.  My previous experience with the DosExecProgram
API (which almost certainly is buried deep within the EMX
libraries) is that it is a frightfully fragile API and the
likely solution is just a short surrender of the dispatch
cycle to let the other thread catch up.  However, it is hard
to debug a problem which goes away when you debug it.
>How-To-Repeat:
I can send you the entire testssi.shtm or post it on my
personal web page, but my OS/2 servers are behind a corporate
firewall so really aren't accessable.  Likewise, test.exe is
a trivial program that just returns a one liner HTML page
via standard output.
>Fix:
Oops, see the full description above for work arounds and/or
thoughts of a fix (though I have not yet been able to debug
it adequately state the long term solution).
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]