perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hay <steve....@uk.radan.com>
Subject [mp2] Possible problem revealed by t/perl/ithreads.t?
Date Tue, 03 Feb 2004 16:24:59 GMT
Recent problems with threads and memory pools on Win32 led to a couple 
of patches being produced by Jan Dubois to help reproduce the problems 
in non-Win32 land.

Specifically, one excellent patch was intended to reproduce any "free to 
wrong pool" errors:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-01/msg00748.html

and another more problematic patch was intended to catch such errors 
earlier on:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-01/msg00773.html

In a recent discussion elsewhere regarding the old "free to wrong pool" 
error with DBD-mysql on Win32, Jan suggested just using the first two 
hunks of the sv.c changes from the second patch; the rest of it doesn't 
work quite right.

With the whole of the first patch (attached here as patch1.txt) plus 
those first two hunks of the sv.c changes from the second patch 
(attached here as patch2.txt) applied to perl-5.8.3, I find that mp2's 
t/perl/ithreads.t test now fails within Perl_safesysfree() at a point 
introduced by the second patch.  (Stack trace below.  I'm using Apache 
2.0.48, mp2 CVS, Perl 5.8.3.)

If I just undo the second patch but leave the first patch applied then 
the whole mp2 test suite runs fine.

Has the application of the second patch uncovered a bug that's waiting 
to bite us later, or is the failure caused by the second patch itself?

- Steve

=====
Perl_safesysfree(void * 0x0679c7dc) line 165 + 3 bytes
Perl_sv_free(interpreter * 0x04cd4bd4, sv * 0x0679c7e0) line 5374 + 9 bytes
S_hv_fetch_common(interpreter * 0x04cd4bd4, hv * 0x05ab9940, sv * 
0x00000000, const char * 0x029b7460 `string', unsigned int 12, int 0, 
int 9, sv * 0x07697400, unsigned long 1956197456) line 685 + 16 bytes
Perl_hv_store(interpreter * 0x04cd4bd4, hv * 0x05ab9940, const char * 
0x029b7460 `string', long 12, sv * 0x07697400, unsigned long 0) line 221 
+ 35 bytes
Perl_ithread_set(interpreter * 0x04cd4bd4, ithread_s * 0x03770974) line 
75 + 37 bytes
Perl_ithread_create(interpreter * 0x04cd4bd4, sv * 0x00000000, char * 
0x04f84070, sv * 0x04faa2f8, sv * 0x05e38d78) line 469 + 13 bytes
XS_threads_new(interpreter * 0x04cd4bd4, cv * 0x055d7f78) line 644 + 36 
bytes
Perl_pp_entersub(interpreter * 0x04cd4bd4) line 2840 + 16 bytes
Perl_runops_debug(interpreter * 0x04cd4bd4) line 1438 + 13 bytes
S_call_body(interpreter * 0x04cd4bd4, op * 0x08b2fd58, int 0) line 2221 
+ 13 bytes
Perl_call_sv(interpreter * 0x04cd4bd4, sv * 0x06a0da08, long 4) line 
2139 + 15 bytes
modperl_callback(interpreter * 0x04cd4bd4, modperl_handler_t * 
0x092e25d8, apr_pool_t * 0x092da518, request_rec * 0x092da550, 
server_rec * 0x0028cc30, av * 0x061bfb38) line 69 + 17 bytes
modperl_callback_run_handlers(int 6, int 4, request_rec * 0x092da550, 
conn_rec * 0x00000000, server_rec * 0x0028cc30, apr_pool_t * 0x00000000, 
apr_pool_t * 0x00000000, apr_pool_t * 0x00000000, int 1) line 227 + 35 bytes
modperl_callback_per_dir(int 6, request_rec * 0x092da550, int 1) line 
301 + 34 bytes
modperl_response_handler_run(request_rec * 0x092da550, int 1) line 822 + 
13 bytes
modperl_response_handler(request_rec * 0x092da550) line 844 + 11 bytes
ap_run_handler(request_rec * 0x092da550) line 195 + 78 bytes
ap_invoke_handler(request_rec * 0x092da550) line 401 + 9 bytes
ap_process_request(request_rec * 0x092da550) line 288 + 9 bytes
ap_process_http_connection(conn_rec * 0x092d4578) line 293 + 9 bytes
ap_run_process_connection(conn_rec * 0x092d4578) line 85 + 78 bytes
ap_process_connection(conn_rec * 0x092d4578, void * 0x092d44a8) line 213
worker_main(long 1) line 731
_threadstartex(void * 0x0028d418) line 212 + 13 bytes
KERNEL32! 77e7d33b()
=====



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential
and intended for the addressee(s) only.  If you have received this message in error or there
are any problems, please notify the sender immediately.  The unauthorized use, disclosure,
copying or alteration of this message is strictly forbidden.  Note that any views or opinions
presented in this email are solely those of the author and do not necessarily represent those
of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached
files for viruses: Radan Computational will accept no liability for any damage caused by any
virus transmitted by this email.

Mime
View raw message