Stas Bekman wrote:
Steve Hay wrote:
You need to poke in xs/APR/PerlIO/apr_perlio.c most likely inside: PerlIOAPR_read
however there is also the tracing option, before you try to step through with debugger. Try running the test with the 'o' option (o == IO):
env MOD_PERL_TRACE=o t/TEST -v apr/perlio
also you probably want to comment out the rest of the sub-tests in that file so they won't stand on your way.
[After rebuilding mp2 with MP_TRACE=1, which I didn't at first realise I needed to do!...]
This doesn't seem to produce any debug at all, other than a short dump of what the trace options are (confirming that I/O is selected).
Weird. There is an MP_TRACE_o() call in PerlIOAPR_read(). I can walk through it in the debugger -- it *does* call modperl_trace() and apparently write stuff out, but it never appears in the error_log.
Can you step through to the write and see why it doesn't show up in the error_log file?
I've stepped into apr_file_write(). This calls a Win32 API function called WriteFile() (readwrite.c, line 328), which fails: rv is 0. The last OS error (GetLastError()) is retrieved via apr_get_os_error(), which returns a horribly munged value via apr_errno.h. The value is 720,006, which I think corresponds to the GetLastError() value of 6 if I've waded through all the #define's in apr_errno.h correctly. That error number corresponds to the message "The handle is invalid".
So apr_file_write() does indeed fail, and reason is that the handle is invalid. (The value of thefile->filehand is 0x00000170.)
Do other folks have any success using MOD_PERL_TRACE=o on Win32?
May be the whole tracing is not working on win32? Can you trace other things? e.g. =f for filters? See:
http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlTrace_
I think Randy has reported successful tracing before.
I can't get any trace information appearing in the error_log other than a dump of the trace flags and a few other bits before the server starts up. I just ran the whole testsuite (except filter, hooks and modules) with MOD_PERL_TRACE set to "fmo" (filters, memory, I/O) and all I got in the error_log was this:
===== [Fri Sep 19 17:50:27 2003] [info] mod_perl: using Perl HASH_SEED: 3907032503 mod_perl trace flags dump:
c Off (configuration for directive handlers)
d Off (directive processing)
f On (filters)
g Off (Perl runtime interaction)
h Off (handlers)
i Off (interpreter pool management)
m On (memory allocations)
o On (I/O)
s Off (perl sections)
t Off (benchmark-ish timings)
applied FilterConnectionHandler attribute to ModPerl::TestFilterDebug handler
applied FilterRequestHandler attribute to ModPerl::TestFilterDebug handler
[Fri Sep 19 17:50:28 2003] [info] 22 Apache:: modules loaded [Fri Sep 19 17:50:28 2003] [info] 5 APR:: modules loaded [Fri Sep 19 17:50:28 2003] [info] base server + 11 vhosts ready to run tests applied FilterRequestHandler attribute to TestFilter::in_bbs_body handler
applied FilterInitHandler attribute to TestFilter::in_init_basic handler
applied FilterRequestHandler attribute to TestFilter::in_init_basic handler
applied FilterHasInitHandler(\&transparent_init) attribute to TestFilter::in_init_basic handler
applied FilterInitHandler attribute to TestFilter::in_init_basic handler
applied FilterHasInitHandler(\&suicide_init) attribute to TestFilter::in_init_basic handler
applied FilterInitHandler attribute to TestFilter::out_init_basic handler
applied FilterRequestHandler attribute to TestFilter::out_init_basic handler
applied FilterHasInitHandler(get_pre_handler()) attribute to TestFilter::out_init_basic handler
applied FilterConnectionHandler attribute to TestFilter::in_str_msg handler
applied FilterConnectionHandler attribute to TestFilter::in_bbs_msg handler
[Fri Sep 19 17:50:31 2003] [info] mod_perl: using Perl HASH_SEED: 3954079015
[Fri Sep 19 17:50:31 2003] [notice] Child 3496: Child process is running
[Fri Sep 19 17:50:31 2003] [notice] Child 3496: Acquired the start mutex.
[Fri Sep 19 17:50:31 2003] [notice] Child 3496: Starting 20 worker threads.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 0 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 1 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 2 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 3 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 4 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 5 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 6 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 7 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 8 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 9 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 10 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 11 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 12 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 13 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 14 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 15 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 16 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 17 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 18 starting.
[Fri Sep 19 17:50:31 2003] [debug] child.c(695): Child 3496: Worker thread 19 starting.
[Fri Sep 19 17:50:47 2003] [info] [client 127.0.0.1] TestAPI::aplog test in progress
This log message comes with no header
[Fri Sep 19 17:50:47 2003] [debug] aplog.pm(48): log_serror test ok
[Fri Sep 19 17:50:47 2003] [debug] aplog.pm(52): (20014)Error string not specified yet: log_serror test 2 ok
[Fri Sep 19 17:50:47 2003] [crit] [client 127.0.0.1] (20007)No time was provided and one was required.: log_rerror test ok
[Fri Sep 19 17:50:47 2003] [error] $r->log_error test ok
[Fri Sep 19 17:50:47 2003] [error] $s->log_error test ok
[Fri Sep 19 17:50:47 2003] [debug] aplog.pm(73): TestAPI::aplog test done
[Fri Sep 19 17:50:47 2003] [warn] ApacheApache->warn test ok
[Fri Sep 19 17:50:47 2003] [warn] $s->warn test ok
[Fri Sep 19 17:51:44 2003] [error] Apache::log_error test ok
[Fri Sep 19 17:52:07 2003] [error] [client 127.0.0.1] Undefined subroutine &TestError::runtime::no_such_func called at C:\Temp\modperl-2.0\t\response/TestError/runtime.pm line 19.
[Fri Sep 19 17:52:08 2003] [error] failed to resolve handler `TestError::syntax'
[Fri Sep 19 17:52:08 2003] [error] [client 127.0.0.1] syntax error at C:\Temp\modperl-2.0\t\response/TestError/syntax.pm line 22, near "\;"
Compilation failed in require at (eval 128) line 3.
[Fri Sep 19 17:52:25 2003] [error] [client 127.0.0.1] need AuthName: /TestModperl__setauth
=====
I assume there should have been loads more than that!
Does your tracing work, Randy?
- Steve
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
