Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the devel-nytprof CPAN distribution.

Report information
The Basics
Id: 55049
Status: resolved
Priority: 0/
Queue: devel-nytprof

People
Owner: Nobody in particular
Requestors: Tim.Bunce [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



MIME-Version: 1.0
Resent-Date: Sat, 27 Feb 2010 16:41:50 -0500
Acceptlanguage: de-DE
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/mixed; boundary="_004_F60601FA7F635A49B7960C8FD9BFF9650333B40896DEFTHW99EA4MS_"
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 2F0EE4D80C1 for <bug-devel-nytprof [...] rt.cpan.org>; Sat, 27 Feb 2010 16:42:41 -0500 (EST)
Received: (qmail 26178 invoked by uid 103); 27 Feb 2010 21:42:40 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 27 Feb 2010 21:42:40 -0000
Received: from mail-iw0-f173.google.com (HELO mail-iw0-f173.google.com) (209.85.223.173) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sat, 27 Feb 2010 13:42:03 -0800
Received: by iwn3 with SMTP id 3so1286963iwn.13 for <bug-devel-nytprof [...] rt.cpan.org>; Sat, 27 Feb 2010 13:41:52 -0800 (PST)
Received: by 10.231.145.5 with SMTP id b5mr681144ibv.70.1267306912536; Sat, 27 Feb 2010 13:41:52 -0800 (PST)
Received: from timac.local (c-68-40-185-31.hsd1.mi.comcast.net [68.40.185.31]) by mx.google.com with ESMTPS id 22sm1316180iwn.12.2010.02.27.13.41.50 (version=SSLv3 cipher=RC4-MD5); Sat, 27 Feb 2010 13:41:51 -0800 (PST)
Received: from mailstore.pobox.com [208.72.237.124] by timac.local with POP3 (fetchmail-6.3.11) for <timbo [...] localhost> (single-drop); Thu, 25 Feb 2010 17:50:09 +0000 (GMT)
Received: from murder ([unix socket]) (authenticated user=13888548 [...] mailstore.pobox.com bits=0) by b-pb-mailstore-quonix (Cyrus v2.2.13) with LMTPA; Thu, 25 Feb 2010 12:03:02 -0500
Received: from indigo.pobox.com (indigo.pobox.com [64.74.157.52]) by mailstore.pobox.com (Postfix) with ESMTP id 0AA742A000 for <13888548 [...] mailstore.pobox.com>; Thu, 25 Feb 2010 12:03:01 -0500 (EST)
Received: from indigo.pobox.com (localhost [127.0.0.1]) by indigo.pobox.com (Postfix) with ESMTP id 665C3200AA3; Thu, 25 Feb 2010 12:03:00 -0500 (EST)
Received: from lizzard.sbs.de (lizzard.sbs.de [194.138.37.39]) by indigo.pobox.com (Postfix) with ESMTP id 704BA200695 for <Tim.Bunce [...] pobox.com>; Thu, 25 Feb 2010 12:02:28 -0500 (EST)
Received: from mail2.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o1PH25tb004481; Thu, 25 Feb 2010 18:02:05 +0100
Received: from DEFTHW99ET5MSX.ww902.siemens.net (defthw99et5msx.ww902.siemens.net [157.163.148.55]) by mail2.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o1PH208X027106; Thu, 25 Feb 2010 18:02:04 +0100
Received: from DEFTHW99EA4MSX.ww902.siemens.net ([169.254.1.69]) by DEFTHW99ET5MSX.ww902.siemens.net ([157.163.148.55]) with mapi; Thu, 25 Feb 2010 18:02:01 +0100
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: Devel-NYTProf-3.01_94 under Windows XP
Thread-Index: Acq2PD6iR9IbuqacTmO1aA0KmfnWIA==
X-Spam-Check-BY: 16.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:resent-from :resent-date:resent-message-id:resent-to:received:received:x-sieve :received:received:x-pobox-orig-sender:x-pobox-delivery-id :x-pobox-client-address:x-pobox-client-name:received:received :received:received:from:to:date:subject:thread-topic:thread-index :message-id:accept-language:content-language:x-ms-has-attach :x-ms-tnef-correlator:acceptlanguage:content-type:mime-version :x-icg-account-id; bh=BIULQ5ZlBDkL9C71FepL0Rd6rVR6n+fpzGY02eCnt2k=; b=Eu7MmV/K276tDmSUhvMkQVoW75Fj/STZyH6FPrj2jLgoS42T1RTP1tE6VJSCnpNa9y j6J9eQADu4WcDXCH/6Fd7yl+Y23qnowxpLIeBTrxynbLvoYdBQZegJtmiaPfTyBtG+zm 9pGO3A0kjoeRUZmk2aAWZ4ULcELdmo4eF3Asg=
Date: Thu, 25 Feb 2010 18:01:59 +0100
X-Spam-Level: *
To: "Tim.Bunce [...] pobox.com" <Tim.Bunce [...] pobox.com>
X-Spam-Status: No, hits=0.0 required=8.0 tests=DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,SPF_PASS,UNPARSEABLE_RELAY
X-Sieve: CMU Sieve 2.2
X-Icg-Account-ID: 13888548
Content-Language: de-DE
Message-ID: <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net>
X-Pobox-Client-Name: lizzard.sbs.de
X-MS-Tnef-Correlator:
Resent-To: bug-devel-nytprof [...] rt.cpan.org
X-Pobox-Client-Address: 194.138.37.39
Resent-From: Tim <timbo [...] timac.local>
X-Pobox-Delivery-ID: 9F3F885C-222F-11DF-9CF0-F2625DAA78BE-13888548!indigo.pobox.com
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:resent-from:resent-date:resent-message-id:resent-to:x-sieve :x-pobox-orig-sender:x-pobox-delivery-id:x-pobox-client-address :x-pobox-client-name:from:to:date:subject:thread-topic:thread-index :message-id:accept-language:content-language:x-ms-has-attach :x-ms-tnef-correlator:acceptlanguage:content-type:mime-version :x-icg-account-id; b=rS5/PWXaCuK3EFfXd9nG7RRym4RcjmKt3kikmdiIBhc6d9fnQCfBhY4n+ieWo74354 JzcR25Rw1Ly6w9GW/uVW6Oqwk5D1OYqMmUjMKuqYzr+6+28KLm7voznh1IHxwYGSckG5 k5Vi6Y8DF+rCF0DfJn/sEfv7G0blJkaww16YA=
Return-Path: <tim.bunce [...] gmail.com>
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Sender: Tim Bunce <tim.bunce [...] gmail.com>
Thread-Topic: Devel-NYTProf-3.01_94 under Windows XP
X-MS-Has-Attach: yes
Resent-Message-ID: <20100227214150.GB1375 [...] timac.local>
Accept-Language: de-DE
X-Pobox-Orig-Sender: <heiko.eissfeldt [...] siemens.com>
From: "Eissfeldt, Heiko" <Tim.Bunce [...] pobox.com>
Content-Length: 0
Content-Type: multipart/alternative; boundary="_000_F60601FA7F635A49B7960C8FD9BFF9650333B40896DEFTHW99EA4MS_"
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: iso-8859-1
Content-Length: 1911
Download (untitled) / with headers
text/plain 1.8k
Hello Tim, I am just doing bug hunting for Devel-NYTProf-3.01_94<http://search.cpan.org/~timb/Devel-NYTProf-3.01_94/> under Windows XP with ActiveState Perl 5.8.4 and want to tell you my finds. Symptom: 'make tests' first dies at t/10-run.t and very often in later tests. This is the call stack at that point: msvcr71.dll!_lock_file(void * pf=0x77c5fce0) Line 236 C msvcr71.dll!fgets(char * string=0x01ce8a24, int count=2048, _iobuf * str=0x77c5fce0) Line 69 + 0x6 C NYTProf.dll!NYTP_gets(NYTP_file_t * ifile=0x01ce5b9c, char * * buffer_p=0x0140fd28, unsigned int * len_p=0x0140fc7c) Line 369 + 0xf C Show quoted text
> NYTProf.dll!load_profile_data_from_stream(sv * cb=0x01ce5b9c) Line 3635 + 0x13 C
NYTProf.dll!XS_Devel__NYTProf__Data_load_profile_data_from_file(interpreter * my_perl=0x00236004, cv * cv=0x01bce6f8) Line 4584 C perl58.dll!28040f9f() The problem seems to be this: load_profile_data_from_stream() uses the 'in' filepointer, which is somehow corrupted. That is 'in' points to a structure NYTP_file_t containing the 'file' pointer pointing to a structure _iobuf which has only NULL pointers - in 0x01ce5b9c {file=0x77c5fce0 NYTP_file_t * - file 0x77c5fce0 _iobuf * + _ptr 0x00000000 <bad Ptr> char * _cnt 0 int + _base 0x00000000 <bad Ptr> char * _flag 1 int _file 3 int _charbuf 0 int _bufsiz 0 int + _tmpfname 0x00000000 <bad Ptr> char * so when NYTP_gets() is called, it crashes. 'in' is set from the return value of NYTP_open(). I have not the faintest idea why such a buggy structure is given back... The file nytprof_10-run.out has this content: NYTProf 3 0 # Perl profile database. Generated by Devel::NYTProf on Thu Feb 25 16:47:11 2010 :basetime=1267112831 :xs_version=3.02 :perl_version=5.8.4 :clock_id=-1 :ticks_per_sec=1000000 :nv_size=8 :PL_perldb=784 :application=- P'ð G÷ߦáÒAp'ð.Gá¦áÒA Hope that helps, Heiko
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: iso-8859-1
Content-Length: 7170
Content-Description: nytprof_10-run.out
content-type: application/octet-stream; name="nytprof_10-run.out"
content-disposition: attachment; creation-date="Thu, 25 Feb 2010 11:11:17 GMT"; filename="nytprof_10-run.out"; modification-date="Thu, 25 Feb 2010 16:47:17 GMT"; size="251"
Content-Transfer-Encoding: base64
Content-Length: 251
Download nytprof_10-run.out
application/octet-stream 251b

Message body not shown because it is not plain text.

CC: "Eissfeldt, Heiko" <heiko.eissfeldt [...] siemens.com>, develnytprof-dev [...] googlegroups.com
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,SPF_PASS
In-Reply-To: <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org>
Message-ID: <20100227220943.GC1375 [...] timac.local>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 2B8094D80C1 for <bug-devel-nytprof [...] rt.cpan.org>; Sat, 27 Feb 2010 17:10:34 -0500 (EST)
Received: (qmail 15140 invoked by uid 103); 27 Feb 2010 22:10:33 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 27 Feb 2010 22:10:33 -0000
Received: from mail-iw0-f173.google.com (HELO mail-iw0-f173.google.com) (209.85.223.173) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sat, 27 Feb 2010 14:09:58 -0800
Received: by iwn3 with SMTP id 3so1299109iwn.13 for <bug-devel-nytprof [...] rt.cpan.org>; Sat, 27 Feb 2010 14:09:47 -0800 (PST)
Received: by 10.231.153.205 with SMTP id l13mr666277ibw.64.1267308587215; Sat, 27 Feb 2010 14:09:47 -0800 (PST)
Received: from timac.local (c-68-40-185-31.hsd1.mi.comcast.net [68.40.185.31]) by mx.google.com with ESMTPS id 23sm1343939iwn.6.2010.02.27.14.09.44 (version=SSLv3 cipher=RC4-MD5); Sat, 27 Feb 2010 14:09:44 -0800 (PST)
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
User-Agent: Mutt/1.5.20 (2009-06-14)
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=W0VpkH5tXv4lN+O25lsnwNDu4pFuI17yNZEruHwwtYG1P1PXgxheSz+wbhDJMncvay bZ0MPAs846h1McTEcZOo37pVtUfPgj/Dmy+S8pwnOJvXHcq0hiqUhG9Cqon/EqnkItId TnhOvdM1u62MU30/0v9W9jmOb9nGPrpAfs0Vg=
Return-Path: <tim.bunce [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=iJ7f8gWA1Qr5gavmZF/lge5pJtl2mO4IO3X1c48+4iQ=; b=j/ui0tM3NL3KMsn2Oe3u5qbCQK1ryOX+tXV4YVA7bJXMfVmbJZ539JplXZ3kbbGhZZ yVKJAgfSI3fR+h8fAwtetyRMKswlFgVgND7wJ5xPtxi8GzS01P6ZLmRb77QxgJHoDLnB QD+6ehlAdoVtr9RlCBpQY7eWwhUnA06mivVvs=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Date: Sat, 27 Feb 2010 17:09:43 -0500
Sender: Tim Bunce <tim.bunce [...] gmail.com>
X-Spam-Level: *
To: Tim Bunce via RT <bug-devel-nytprof [...] rt.cpan.org>
Content-Transfer-Encoding: 8bit
From: Tim Bunce <Tim.Bunce [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-12695-1267308645-997.55049-0-0 [...] rt.cpan.org>
Content-Length: 3180
Download (untitled) / with headers
text/plain 3.1k
Hi Heiko. Just a hunch... try editing t/10-run.t like this: --- t/10-run.t (revision 1085) +++ t/10-run.t (working copy) @@ -11,7 +11,7 @@ use Devel::NYTProf::Run qw(profile_this); run_test_group( { - extra_options => { stmts => 0 }, # RT#50851 + extra_options => { stmts => 0, compress => 0 }, # RT#50851 extra_test_count => 1, extra_test_code => sub { my ($profile, $env) = @_; and let us know (ASAP please as this is the last issue holding up a release). If that does _not_ fix it then please: 1. install the module 2. set the NYTPROF env vat to "trace=99" 3. send me the output of: nytprofhtml --file nytprof_10-run.out Thanks. Tim. On Sat, Feb 27, 2010 at 04:42:59PM -0500, Tim Bunce via RT wrote: Show quoted text
> Sat Feb 27 16:42:58 2010: Request 55049 was acted upon. > Transaction: Ticket created by Tim.Bunce@pobox.com > Queue: devel-nytprof > Subject: Devel-NYTProf-3.01_94 under Windows XP > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: Tim.Bunce@pobox.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55049 > > > > Hello Tim, > > I am just doing bug hunting for Devel-NYTProf-3.01_94<http://search.cpan.org/~timb/Devel-NYTProf-3.01_94/> > under Windows XP with ActiveState Perl 5.8.4 and want to tell you my finds. > > Symptom: > 'make tests' first dies at t/10-run.t and very often in later tests. > > This is the call stack at that point: > msvcr71.dll!_lock_file(void * pf=0x77c5fce0) Line 236 C > msvcr71.dll!fgets(char * string=0x01ce8a24, int count=2048, _iobuf * str=0x77c5fce0) Line 69 + 0x6 C > NYTProf.dll!NYTP_gets(NYTP_file_t * ifile=0x01ce5b9c, char * * buffer_p=0x0140fd28, unsigned int * len_p=0x0140fc7c) Line 369 + 0xf C
> > NYTProf.dll!load_profile_data_from_stream(sv * cb=0x01ce5b9c) Line 3635 + 0x13 C
> NYTProf.dll!XS_Devel__NYTProf__Data_load_profile_data_from_file(interpreter * my_perl=0x00236004, cv * cv=0x01bce6f8) Line 4584 C > perl58.dll!28040f9f() > The problem seems to be this: > > load_profile_data_from_stream() uses the 'in' filepointer, which is somehow corrupted. > > That is > 'in' points to a structure NYTP_file_t containing the > 'file' pointer pointing to a structure _iobuf which has only NULL pointers > > > > - in 0x01ce5b9c {file=0x77c5fce0 NYTP_file_t * > - file 0x77c5fce0 _iobuf * > + _ptr 0x00000000 <bad Ptr> char * > _cnt 0 int > + _base 0x00000000 <bad Ptr> char * > _flag 1 int > _file 3 int > _charbuf 0 int > _bufsiz 0 int > + _tmpfname 0x00000000 <bad Ptr> char * > so when NYTP_gets() is called, it crashes. > > 'in' is set from the return value of NYTP_open(). > I have not the faintest idea why such a buggy structure is given back... > > > The file nytprof_10-run.out has this content: > NYTProf 3 0 > # Perl profile database. Generated by Devel::NYTProf on Thu Feb 25 16:47:11 2010 > :basetime=1267112831 > :xs_version=3.02 > :perl_version=5.8.4 > :clock_id=-1 > :ticks_per_sec=1000000 > :nv_size=8 > :PL_perldb=784 > :application=- > P'ð G÷ߦáÒAp'ð.Gá¦áÒA > > > Hope that helps, > Heiko > >
CC: "develnytprof-dev [...] googlegroups.com" <develnytprof-dev [...] googlegroups.com>
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <20100227220943.GC1375 [...] timac.local>
Acceptlanguage: de-DE
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local>
Content-Language: de-DE
Message-ID: <F60601FA7F635A49B7960C8FD9BFF9650333D4AB59 [...] DEFTHW99EA4MSX.ww902.siemens.net>
Content-Type: text/plain; charset="utf-8"
X-MS-Tnef-Correlator:
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id EB1B619B8013 for <bug-devel-nytprof [...] rt.cpan.org>; Mon, 1 Mar 2010 05:02:15 -0500 (EST)
Received: (qmail 9762 invoked by uid 103); 1 Mar 2010 10:02:15 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 1 Mar 2010 10:02:15 -0000
Received: from lizzard.sbs.de (HELO lizzard.sbs.de) (194.138.37.39) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Mon, 01 Mar 2010 02:01:39 -0800
Received: from mail1.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o219xU5X032681; Mon, 1 Mar 2010 10:59:30 +0100
Received: from DEFTHW99ET0MSX.ww902.siemens.net (defthw99et0msx.ww902.siemens.net [157.163.145.17]) by mail1.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o219xUsG011892; Mon, 1 Mar 2010 10:59:30 +0100
Received: from DEFTHW99EA4MSX.ww902.siemens.net ([169.254.1.69]) by DEFTHW99ET0MSX.ww902.siemens.net ([157.163.145.17]) with mapi; Mon, 1 Mar 2010 10:59:30 +0100
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: AW: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
Return-Path: <heiko.eissfeldt [...] siemens.com>
Thread-Index: Acq3+ZRH8eOSK9LiQVe5TNKAjpPReQBKfHWA
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Date: Mon, 1 Mar 2010 10:59:28 +0100
X-Spam-Level: *
Thread-Topic: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
X-MS-Has-Attach:
To: Tim Bunce <Tim.Bunce [...] pobox.com>, Tim Bunce via RT <bug-devel-nytprof [...] rt.cpan.org>
Accept-Language: de-DE
Content-Transfer-Encoding: quoted-printable
From: "Eissfeldt, Heiko" <heiko.eissfeldt [...] siemens.com>
RT-Message-ID: <rt-3.8.HEAD-12689-1267437775-30.55049-0-0 [...] rt.cpan.org>
Content-Length: 3692
Download (untitled) / with headers
text/plain 3.6k
Hi Tim, sorry, no changes so far. I changed the test => the app crashed. So I installed the module and ran it like proposed. The app crashed, the debugger points to the same location for the crash as in my previous email. Sorry, no output file is created since the reading fails before. H:\.cpan\build\Devel-NYTProf-3.01_94>nytprofhtml --file t/nytprof_10-run.out # trace=99 Generating report... Reading t/nytprof_10-run.out reading profile data from file t/nytprof_10-run.out <CRASH> ====== Please convince me, that the NYTP_open() function is implemented correctly (that is portably). During debugging I found the call to fopen() in NYTP_open() is made into perl58.dll instead of to the equally named function of the C library. I am sure fopen() returns the buggy structure that is used later in NYTP_gets(). Is PerlIO_open needed here instead? Sorry for the bads news, greetings Heiko Show quoted text
-----Ursprüngliche Nachricht----- Just a hunch... try editing t/10-run.t like this: --- t/10-run.t (revision 1085) +++ t/10-run.t (working copy) @@ -11,7 +11,7 @@ use Devel::NYTProf::Run qw(profile_this); run_test_group( { - extra_options => { stmts => 0 }, # RT#50851 + extra_options => { stmts => 0, compress => 0 }, # RT#50851 extra_test_count => 1, extra_test_code => sub { my ($profile, $env) = @_; and let us know (ASAP please as this is the last issue holding up a release). If that does _not_ fix it then please: 1. install the module 2. set the NYTPROF env vat to "trace=99" 3. send me the output of: nytprofhtml --file nytprof_10-run.out Thanks. Tim. On Sat, Feb 27, 2010 at 04:42:59PM -0500, Tim Bunce via RT wrote:
> I am just doing bug hunting for Devel-NYTProf-3.01_94<http://search.cpan.org/~timb/Devel-NYTProf-3.01_94/> > under Windows XP with ActiveState Perl 5.8.4 and want to tell you my finds. > > Symptom: > 'make tests' first dies at t/10-run.t and very often in later tests. > > This is the call stack at that point: > msvcr71.dll!_lock_file(void * pf=0x77c5fce0) Line 236 C > msvcr71.dll!fgets(char * string=0x01ce8a24, int count=2048, _iobuf * str=0x77c5fce0) Line 69 + 0x6 C > NYTProf.dll!NYTP_gets(NYTP_file_t * ifile=0x01ce5b9c, char * * buffer_p=0x0140fd28, unsigned int * len_p=0x0140fc7c) Line 369 + 0xf C
> > NYTProf.dll!load_profile_data_from_stream(sv * cb=0x01ce5b9c) Line 3635 + 0x13 C
> NYTProf.dll!XS_Devel__NYTProf__Data_load_profile_data_from_file(interpreter * my_perl=0x00236004, cv * cv=0x01bce6f8) Line 4584 C > perl58.dll!28040f9f() > The problem seems to be this: > > load_profile_data_from_stream() uses the 'in' filepointer, which is somehow corrupted. > > That is > 'in' points to a structure NYTP_file_t containing the > 'file' pointer pointing to a structure _iobuf which has only NULL pointers > > > > - in 0x01ce5b9c {file=0x77c5fce0 NYTP_file_t * > - file 0x77c5fce0 _iobuf * > + _ptr 0x00000000 <bad Ptr> char * > _cnt 0 int > + _base 0x00000000 <bad Ptr> char * > _flag 1 int > _file 3 int > _charbuf 0 int > _bufsiz 0 int > + _tmpfname 0x00000000 <bad Ptr> char * > so when NYTP_gets() is called, it crashes. > > 'in' is set from the return value of NYTP_open(). > I have not the faintest idea why such a buggy structure is given back... > > > The file nytprof_10-run.out has this content: > NYTProf 3 0 > # Perl profile database. Generated by Devel::NYTProf on Thu Feb 25 16:47:11 2010 > :basetime=1267112831 > :xs_version=3.02 > :perl_version=5.8.4 > :clock_id=-1 > :ticks_per_sec=1000000 > :nv_size=8 > :PL_perldb=784 > :application=- > P'ð G÷ߦáÒAp'ð.Gá¦áÒA > > > Hope that helps, > Heiko > >
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <20100227220943.GC1375 [...] timac.local>
Acceptlanguage: de-DE
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local>
Content-Language: de-DE
Message-ID: <F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4 [...] DEFTHW99EA4MSX.ww902.siemens.net>
Content-Type: multipart/mixed; boundary="_002_F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4DEFTHW99EA4MS_"
X-MS-Tnef-Correlator:
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 90FD54D8002 for <bug-devel-nytprof [...] rt.cpan.org>; Mon, 1 Mar 2010 10:13:30 -0500 (EST)
Received: (qmail 26761 invoked by uid 103); 1 Mar 2010 15:13:29 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 1 Mar 2010 15:13:29 -0000
Received: from lizzard.sbs.de (HELO lizzard.sbs.de) (194.138.37.39) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Mon, 01 Mar 2010 07:12:53 -0800
Received: from mail1.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o21F65SB032396; Mon, 1 Mar 2010 16:06:05 +0100
Received: from DEFTHW99ET3MSX.ww902.siemens.net (defthw99et3msx.ww902.siemens.net [157.163.135.164]) by mail1.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o21F64g7017220; Mon, 1 Mar 2010 16:06:05 +0100
Received: from DEFTHW99EA4MSX.ww902.siemens.net ([169.254.1.69]) by DEFTHW99ET3MSX.ww902.siemens.net ([157.163.135.164]) with mapi; Mon, 1 Mar 2010 16:06:04 +0100
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: AW: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
Return-Path: <heiko.eissfeldt [...] siemens.com>
Thread-Index: Acq3+ZRH8eOSK9LiQVe5TNKAjpPReQBVdy2g
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Date: Mon, 1 Mar 2010 16:06:03 +0100
X-Spam-Level: *
Thread-Topic: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
X-MS-Has-Attach: yes
To: Tim Bunce <Tim.Bunce [...] pobox.com>, Tim Bunce via RT <bug-devel-nytprof [...] rt.cpan.org>
Accept-Language: de-DE
From: "Eissfeldt, Heiko" <heiko.eissfeldt [...] siemens.com>
RT-Message-ID: <rt-3.8.HEAD-12694-1267456425-1638.55049-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 969
Download (untitled) / with headers
text/plain 969b
Hi Tim, More info: The preprocessed output of file FileHandle.c (FileHandle.i, see attachment) has this call to fopen() in function NYTP_open(): FILE *raw_file = (*(*Perl_IStdIO_ptr(((PerlInterpreter *)Perl_get_context())))->pOpen)((*Perl_IStdIO_ptr(((PerlInterpreter *)Perl_get_context()))), (name),(mode)); From this original line FILE *raw_file = fopen(name, mode); It does not seem compatible with libc's fopen()... Here is the complete expanded function NYTP_open(): NYTP_file NYTP_open(const char *name, const char *mode) { FILE *raw_file = (*(*Perl_IStdIO_ptr(((PerlInterpreter *)Perl_get_context())))->pOpen)((*Perl_IStdIO_ptr(((PerlInterpreter *)Perl_get_context()))), (name),(mode)); NYTP_file file; if (!raw_file) return 0; (file = (struct NYTP_file_t*)Perl_safesysmalloc((size_t)((1)*sizeof(struct NYTP_file_t)))); file->file = raw_file; return file; } Mit freundlichen Grüßen Heiko Eißfeldt
Content-Description: FileHandle.i.gz
content-type: application/x-gzip; name="FileHandle.i.gz"
content-disposition: attachment; creation-date="Mon, 01 Mar 2010 16:05:26 GMT"; filename="FileHandle.i.gz"; modification-date="Mon, 01 Mar 2010 15:53:33 GMT"; size="135024"
Content-Transfer-Encoding: base64
Content-Length: 135024
Download FileHandle.i.gz
application/x-gzip 131.8k

Message body not shown because it is not plain text.

MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12694-1267456425-1638.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12694-1267456425-1638.55049-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1268218337-12682-125"
Message-ID: <rt-3.8.HEAD-12682-1268218337-871.55049-0-0 [...] rt.cpan.org>
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 462
Download (untitled) / with headers
text/plain 462b
Hello Tim, I saw, development is progressing fast, so I need to tell you fast about my work. I could fix the crash for 3.01_94 under Windows XP by rewriting FileHandle.xs with the portable Perl IO API (according to the book; see docs perlclib and perlapio). My Perl used PERLIO, btw. Tests are not succeeding yet, alas. But that is a secondary matter. Please compare the attached code against 3.01_94 und consider/review the rewritten code. Thanks Heiko
MIME-Version: 1.0
Subject: NYTProf.xs
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset="utf-8"; name="NYTProf.xs"
Content-Disposition: inline; filename="NYTProf.xs"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 170671
Download NYTProf.xs
text/x-csrc 166.6k

Message body is not shown because it is too large.

MIME-Version: 1.0
Subject: Oops, wrong attachment
In-Reply-To: <rt-3.8.HEAD-12682-1268218337-871.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12694-1267456425-1638.55049-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-12682-1268218337-871.55049-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1268218492-12694-158"
Message-ID: <rt-3.8.HEAD-12694-1268218492-1774.55049-0-0 [...] rt.cpan.org>
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 56
Oops, the attachment was the wrong one. Here it comes...
MIME-Version: 1.0
Subject: FileHandle.xs
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset="utf-8"; name="FileHandle.xs"
Content-Disposition: inline; filename="FileHandle.xs"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 21610
Download FileHandle.xs
text/x-csrc 21.1k

Message body is not shown because it is too large.

CC: Tim.Bunce [...] pobox.com, develnytprof-dev [...] googlegroups.com
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,SPF_PASS
In-Reply-To: <rt-3.8.HEAD-12682-1268218340-124.55049-6-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12694-1267456425-1638.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12682-1268218340-124.55049-6-0 [...] rt.cpan.org>
Message-ID: <20100310133143.GS1375 [...] timac.local>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 4B3664D801F for <bug-devel-nytprof [...] rt.cpan.org>; Wed, 10 Mar 2010 08:32:29 -0500 (EST)
Received: (qmail 6439 invoked by uid 103); 10 Mar 2010 13:32:28 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 10 Mar 2010 13:32:28 -0000
Received: from mail-wy0-f178.google.com (HELO mail-wy0-f178.google.com) (74.125.82.178) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Wed, 10 Mar 2010 05:31:53 -0800
Received: by wyb34 with SMTP id 34so299063wyb.9 for <bug-devel-nytprof [...] rt.cpan.org>; Wed, 10 Mar 2010 05:31:42 -0800 (PST)
Received: by 10.216.88.203 with SMTP id a53mr705677wef.177.1268227901896; Wed, 10 Mar 2010 05:31:41 -0800 (PST)
Received: from timac.local ([86.47.232.121]) by mx.google.com with ESMTPS id u14sm21473628gvf.2.2010.03.10.05.31.38 (version=SSLv3 cipher=RC4-MD5); Wed, 10 Mar 2010 05:31:39 -0800 (PST)
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
User-Agent: Mutt/1.5.20 (2009-06-14)
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=HjTrfkiSgEdxjdA4lKXSyiKXKOFS+3TkpxGMrVP94YW8sAtwROtWl61zWn33GnaUda WuBzxPZ0jaLegh7IgfSCUor1teTOvpStcw6RfP0Ki0HpbZbJfY73IuVvUirlHvKcE5fF Kq70g5qdwW9gNs12yyqNiuvPajptOWsX0MffU=
Return-Path: <tim.bunce [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Q5Yu0Lz6aFE+2Q8O6P/FyRdvPfGESyhmLMv0vCaFtMM=; b=JND4CdsaNKTkMBk0ws5e4gghrDXU2P1MdWGYE4zJPb9BfgyxLhZMAxeOqjmTHWwZjF 96oQkZ1BWM5QME3iYobcmOiu7pdv8oVE3c6dJo5XmBehgT6nGbnhXIYJrAV1BVpQ1Zz7 67ZmCosfwthIQ2VhPa1gJoVV8LZ+iFc8GkUek=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Date: Wed, 10 Mar 2010 13:31:43 +0000
Sender: Tim Bunce <tim.bunce [...] gmail.com>
X-Spam-Level: *
To: Heiko via RT <bug-devel-nytprof [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-12689-1268228021-1515.55049-0-0 [...] rt.cpan.org>
Content-Length: 827
Download (untitled) / with headers
text/plain 827b
On Wed, Mar 10, 2010 at 05:52:20AM -0500, Heiko via RT wrote: Show quoted text
> > I could fix the crash for 3.01_94 under Windows XP > by rewriting FileHandle.xs with the portable Perl IO API > (according to the book; see docs perlclib and perlapio). My Perl used > PERLIO, btw. > > Tests are not succeeding yet, alas. But that is a secondary matter. > > Please compare the attached code against 3.01_94 und consider/review > the rewritten code.
Thanks Heiko [I've attached the diff for the record.] The problem is that really we'd like to reduce perl'isms in the FileHandle.xs I/O code rather than add more. The I/O is simple so shouldn't be too hard to port to windows, in theory. In the course of investigating this did you identify an actual cause? Could it be related to http://perl.markmail.org/thread/2ixdrw25huun2fx5 ? Tim.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12689-1268228021-1515.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12694-1267456425-1638.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12682-1268218340-124.55049-6-0 [...] rt.cpan.org> <20100310133143.GS1375 [...] timac.local> <rt-3.8.HEAD-12689-1268228021-1515.55049-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1268303304-12681-155"
Message-ID: <rt-3.8.HEAD-12681-1268303303-1573.55049-0-0 [...] rt.cpan.org>
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 683
Download (untitled) / with headers
text/plain 683b
Show quoted text
> In the course of investigating this did you identify an actual cause?
Not really. The mapped fopen() function returns something not appropriate for further use of non PERLAPIO functions... Show quoted text
> Could it be related to
http://perl.markmail.org/thread/2ixdrw25huun2fx5 ? In the widest sense, yes. PERLIO adds another level of indirection for IO Layers as far I understand. This can only work, if used with new functions from PERLAPIO. Alternatively we could block the mappings and use the libc functions directly. That is what I did, and it compiled, and the module did not crash. But how portable that is, I don't know. See attached diff (against 3.0.1_94) for FileHandle.xs
MIME-Version: 1.0
Subject: FileHandle.xs.patch
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset="utf-8"; name="FileHandle.xs.patch"
Content-Disposition: inline; filename="FileHandle.xs.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 418
Download FileHandle.xs.patch
text/x-diff 418b
--- FileHandle.xs.org 2010-02-21 17:34:28.000000000 +0100 +++ FileHandle.xs 2010-03-11 11:15:54.826391900 +0100 @@ -18,6 +18,18 @@ #define NEED_sv_2pvbyte #include "ppport.h" +/* deliberately throw IO mappings away */ +#undef fgets +#undef fopen +#undef fclose +#undef fread +#undef fwrite +#undef ftell +#undef fprintf +#undef vfprintf +#undef feof +#undef fflush + #ifdef HAS_ZLIB # include <zlib.h> #endif
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12681-1268303303-1573.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12694-1267456425-1638.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12682-1268218340-124.55049-6-0 [...] rt.cpan.org> <20100310133143.GS1375 [...] timac.local> <rt-3.8.HEAD-12689-1268228021-1515.55049-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-12681-1268303303-1573.55049-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1268310085-12689-176"
Message-ID: <rt-3.8.HEAD-12689-1268310084-114.55049-0-0 [...] rt.cpan.org>
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 44
Looking better now. Here is the test output.
MIME-Version: 1.0
Subject: testresults.out.gz
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: application/x-gzip-compressed; name="testresults.out.gz"
Content-Disposition: inline; filename="testresults.out.gz"
Content-Transfer-Encoding: base64
Content-Length: 1788
Download testresults.out.gz
application/x-gzip-compressed 1.7k

Message body not shown because it is not plain text.

MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12689-1268310084-114.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-55049 [...] rt.cpan.org> <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <F60601FA7F635A49B7960C8FD9BFF9650333D4ACB4 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12694-1267456425-1638.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12682-1268218340-124.55049-6-0 [...] rt.cpan.org> <20100310133143.GS1375 [...] timac.local> <rt-3.8.HEAD-12689-1268228021-1515.55049-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-12681-1268303303-1573.55049-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-12689-1268310084-114.55049-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12694-1268320276-1322.55049-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 1433
Download (untitled) / with headers
text/plain 1.3k
Am Do 11. Mär 2010, 07:21:25, heiko@hexco.de schrieb: Show quoted text
> Looking better now. Here is the test output.
rechecked with my latest diff (#undef ...) against 3.10_51: only one test out of 2598 tests failed, good work :-) Z:\.cpan\build\Devel-NYTProf-3.10_51>nmake test Microsoft (R) Program Maintenance Utility, Version 7.10.3077 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten. Z:\WINNT\Perl\bin\perl.exe -MExtUtils::Command -e "cp" -- blib\arch\auto\Devel\NYTProf\NYTProf.dll blib\lib/Devel/auto/Devel\NYTProf/NYTProf.dll Z:\WINNT\Perl\bin\perl.exe "-MExtUtils::Command::MM" "- e" "test_harness(0, 'blib\lib', 'blib\arch')" t/50-errno.t t/50-errno....ok 3/8 t/50-errno....NOK 4# Failed test '$! should not be altered by assigning fids to previously unprofiled modules (No such file or directory)' # at t/50-errno.t line 31. # got: '2' # expected: '3' t/50-errno....ok 8/8# Looks like you failed 1 test of 8. t/50-errno....dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 4 Failed 1/8 tests, 87.50% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- t/50-errno.t 1 256 8 1 12.50% 4 Failed 1/1 test scripts, 0.00% okay. 1/8 subtests failed, 87.50% okay. NMAKE : fatal error U1077: 'Z:\WINNT\Perl\bin\perl.exe': Rⁿckgabe- Code '0x2' Stop.
CC: Tim.Bunce [...] pobox.com, develnytprof-dev [...] googlegroups.com, Jan Dubois <jand [...] activestate.com>
MIME-Version: 1.0
X-Spam-Status: No, hits=4.0 required=8.0 tests=DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_CBL,SPF_PASS
In-Reply-To: <rt-3.8.HEAD-12681-1268303308-816.55049-6-0 [...] rt.cpan.org>
Content-Disposition: inline
Message-ID: <20100311221357.GA512 [...] timac.local>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 9E97C4D8022 for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 17:14:54 -0500 (EST)
Received: (qmail 12310 invoked by uid 103); 11 Mar 2010 22:14:53 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 11 Mar 2010 22:14:53 -0000
Received: from mail-ww0-f50.google.com (HELO mail-ww0-f50.google.com) (74.125.82.50) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 11 Mar 2010 14:14:18 -0800
Received: by wwb13 with SMTP id 13so376563wwb.9 for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 14:14:05 -0800 (PST)
Received: by 10.216.177.15 with SMTP id c15mr541253wem.103.1268345644114; Thu, 11 Mar 2010 14:14:04 -0800 (PST)
Received: from timac.local ([89.204.227.21]) by mx.google.com with ESMTPS id x6sm1591971gvf.13.2010.03.11.14.14.00 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 14:14:01 -0800 (PST)
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
User-Agent: Mutt/1.5.20 (2009-06-14)
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:in-reply-to:user-agent; b=Cu2c+auJJkRqLsr1Zx7bc2C0oQn7M0BVZn8tudAoZxc2PRiLxe9FCKo3egx45hkj13 9bg2jB7L/Jv3G5XjNQSLg0W+BAOXAVgkBSbIH93ho6sib7fQRix5shM0pyTzrO1XYPs2 56zVa5/WevgrvyNyS/aBga7ZIl55fc0VGwbss=
Return-Path: <tim.bunce [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=df9NEvG4whTGIhdJtNcAV/BruxPSwTiyCnMTqNCPedM=; b=PUl0lvX0+EmsUtwge54Hc8xTs5vjsAncZXZHk8ZcWS26iYty/KuTAmbyeSrqfcnhhw Rev+R/kMdudS0DUKRPMqwMNtyyFBehkZACsnfeTnlSeu66vK3Y5/SHwec1szR7Vuz66J l+KK9l5/nbm/AzJp/WEMiKP9tV49HVrPCtWFg=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Date: Thu, 11 Mar 2010 22:13:57 +0000
Sender: Tim Bunce <tim.bunce [...] gmail.com>
X-Spam-Level: ****
To: Heiko via RT <bug-devel-nytprof [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-12691-1268345717-269.55049-0-0 [...] rt.cpan.org>
Content-Length: 1993
Download (untitled) / with headers
text/plain 1.9k
On Thu, Mar 11, 2010 at 05:28:30AM -0500, Heiko via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=55049 > >
> > In the course of investigating this did you identify an actual cause?
> > Not really. The mapped fopen() function returns something not > appropriate for further use of non PERLAPIO functions... >
> > Could it be related to
> http://perl.markmail.org/thread/2ixdrw25huun2fx5 ? > > In the widest sense, yes. > > PERLIO adds another level of indirection for IO Layers as far I > understand. This can only work, if used with new functions from > PERLAPIO. > > Alternatively we could block the mappings and use the libc functions > directly. That is what I did, and it compiled, and the module did not > crash. But how portable that is, I don't know. > > See attached diff (against 3.0.1_94) for FileHandle.xs
Show quoted text
> rechecked with my latest diff (#undef ...) against 3.10_51: > > only one test out of 2598 tests failed, good work :-)
[t/50-errno.t - I'll reply in a seperate email about that one.] Show quoted text
> --- FileHandle.xs.org 2010-02-21 17:34:28.000000000 +0100 > +++ FileHandle.xs 2010-03-11 11:15:54.826391900 +0100 > @@ -18,6 +18,18 @@ > #define NEED_sv_2pvbyte > #include "ppport.h" > > +/* deliberately throw IO mappings away */ > +#undef fgets > +#undef fopen > +#undef fclose > +#undef fread > +#undef fwrite > +#undef ftell > +#undef fprintf > +#undef vfprintf > +#undef feof > +#undef fflush
I'm happy with the approach, but I'd like to wrap it in an #ifdef so it only applies to the affected platforms. What puzzles me is why Jan didn't hit the same problem in http://groups.google.com/group/develnytprof-dev/browse_frm/thread/7ec4850ff164c95b/e241a51712be9efd#e241a51712be9efd You said you're using "Windows XP with ActiveState Perl 5.8.4" Could you post your perl -V output so we get the full details? Jan, could you do the same so we can compare? I want to find an appropriate #ifdef incantation to wrap it with. Any suggestions? Tim.
MIME-Version: 1.0
X-Spam-Status: No, hits=-4.0 required=8.0 tests=PERLBUG_CONF,SPF_PASS
In-Reply-To: <20100311221357.GA512 [...] timac.local>
X-Mailer: Microsoft Outlook 14.0
References: <rt-3.8.HEAD-12681-1268303308-816.55049-6-0 [...] rt.cpan.org> <20100311221357.GA512 [...] timac.local>
Content-Language: en-us
Message-ID: <003901cac16b$a0ecdee0$e2c69ca0$ [...] activestate.com>
Content-Type: text/plain; charset="utf-8"
Organization: ActiveState Software Inc
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id A86CD4D801E for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 17:39:40 -0500 (EST)
Received: (qmail 25224 invoked by uid 103); 11 Mar 2010 22:39:39 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 11 Mar 2010 22:39:39 -0000
Received: from mx.activestate.com (HELO mx.activestate.com) (204.244.102.3) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 11 Mar 2010 14:39:04 -0800
Received: from box5.activestate.com (box25.activestate.com [192.168.69.70]) by mx.activestate.com (Postfix) with ESMTP id ECF6818026; Thu, 11 Mar 2010 14:38:53 -0800 (PST)
Received: from Uniseven (dhcp-24.activestate.com [192.168.69.24]) by box5.activestate.com (Postfix) with ESMTP id 8B297B8362; Thu, 11 Mar 2010 14:38:53 -0800 (PST)
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: RE: [develnytprof-dev: 1825] Re: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
Return-Path: <jand [...] activestate.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Thread-Index: AQGCBGUGuqh3LXzXQvCpGI8QWVjccwI0e2m5Ac71NPo=
Date: Thu, 11 Mar 2010 14:38:52 -0800
X-Spam-Level: *
To: <develnytprof-dev [...] googlegroups.com>, "'Heiko via RT'" <bug-devel-nytprof [...] rt.cpan.org>
Content-Transfer-Encoding: 7bit
From: "Jan Dubois" <jand [...] activestate.com>
RT-Message-ID: <rt-3.8.HEAD-12689-1268347191-449.55049-0-0 [...] rt.cpan.org>
Content-Length: 4311
Download (untitled) / with headers
text/plain 4.2k
On Thu, 11 Mar 2010, Tim Bunce wrote: Show quoted text
> You said you're using "Windows XP with ActiveState Perl 5.8.4" > Could you post your perl -V output so we get the full details? > > Jan, could you do the same so we can compare?
I've attached it at the bottom, but AFAIK there was only a single ActivePerl release for 5.8.4 (build 810), so the output should be identical. Show quoted text
> I want to find an appropriate #ifdef incantation to wrap it with.
As everything worked for me, it seems unlikely that there is any #define that would explain the difference. Things that are still different in Heiko's setup are the compiler version (Visual Studio 2003 I think) and OS (Windows XP). I've been using VC6 and MingW for the compilers and Win2000 for the test VM (but probably not MinGW with 5.8.4 because build 810 doesn't support this without some tweaks). Show quoted text
> Any suggestions?
If anything I would suspect that the compiler version might make a difference (and or the Platform SDK, if installed). But I'm not keen on spending too much time on testing a 7 year old compiler with a 6 year old version of ActivePerl unless the problem can also be reproduced with a current version of Perl. Ok, I have one more idea: When you compile a module with VS2003, then that module links against MSVCR71.dll instead of MSVCRT.dll, so you end up with 2 CRT libraries inside a single process. This normally works fine as long as you don't mix things like memory allocation (call MSVCR71.free() on a pointer returned by MSVCRT.malloc()) and file I/O (call MSVCR71.fputs() on a FILE* returned by MSVCRT.fopen()) etc. All the macro redefinitions in the Perl headers are supposed to protect you from these mixups, but there may be a bug somewhere. I don't have a VM with VS2003, and I don't know if I have a license anywhere anymore anyways, so it is not easy for me to test. Cheers, -Jan Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -NO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C: \Perl810\lib\CORE" -machine:x86' libpth=C:\PROGRA~1\MICROS~3\VC98\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib gnulibc_version='undef' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl810\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_ CONTEXT PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 810 22751 Update to Test.pm 1.25 21540 Fix backward-compatibility issues in if.pm Built under MSWin32 Compiled at Jun 1 2004 11:52:21 @INC: c:/Perl810/lib c:/Perl810/site/lib .
CC: Tim.Bunce [...] pobox.com, develnytprof-dev [...] googlegroups.com
MIME-Version: 1.0
X-Spam-Status: No, hits=4.0 required=8.0 tests=DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_CBL,SPF_PASS
In-Reply-To: <rt-3.8.HEAD-12694-1268320276-1280.55049-6-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <rt-3.8.HEAD-12694-1267456425-1638.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12682-1268218340-124.55049-6-0 [...] rt.cpan.org> <20100310133143.GS1375 [...] timac.local> <rt-3.8.HEAD-12689-1268228021-1515.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12681-1268303303-1573.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12689-1268310084-114.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12694-1268320276-1280.55049-6-0 [...] rt.cpan.org>
Message-ID: <20100311225557.GB512 [...] timac.local>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id AADEC4D801E for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 17:56:43 -0500 (EST)
Received: (qmail 13680 invoked by uid 103); 11 Mar 2010 22:56:43 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 11 Mar 2010 22:56:43 -0000
Received: from mail-wy0-f178.google.com (HELO mail-wy0-f178.google.com) (74.125.82.178) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 11 Mar 2010 14:56:07 -0800
Received: by wyb34 with SMTP id 34so270575wyb.9 for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 14:55:55 -0800 (PST)
Received: by 10.216.88.68 with SMTP id z46mr443776wee.215.1268348155412; Thu, 11 Mar 2010 14:55:55 -0800 (PST)
Received: from timac.local ([89.204.227.21]) by mx.google.com with ESMTPS id p10sm1584517gvf.7.2010.03.11.14.55.53 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 14:55:54 -0800 (PST)
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
User-Agent: Mutt/1.5.20 (2009-06-14)
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=qo4XcJR/lpb/OSYUcgTo4RC4LLEQFwVqPBJpKFxHEVPcxoxYOu38ueLVBWCoagTggO gipgbdmlk/RubKhBb5NB3HOpdej6j5IgGXHS4vlUE8J6jrhIWFTCEb8mRM8OpE+71mf0 k9mEDUv3u5urWcZICa75F6ln8sGx/WwjcAekY=
Return-Path: <tim.bunce [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=yaRbXR29baPKIjnPhSUx84Bzb13erDb/RUvHnZj4CqE=; b=ppqerWz0w6ncpCXVZvFFSE16Cl8bqggWrUvrRe4xvWWPwsqlRQzvV3tLXEbdfLkBN8 8cHMzLEGL1iatC1AiF+hUfc//W8pnluYbQxO/ZndfvROI0XE1L2qp9wOhY7B5h3zzbM+ hP33tcmVQ4Q/gh4iNi4p0JzHdmtsr7NfXeYRk=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Date: Thu, 11 Mar 2010 22:55:57 +0000
Sender: Tim Bunce <tim.bunce [...] gmail.com>
X-Spam-Level: ****
To: Heiko via RT <bug-devel-nytprof [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-12685-1268348214-871.55049-0-0 [...] rt.cpan.org>
Content-Length: 1351
Download (untitled) / with headers
text/plain 1.3k
On Thu, Mar 11, 2010 at 10:11:19AM -0500, Heiko via RT wrote: Show quoted text
> > rechecked with my latest diff (#undef ...) against 3.10_51: > > only one test out of 2598 tests failed, good work :-) > > t/50-errno....NOK 4# Failed test '$! should not be altered by > assigning fids to previously unprofiled modules (No such file or > directory)' > # at t/50-errno.t line 31. > # got: '2' > # expected: '3'
I can't reproduce this. The NYTProf.xs code has logic to save and restore errno around the entry points to/from perl. I tried adding code in FileHandle.xs to explicitly set errno in all the i/o functions but still couldn't get test failures (unless I also disabled the errno save/restore logic). I tried with and without zlib. r1166. Is it reliably repeatable for you? To help me narrow down the cause please try the following changes: - edit t/50-errno.t to delete everything after line 31. - change the test count from 8 to 4 - rerun to check it fails the same way - rerun with each of the following changes to $ENV{NYTPROF} (line 6): "start=init:file=$nytprof_out:blocks=0:stmts=0" "start=init:file=$nytprof_out:blocks=0:subs=0" "start=init:file=$nytprof_out:blocks=0:stmts=0:subs=0" - also send me (off-list) the log from running whichever is the last of those which fails, but with ":trace=90" appended to it. Thanks! Tim.
CC: 'Heiko via RT' <bug-devel-nytprof [...] rt.cpan.org>
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,PERLBUG_CONF,RCVD_IN_CBL,SPF_PASS
In-Reply-To: <003901cac16b$a0ecdee0$e2c69ca0$ [...] activestate.com>
Content-Disposition: inline
References: <rt-3.8.HEAD-12681-1268303308-816.55049-6-0 [...] rt.cpan.org> <20100311221357.GA512 [...] timac.local> <003901cac16b$a0ecdee0$e2c69ca0$ [...] activestate.com>
Message-ID: <20100311234920.GD512 [...] timac.local>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id D56514D80DE for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 18:50:08 -0500 (EST)
Received: (qmail 17701 invoked by uid 103); 11 Mar 2010 23:50:08 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 11 Mar 2010 23:50:08 -0000
Received: from mail-ww0-f50.google.com (HELO mail-ww0-f50.google.com) (74.125.82.50) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 11 Mar 2010 15:49:33 -0800
Received: by wwb13 with SMTP id 13so424393wwb.9 for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 15:49:21 -0800 (PST)
Received: by 10.216.90.133 with SMTP id e5mr2618261wef.23.1268351361803; Thu, 11 Mar 2010 15:49:21 -0800 (PST)
Received: from timac.local ([89.204.227.21]) by mx.google.com with ESMTPS id p37sm1796511gvf.10.2010.03.11.15.49.19 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 15:49:20 -0800 (PST)
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: Re: [develnytprof-dev: 1826] Re: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
User-Agent: Mutt/1.5.20 (2009-06-14)
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=XvE3aKzAwvR327W/zrHKfCpBA61/TWpR8bir31cjWcofkvAdPLztUNTTFD0k0MhWo2 uB+NfSzoN+EI4BW68qe8EGhRcJDe2YVtiWxxvc7MHlFiVMdS6zNhShKUZX1Klh/8dgZ1 BPbqxYC5lXWE2f7SW+yNYXmDxRzDO82wol4/g=
Return-Path: <tim.bunce [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=rpb7vu0Uis5Kgsb9BDCtNkOZYgTLmNhb8YNRpmFQuCc=; b=JixpBTMmYex84CPTjsc8g94XDza/jTIYEMg1kSTnzpWwDYWmk6dAsP+5Zza3rPQGk8 pC9EqSJCzNoiLWPhgCDgIs8JkXRnwF7XYHaZDTliib55LC/HIi5YgsKXN8yDJ6rF9JXI FSSn0KoHwzw6wkgtfVv7rEjbW1uTH3jpupCsc=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Date: Thu, 11 Mar 2010 23:49:20 +0000
Sender: Tim Bunce <tim.bunce [...] gmail.com>
X-Spam-Level: *
To: develnytprof-dev [...] googlegroups.com
From: Tim Bunce <Tim.Bunce [...] pobox.com>
RT-Message-ID: <rt-3.8.HEAD-12687-1268351420-1717.55049-0-0 [...] rt.cpan.org>
Content-Length: 5562
Download (untitled) / with headers
text/plain 5.4k
Thanks Jan. For Heiko's config, NYTProf is very broken without the #undefs so I'd like to get those in. Assuming your VS2003 hypothesis is correct, is there a macro to detect that compiler? And would using that macro to wrap the #undefs be a reasonable solution? That leaves the t/50-errno.t failures. I'd be happy enough to skip the failing tests on that system. Is there some way in perl to detect that perl was built with VS2003 and/or the dual libraries? If not then I could just skip the tests on windows systems with old versions of perl, say <= 5.8.9. Tim. On Thu, Mar 11, 2010 at 02:38:52PM -0800, Jan Dubois wrote: Show quoted text
> On Thu, 11 Mar 2010, Tim Bunce wrote:
> > You said you're using "Windows XP with ActiveState Perl 5.8.4" > > Could you post your perl -V output so we get the full details? > > > > Jan, could you do the same so we can compare?
> > I've attached it at the bottom, but AFAIK there was only a single ActivePerl > release for 5.8.4 (build 810), so the output should be identical. >
> > I want to find an appropriate #ifdef incantation to wrap it with.
> > As everything worked for me, it seems unlikely that there is any #define > that would explain the difference. > > Things that are still different in Heiko's setup are the compiler version > (Visual Studio 2003 I think) and OS (Windows XP). I've been using VC6 and MingW for > the compilers and Win2000 for the test VM (but probably not MinGW with 5.8.4 > because build 810 doesn't support this without some tweaks). >
> > Any suggestions?
> > If anything I would suspect that the compiler version might make a difference > (and or the Platform SDK, if installed). But I'm not keen on spending too > much time on testing a 7 year old compiler with a 6 year old version of > ActivePerl unless the problem can also be reproduced with a current version > of Perl. > > Ok, I have one more idea: When you compile a module with VS2003, then that module > links against MSVCR71.dll instead of MSVCRT.dll, so you end up with 2 CRT libraries > inside a single process. This normally works fine as long as you don't mix things > like memory allocation (call MSVCR71.free() on a pointer returned by MSVCRT.malloc()) > and file I/O (call MSVCR71.fputs() on a FILE* returned by MSVCRT.fopen()) etc. > All the macro redefinitions in the Perl headers are supposed to protect you from > these mixups, but there may be a bug somewhere. > > I don't have a VM with VS2003, and I don't know if I have a license anywhere anymore > anyways, so it is not easy for me to test. > > Cheers, > -Jan > > Summary of my perl5 (revision 5 version 8 subversion 4) configuration: > Platform: > osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread > uname='' > config_args='undef' > hint=recommended, useposix=true, d_sigaction=undef > usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=undef use64bitall=undef uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -NO_HASH_SEED > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', > optimize='-MD -Zi -DNDEBUG -O1', > cppflags='-DWIN32' > ccversion='', gccversion='', gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 > d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C: > \Perl810\lib\CORE" -machine:x86' > libpth=C:\PROGRA~1\MICROS~3\VC98\lib > libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib > netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib > perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib > oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib > libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib > gnulibc_version='undef' > Dynamic Linking: > dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' > cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl810\lib\CORE" -machine:x86' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_ > CONTEXT PERL_IMPLICIT_SYS > Locally applied patches: > ActivePerl Build 810 > 22751 Update to Test.pm 1.25 > 21540 Fix backward-compatibility issues in if.pm > Built under MSWin32 > Compiled at Jun 1 2004 11:52:21 > @INC: > c:/Perl810/lib > c:/Perl810/site/lib > . > > > -- > You've received this message because you are subscribed to > the Devel::NYTProf Development User group. > > Group hosted at: http://groups.google.com/group/develnytprof-dev > Project hosted at: http://perl-devel-nytprof.googlecode.com > CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf > > To post, email: develnytprof-dev@googlegroups.com > To unsubscribe, email: develnytprof-dev-unsubscribe@googlegroups.com >
CC: "'Heiko via RT'" <bug-devel-nytprof [...] rt.cpan.org>
MIME-Version: 1.0
X-Spam-Status: No, hits=-0.0 required=8.0 tests=SPF_PASS
In-Reply-To: <20100311234920.GD512 [...] timac.local>
X-Mailer: Microsoft Outlook 14.0
References: <rt-3.8.HEAD-12681-1268303308-816.55049-6-0 [...] rt.cpan.org> <20100311221357.GA512 [...] timac.local> <003901cac16b$a0ecdee0$e2c69ca0$ [...] activestate.com> <20100311234920.GD512 [...] timac.local>
Content-Language: en-us
Message-ID: <007601cac190$c67b4820$5371d860$ [...] activestate.com>
Content-Type: text/plain; charset="utf-8"
Organization: ActiveState Software Inc
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id D134919B8025 for <bug-devel-nytprof [...] rt.cpan.org>; Thu, 11 Mar 2010 22:05:04 -0500 (EST)
Received: (qmail 9654 invoked by uid 103); 12 Mar 2010 03:05:03 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 12 Mar 2010 03:05:03 -0000
Received: from mx.activestate.com (HELO mx.activestate.com) (204.244.102.3) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 11 Mar 2010 19:04:58 -0800
Received: from box5.activestate.com (box25.activestate.com [192.168.69.70]) by mx.activestate.com (Postfix) with ESMTP id 45DD918247; Thu, 11 Mar 2010 19:04:48 -0800 (PST)
Received: from Uniseven (dhcp-142.activestate.com [192.168.69.142]) by box5.activestate.com (Postfix) with ESMTP id 395A6B8008; Thu, 11 Mar 2010 19:04:48 -0800 (PST)
Delivered-To: cpan-bug+devel-nytprof [...] diesel.bestpractical.com
Subject: RE: [develnytprof-dev: 1830] Re: [rt.cpan.org #55049] Devel-NYTProf-3.01_94 under Windows XP
Return-Path: <jand [...] activestate.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-devel-nytprof [...] rt.cpan.org
Thread-Index: AQGCBGUGuqh3LXzXQvCpGI8QWVjccwI0e2m5Ac71NPoBx7q/GQKUSAwy
Date: Thu, 11 Mar 2010 19:04:47 -0800
X-Spam-Level: *
To: <develnytprof-dev [...] googlegroups.com>
Content-Transfer-Encoding: 7bit
From: "Jan Dubois" <jand [...] activestate.com>
RT-Message-ID: <rt-3.8.HEAD-12691-1268363123-1170.55049-0-0 [...] rt.cpan.org>
Content-Length: 2319
Download (untitled) / with headers
text/plain 2.2k
On Thu, 11 Mar 2010, Tim Bunce wrote: Show quoted text
> > For Heiko's config, NYTProf is very broken without the #undefs > so I'd like to get those in. Assuming your VS2003 hypothesis is correct, > is there a macro to detect that compiler? And would using that macro > to wrap the #undefs be a reasonable solution?
I've verified my "conflicting CRT version" hypothesis now (with VS2008). The issue is indeed a bug in XSUB.h. I've added a workaround for that in r1168. Note that the problem is not specifically about the VS2003 compiler; it is about mixing several different C runtime libraries. The reason I recommend MinGW if you don't have access to VC6 is that it is also using MSVCRT.dll as the runtime library. (MSVCRT.dll is part of Windows itself and not linked to a particular compiler version, which is one of the reasons why ActivePerl continues to be compiled with VC6). Show quoted text
> That leaves the t/50-errno.t failures. I'd be happy enough to > skip the failing tests on that system. Is there some way in perl to > detect that perl was built with VS2003 and/or the dual libraries? > If not then I could just skip the tests on windows systems with old > versions of perl, say <= 5.8.9.
This is again a problem of multiple runtime libraries. The errno you are setting in Devel-NYTProf is not the same that any of the redirected FILE* operations are modifying, so the whole saving/restoring errno doesn't work in this case. errno is not covered at all by the Perl macro redefinition system, so I can't see a way around this. The problem is not related to older Perl versions; it will happen even for 5.12 once it is released. I'm also not convinced that this problem can only happen on Windows with PERL_IMPLICIT_SYS; it should trigger on other platforms too if they have difference C compilers with different runtime libraries. The best I can think of is that you add a little _set_errno() function to set errno to a specific value, and then check if this value propagates back to Perl in the test. Something like: BEGIN { $! = 1; Devel::NYTProf::_set_errno(2); return if $! == 2; print "1..0 # skipped: module linked against different CRT than Perl itself\n"; exit 0; } I'll make a note for myself to look into wrapping errno in the Perl headers once the 5.12 code freeze is over. Cheers, -Jan
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12691-1268345717-269.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <20100311221357.GA512 [...] timac.local> <rt-3.8.HEAD-12691-1268345717-269.55049-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12687-1268383517-1702.55049-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 2601
Download (untitled) / with headers
text/plain 2.5k
Am Do 11. Mär 2010, 17:15:18, Tim.Bunce@pobox.com schrieb: Show quoted text
> Could you post your perl -V output so we get the full details?
Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 - D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT _CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf - libpath:"Z:\WINNT\Perl\lib\CORE" -machine:x86' libpth=Z:\PROGRA~1\MICROS~3\VC98\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi 32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib ne tapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib gnulibc_version='undef' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug - opt:ref,icf -libpath:"Z:\WINNT\Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 810 22751 Update to Test.pm 1.25 21540 Fix backward-compatibility issues in if.pm Built under MSWin32 Compiled at Jun 1 2004 11:52:21 @INC: z:/WINNT/Perl/lib z:/WINNT/Perl/site/lib .
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12689-1268347191-449.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-12681-1268303308-816.55049-6-0 [...] rt.cpan.org> <20100311221357.GA512 [...] timac.local> <003901cac16b$a0ecdee0$e2c69ca0$ [...] activestate.com> <rt-3.8.HEAD-12689-1268347191-449.55049-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12687-1268384451-1970.55049-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 1019
Download (untitled) / with headers
text/plain 1019b
Am Do 11. Mär 2010, 17:39:51, jand@ActiveState.com schrieb: Show quoted text
> Things that are still different in Heiko's setup are the compiler > version > (Visual Studio 2003 I think) and OS (Windows XP).
Confirmed. I have multiple SDK versions installed, but VS 2003 is active. Show quoted text
> Ok, I have one more idea: When you compile a module with VS2003, then > that module > links against MSVCR71.dll instead of MSVCRT.dll, so you end up with 2 > CRT libraries > inside a single process. This normally works fine as long as you > don't mix things > like memory allocation (call MSVCR71.free() on a pointer returned by > MSVCRT.malloc()) > and file I/O (call MSVCR71.fputs() on a FILE* returned by > MSVCRT.fopen()) etc.
What a mess :-( Show quoted text
> All the macro redefinitions in the Perl headers are supposed to > protect you from > these mixups, but there may be a bug somewhere.
Show quoted text
> I don't have a VM with VS2003, and I don't know if I have a license > anywhere anymore > anyways, so it is not easy for me to test.
@Jan: what do you suggest?
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12685-1268348214-871.55049-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net> <rt-3.8.HEAD-12689-1267306979-1042.55049-4-0 [...] rt.cpan.org> <20100227220943.GC1375 [...] timac.local> <rt-3.8.HEAD-12694-1267456425-1638.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12682-1268218340-124.55049-6-0 [...] rt.cpan.org> <20100310133143.GS1375 [...] timac.local> <rt-3.8.HEAD-12689-1268228021-1515.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12681-1268303303-1573.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12689-1268310084-114.55049-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-12694-1268320276-1280.55049-6-0 [...] rt.cpan.org> <20100311225557.GB512 [...] timac.local> <rt-3.8.HEAD-12685-1268348214-871.55049-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12689-1268386067-287.55049-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
From: heiko [...] hexco.de
X-RT-Original-Encoding: utf-8
Content-Length: 682
Download (untitled) / with headers
text/plain 682b
Show quoted text
> Is it reliably repeatable for you?
Yes, always. Show quoted text
> To help me narrow down the cause please try the following changes: > > - edit t/50-errno.t to delete everything after line 31. > - change the test count from 8 to 4 > - rerun to check it fails the same way
fails like before. Show quoted text
> - rerun with each of the following changes to $ENV{NYTPROF} (line 6): > "start=init:file=$nytprof_out:blocks=0:stmts=0"
succeeds. Show quoted text
> "start=init:file=$nytprof_out:blocks=0:subs=0"
fails. Show quoted text
> "start=init:file=$nytprof_out:blocks=0:stmts=0:subs=0"
succeeds. Show quoted text
> - also send me (off-list) the log from running whichever is the last
of Show quoted text
> those which fails, but with ":trace=90" appended to it.
Done.
MIME-Version: 1.0
In-Reply-To: <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <F60601FA7F635A49B7960C8FD9BFF9650333B40896 [...] DEFTHW99EA4MSX.ww902.siemens.net>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12691-1268411889-574.55049-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 22
Fixed in r1168 by Jan.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.