[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Tux's user mode modules won't execve other code



(M)Ingo & All,

	User mode modules can't seem to execute other programs.

We've traced this down to a failure in the following:

path_walk returns "-2" (-ENOENT)

Here's the stack trace:

#0  path_walk (name=0xce025005 "www/spec//upfgen99", nd=0xce90de30)
    at namei.c:615
#1  0xc013708c in open_exec (name=0xce025000 "/var/www/spec//upfgen99")
    at exec.c:342
#2  0xc0137959 in do_execve (filename=0xce025000 "/var/www/spec//upfgen99",
    argv=0xbfffd630, envp=0xbfffd610, regs=0xce90dfc4) at exec.c:848
#3  0xc01078cf in sys_execve (regs={ebx = -1073752208, ecx = -1073752528,
      edx = -1073752560, esi = 1075320664, edi = -1073752208,
      ebp = -1073752792, eax = 11, xds = 43, xes = 43, orig_eax = 11,
      eip = 1074797226, xcs = 35, eflags = 582, esp = -1073752820, xss = 43})
    at process.c:734

This command it is trying to execute is:
"/var/www/spec//upfgen99 -C /var/www/spec/ -n 10 -t 100"

It is not a problem of permissions or execution:

[root@oaxao /root]# su nobody
[nobody@oaxao /root]$ /var/www/spec//upfgen99
Usage: /var/www/spec//upfgen99 [options]
           -n ops       Set number of users to max load
           -t threads   Set max. number of threads
           -C directory Set directory to run in

[nobody@oaxao /root]$ more /proc/sys/net/tux/cgi*
/proc/sys/net/tux/cgi_cpu_mask: -1
/proc/sys/net/tux/cgi_gid: 0
/proc/sys/net/tux/cgi_inherit_cpu: 0
/proc/sys/net/tux/cgiroot: /
/proc/sys/net/tux/cgi_uid: 0

[nobody@oaxao /root]$ more /proc/sys/net/tux/documentroot
/var/www/spec/

[nobody@oaxao /root]$ ls -la /var/www/spec/upfgen99 /var/www/spec/wafgen99
-rwxrwxr-x    1 root     root        57457 Mar  3 14:57 /var/www/spec/upfgen99
-rwxrwxr-x    1 root     root        38845 Mar  3 14:57 /var/www/spec/wafgen99


Here's the user-space code that triggers the problem:


        strcpy(tmpstr1, TUXAPI_docroot); strcat(tmpstr1, "/upfgen99");
..
#define UPFGEN tmpstr1
..

        {
                int pid = 0;
                char *argv_upfgen[] = { UPFGEN, "-C", TOPDIR, "-n", maxload,
                                        "-t", maxthread, NULL};
                char *argv_cadgen[] = { CADGEN, "-C", TOPDIR, "-e", pttime,
                                        "-t", maxthread, exp1, exp2, NULL};
                char * envp[] = { "HOME=/", "TERM=linux",
                        "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
                pid = fork();
                if (!pid)
                        if (execve(UPFGEN, argv_upfgen, envp) < 0)
                                return send_err(req,"CAD: could not execute UPFGEN!\n");
                waitpid(pid, NULL, 0);

...


This is on an Intel/Linux box with tux version linux-2.4.2-tuxT3-kgdb.

If you need more information, simply drop a line.

Thanks,
Phil & Bill

Compaq:  High Performance Server Division/Benchmark Performance Engineering
---------------- Alpha, The Fastest Processor on Earth --------------------
Phillip.Ezolt@compaq.com        |C|O|M|P|A|Q|        ezolt@perf.zko.dec.com
------------------- See the results at www.spec.org -----------------------





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []