perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject make test: modules/cgiupload failure
Date Sun, 17 Jun 2001 17:13:42 GMT
modules/cgiupload fails on my side with:

[Mon Jun 18 00:55:47 2001] [error] [client 127.0.0.1] CGI.pm: Server
closed socket during multipart read (client aborted?).

in t/logs/error_log

I remember I've seen this error long time ago when using CGI.pm...

$ /home/stas/perl-bleed/bin/perl -MCGI -le 'print $CGI::VERSION'
2.753

It looks like HTTP::Request::Common constructs the query correctly in
upload_file().

$ /home/stas/perl-bleed/bin/perl -MHTTP::Request \
-le 'print $HTTP::Request::VERSION'
1.27

This is the preamble of the query dump:

POST http://localhost:8529/TestModules::cgiupload
Content-Length: 235445
Content-Type: multipart/form-data; boundary=xYzZY

--xYzZY
Content-Disposition: form-data; name="filename"; filename="perlfunc.pod"
Content-Length: 235297
Content-Type: text/x-pod

=head1 NAME
...



I've tried to make cgiupload.pm to cleanly handle the failure (At least
for the debug purpose) as suggested by CGI.pm:

    my $file = $cgi->upload('filename');
    if (!$file && $cgi->cgi_error) {
        print $cgi->header(-status=>$cgi->cgi_error);
    } else {
        while (<$file>) {
            print;
        }
    }

but it didn't take me closer to the problem resolving.

An interesting thing though, at some point I've had a copy-n-paste
leftover where I had:

       print $query->header(-status=>$cgi->cgi_error);

instead of using $cgi, I've left $query. So I had segfaults with the
following trace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1026 (LWP 19168)]
0x4024a753 in Perl_gv_fetchpv (my_perl=0x81b36e0, nambeg=0x81b3cb5
"query",
    add=10, sv_type=4) at gv.c:717
717         if (!SvREFCNT(stash))       /* symbol table under destruction
*/
(gdb) where
#0  0x4024a753 in Perl_gv_fetchpv (my_perl=0x81b36e0,
    nambeg=0x81b3cb5 "query", add=10, sv_type=4) at gv.c:717
#1  0x40253431 in Perl_yylex (my_perl=0x81b36e0) at toke.c:2289
#2  0x4026cb3b in Perl_yyparse (my_perl=0x81b36e0) at perly.c:1470
#3  0x402f90de in S_doeval (my_perl=0x81b36e0, gimme=0, startop=0x0)
    at pp_ctl.c:2894
#4  0x402fafd0 in Perl_pp_require (my_perl=0x81b36e0) at pp_ctl.c:3363
#5  0x402ad02f in Perl_runops_debug (my_perl=0x81b36e0) at run.c:53
#6  0x402442f0 in S_call_body (my_perl=0x81b36e0, myop=0xbf7fd6fc,
is_eval=1)
    at perl.c:1851
#7  0x40244593 in Perl_eval_sv (my_perl=0x81b36e0, sv=0x837de84, flags=2)
    at perl.c:1911
#8  0x402381b6 in modperl_require_module (my_perl=0x81b36e0,
    pv=0x81163b4 "TestModules::cgiupload", logfailure=0) at
modperl_util.c:13
#9  0x4023b7c6 in modperl_mgv_resolve (my_perl=0x81b36e0,
handler=0x837b024,
    p=0x812d2dc, name=0x81163b4 "TestModules::cgiupload") at
modperl_mgv.c:294
#10 0x402371e4 in modperl_handler_resolve (my_perl=0x81b36e0,
    handp=0xbf7fd880, p=0x812d2dc, s=0x80d9824) at modperl_handler.c:47
#11 0x402362e7 in modperl_callback (my_perl=0x81b36e0, handler=0x837b024,
    p=0x812d2dc, s=0x80d9824, args=0x837de60) at modperl_callback.c:11
#12 0x40236cb7 in modperl_callback_run_handlers (idx=6, type=3,
r=0x812d30c,
    c=0x0, s=0x80d9824, pconf=0x0, plog=0x0, ptemp=0x0)
    at modperl_callback.c:166
#13 0x40236d8e in modperl_callback_per_dir (idx=6, r=0x812d30c)
    at modperl_callback.c:190
#14 0x40232b8e in modperl_response_handler_run (r=0x812d30c, finish=0)
    at mod_perl.c:371
#15 0x40232d87 in modperl_response_handler_cgi (r=0x812d30c) at
mod_perl.c:424
#16 0x08077257 in ap_run_handler (r=0x812d30c) at config.c:133
#17 0x080776f3 in ap_invoke_handler (r=0x812d30c) at config.c:292
#18 0x08067eff in process_request_internal (r=0x812d30c) at
http_request.c:378
#19 0x08067fe0 in ap_process_request (r=0x812d30c) at http_request.c:444
#20 0x0806446a in ap_process_http_connection (c=0x812b3c4) at
http_core.c:280
#21 0x0807f167 in ap_run_process_connection (c=0x812b3c4) at
connection.c:82
#22 0x08075455 in process_socket (p=0x812b2cc, sock=0x812b2fc,
my_child_num=0,
    my_thread_num=0) at threaded.c:439
---Type <return> to continue, or q <return> to quit---
#23 0x080757d6 in worker_thread (dummy=0x824d558) at threaded.c:600
#24 0x4009ffe4 in pthread_start_thread_event (arg=0xbf7ffc00) at
manager.c:274
(gdb) q

I think it should have died under 'use strict', but segfault?

Thanks!

I've many more failures in other tests, but I didn't get to them yet. If
you are interested:

...
apr/base64..........FAILED before any test output arrived
apr/constants.......ok
apr/lib.............FAILED before any test output arrived
apr/netlib..........FAILED before any test output arrived
apr/pool............FAILED before any test output arrived
apr/uuid............FAILED before any test output arrived
api/access..........FAILED before any test output arrived
api/send_fd.........ok
api/sendfile........ok
api/aplog...........FAILED before any test output arrived
api/conn_rec........FAILED before any test output arrived
api/lookup_uri......FAILED before any test output arrived
api/module..........FAILED before any test output arrived
api/r_subclass......FAILED before any test output arrived
api/request_rec.....FAILED before any test output arrived
api/response........FAILED before any test output arrived
api/rutil...........FAILED before any test output arrived
api/server_rec......FAILED before any test output arrived
api/uri.............FAILED before any test output arrived
apache/conftree.....FAILED before any test output arrived
apache/cgihandler...FAILED test 1
        Failed 1/2 tests, 50.00% okay
...


Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
    MP_APXS              => /home/stas/httpd-2.0/bin/apxs
    MP_DEBUG             => 1
    MP_GENERATE_XS       => 1
    MP_LIBNAME           => libmodperl
    MP_TRACE             => 1
    MP_USE_DSO           => 1


*** /home/stas/httpd-2.0/bin/httpd -V
Server version: Apache/2.0.19-dev
Server built:   Jun 16 2001 21:54:46
Server's Module Magic Number: 20010523:1
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/threaded"
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6
 -D APR_USE_FCNTL_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/home/stas/httpd-2.0"
 -D SUEXEC_BIN="/home/stas/httpd-2.0/sbin/suexec"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


*** /home/stas/perl-bleed/bin/perl -V
Summary of my perl5 (revision 5.0 version 7 subversion 17) configuration:
  Platform:
    osname=linux, osvers=2.2.19-4.1mdk, archname=i686-linux-thread-multi
    uname='linux llp.extropia.com 2.2.19-4.1mdk #1 wed may 9 03:17:46 sgt 2001 i686 unknown
'
    config_args='-des -Dusethreads -Doptimize=-g -Dusedevel -Dprefix=/home/stas/perl-bleed'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -Wall -DDEBUGGING -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-D_REENTRANT -Wall -DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.96 20000731 (Linux-Mandrake 8.1 2.96-0.54mdk)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lpthread -lc -lposix -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lposix -lcrypt -lutil
    libc=/lib/libc-2.2.3.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Locally applied patches:
  	DEVEL10610
  Built under linux
  Compiled at Jun 16 2001 19:00:37
  @INC:
    /home/stas/perl-bleed/lib/5.7.1/i686-linux-thread-multi
    /home/stas/perl-bleed/lib/5.7.1
    /home/stas/perl-bleed/lib/site_perl/5.7.1/i686-linux-thread-multi
    /home/stas/perl-bleed/lib/site_perl/5.7.1
    /home/stas/perl-bleed/lib/site_perl
    .

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message