You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philip M. Gollucci" <pg...@p6m7g8.com> on 2006/01/08 07:47:26 UTC

Re: MP2 + Bleedperl broken

Hi all,

As I've reviving this thread, let me link to it:
http://www.gossamer-threads.com/lists/modperl/dev/83393

I'll start by saying across at least 20 FreeBSD computers and a mirriad 
of versions and configs between 5.0 and 7.0-current, I've never seen 
this work since at least August 22, 2005.

Thats bleed versions ~25197 -> current (26703)

The original error:
pgollucci@freebsd.p6m7g8.net 
/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork 147>make
cd "src/modules/perl" && make
cc 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork/src/modules/perl 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork/xs 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include -pipe 
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing 
-Wdeclaration-after-statement -I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed/lib/5.9.3/i386-freebsd-thread-multi-64int/CORE 
-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -Werror -Wdeclaration-after-statement 
-DMP_COMPAT_1X -DMP_DEBUG -O0 -DMP_TRACE -DAP_DEBUG -g3 -O0 -DPIC -fPIC 
  -c modperl_error.c && mv modperl_error.o modperl_error.lo
modperl_error.c: In function `modperl_croak':
modperl_error.c:93: warning: null format string
*** Error code 1

Stop in 
/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork/src/modules/perl.
*** Error code 1

Stop in /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed-svn_prefork.

Okay, so I've done some digging:
  From proto.h:
  * This file is built by embed.pl from data in embed.fnc, embed.pl,
  * pp.sym, intrpvar.h, perlvars.h and thrdvar.h.
  * Any changes made here will be lost!

So were talking about Perl_croak and/or croak
embed.fnc:
   : croak()'s first parm can be NULL.  Otherwise, mod_perl breaks.
Afprd   |void   |croak          |NULLOK const char* pat|...

and for comaprison sake's, here's 5.8.7
Afprd   |void   |croak      |const char* pat|...


Good to note, that NULLOK is correctly marked in bleed.

the resulting proto.h
PERL_CALLCONV void  Perl_croak(pTHX_ const char* pat, ...)
	__attribute__noreturn__
	__attribute__format__(__printf__,pTHX_1,pTHX_2);


Again, 5.8.7 for comparison
PERL_CALLCONV void  Perl_croak(pTHX_ const char* pat, ...) 	
	__attribute__((noreturn))
	__attribute__format__(__printf__,pTHX_1,pTHX_2);


sadly, thats identical so this is not the problem.

Also, if I were to regenrate it with
: croak()'s first parm can be NULL.  Otherwise, mod_perl breaks.
Afprd   |void   |croak          |NN const char* pat|...

I get

PERL_CALLCONV void      Perl_croak(pTHX_ const char* pat, ...)
                         __attribute__noreturn__
                         __attribute__format__(__printf__,pTHX_1,pTHX_2)
                         __attribute__nonnull__(pTHX_1);


And if I now try to compile mp2
I get a different error

pgollucci@freebsd.p6m7g8.net 
/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork 202>make
cd "src/modules/perl" && make
cc 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/xs 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include -pipe 
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing 
-Wdeclaration-after-statement -I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed-26704/lib/5.9.3/i386-freebsd-64int/CORE 
-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -Werror -Wdeclaration-after-statement 
-DMP_COMPAT_1X -DMP_DEBUG -O0 -DMP_TRACE -DAP_DEBUG -g3 -O0 -DPIC -fPIC 
  -c modperl_error.c && mv modperl_error.o modperl_error.lo
modperl_error.c: In function `modperl_croak':
******************************************************************************************
modperl_error.c:93: warning: null argument where non-null required (arg 1)
******************************************************************************************
modperl_error.c:93: warning: null format string
*** Error code 1

Stop in 
/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl.
*** Error code 1

Stop in /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork.

Alrighty, so something is amiss... Let me make it simpler -- a test program:

Note, I'll use the "pristine proto.h" from here on out.

cat test.c
#include "EXTERN.h"
#include "perl.h"

int main (int argc, char **argv) {

   Perl_croak(Nullch);

   return 0;
}

gcc -I/home/pgollucci/dev/apps/perl/5.8.7/lib/CORE 
-L/home/pgollucci/dev/apps/perl/5.8.7/lib/CORE -lperl -o test5.8.7 test.c

gcc 
-I/home/pgollucci/dev/apps/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE 
-L/home/pgollucci/dev/apps/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE 
-lperl -o test5.9.3 test.c

Amazingly, they BOTH compile..........



Let me get a little more complex and try to isolate mp2 as the culprit
So let me go create a new test file in the my mp2 svn tree:

cat src/modules/perl/test.c
pgollucci@freebsd.p6m7g8.net 
/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl 
318>cat test.c
#include "EXTERN.h"
#include "perl.h"

/* I AM NEW */
#include "mod_perl.h"

int main (int argc, char **argv) {

   Perl_croak(Nullch);

   return 0;
}

Test compile again:
cc 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/src/modules/perl 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork/xs 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include 
-I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/httpd/svn/prefork/include -pipe 
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing 
-Wdeclaration-after-statement -I/usr/local/include 
-I/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE 
-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -Werror -Wdeclaration-after-statement 
-DMP_COMPAT_1X -DMP_DEBUG -O0 -DMP_TRACE -DAP_DEBUG -g3 -O0 -DPIC -fPIC 
test.c
test.c: In function `main':
test.c:8: warning: null format string

JACKPOT, mp2 broke it... but how ?

grep Perl_croak * | grep -v .svn | grep define

src/modules/perl/modperl_perl_unembed.h:#      define croak 
Perl_croak_nocontext

Back to proto.h
#if defined(PERL_IMPLICIT_CONTEXT)
PERL_CALLCONV void      Perl_croak_nocontext(const char* pat, ...)
                         __attribute__noreturn__
                         __attribute__format__(__printf__,1,2)
                         __attribute__nonnull__(1);


LIGHT BULB!

More #define mess in embed.h
#define croak           Perl_croak

Okay, so I can say for sure, that

#ifdef PERL_CORE
#error "core"
#   ifndef croak
#error "not defined croak"
#      define croak Perl_croak_nocontext
#   endif
#endif

the #errors aren't hit, so this is not causing it -- 1 down.

Okay, now I'm just plain pissed.... hardball

gcc -save-temps

modperl_error.i

	  Perl_croak( ((char*)((void *)0)));

I see
# 105 
"/usr/home/pgollucci/dev/apps-3.4.4/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE/proto.h" 
2
  void Perl_croak( const char* pat, ...)
    __attribute__((noreturn))
    __attribute__((format(__printf__,1,2)));


So its not being expanded to anything else.


I'm now at a complete loss........ Something's wrong, but I've no idea what.

As I'm now at my wits end, so any help appreciated.


For reference this particular speal was done on
FreeBSD 6.0-RELEASE i386 GENERIC kernel
perl 5.8.7 release, bleed 26704 both without ithreads
httpd svn apr not threaded prefork mpm
mp2 svn
gcc 3.4.4

------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 
subsides."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

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


Re: MP2 + Bleedperl broken

Posted by Stas Bekman <st...@stason.org>.
Philip M. Gollucci wrote:
> Stas Bekman wrote:
> 
>> Philip M. Gollucci wrote:
>>
>>> Stas, I'm 99% sure this is a FreeBSD specific problem.  I can not 
>>> duplicate this on Fedora Core 2/3
>>
>>
>> I guess the next step is to try and reproduce it in a small program 
>> and hand it to p5p?
>>
> 
> Thats what this was:
> 
> cat src/modules/perl/test.c
> 
> #include "EXTERN.h"
> #include "perl.h"
> 
> #include "mod_perl.h"
> 
> int main (int argc, char **argv) {
> 
>   Perl_croak(Nullch);
> 
>   return 0;
> }
> 
> I'm not exactly how to make that smaller other then by going through all 
> the damn *.h files that mod_perl.h brings in....
> 
> I'm willing to do it.... but would like to avoid wasted effort.

But it'll be much faster for you than anybody on the p5p list. Just use 
the binary search and you will quickly narrow it down to a short script 
that's not dependant on mod_perl headers. then it's probably the best to 
submit it using perlbug utilitity so it includes all the required info for 
p5p to reproduce.


-- 
_____________________________________________________________
Stas Bekman mailto:stas@stason.org  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/


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


Re: MP2 + Bleedperl broken

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Stas Bekman wrote:
> Philip M. Gollucci wrote:
>> Stas, I'm 99% sure this is a FreeBSD specific problem.  I can not 
>> duplicate this on Fedora Core 2/3
> 
> I guess the next step is to try and reproduce it in a small program and 
> hand it to p5p?
> 

Thats what this was:

cat src/modules/perl/test.c

#include "EXTERN.h"
#include "perl.h"

#include "mod_perl.h"

int main (int argc, char **argv) {

   Perl_croak(Nullch);

   return 0;
}

I'm not exactly how to make that smaller other then by going through all 
the damn *.h files that mod_perl.h brings in....

I'm willing to do it.... but would like to avoid wasted effort.





-- 
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 
subsides."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

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


Re: MP2 + Bleedperl broken

Posted by Stas Bekman <st...@stason.org>.
Philip M. Gollucci wrote:
> Stas, I'm 99% sure this is a FreeBSD specific problem.  I can not 
> duplicate this on Fedora Core 2/3

I guess the next step is to try and reproduce it in a small program and 
hand it to p5p?

-- 
_____________________________________________________________
Stas Bekman mailto:stas@stason.org  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/


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


Re: MP2 + Bleedperl broken

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Stas, I'm 99% sure this is a FreeBSD specific problem.  I can not 
duplicate this on Fedora Core 2/3

rm -rf /usr/home/pgollucci/dev/src/perl-bleed
rsync -acvz --delete --force 
rsync://public.activestate.com/perl-current/ 
/usr/home/pgollucci/dev/src/perl-bleed
/usr/home/pgollucci/dev/src/perl-bleed
cd /usr/home/pgollucci/dev/src/perl-bleed ; ./Configure -sde \
   -Dprefix=/usr/home/pgollucci/dev/apps/perl/bleed-26758 \
   -Dscriptdir=/usr/home/pgollucci/dev/apps/perl/bleed-26758/bin \
   -Uinstallusrbinperl \
   -Dcc=cc \
   -Doptimize="-g3 -O0" \
   -Duseshrplib \
   -Dusedevel \
   -Dusethreads=n \
   -Dusemymalloc=n \
   -Duse64bitint \
   -Dccflags=-pipe \
   -Ud_dosuid \
   -Ui_gdbm \
   -Ui_malloc \
   -Ui_iconv \
   -Ubincompat5005
cd /usr/home/pgollucci/dev/src/perl-bleed ; make all install
cd /usr/home/pgollucci/dev/apps
ln -fs bleed-26758 bleed
cd perl-bleed
ln -fs perl5.9.3 perlbleed

cd /usr/home/pgollucci/dev/repos/asf/httpd/httpd/trunk ; 
CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED -g3 -O0" \
  ./configure --prefix=/usr/home/pgollucci/dev/apps/httpd/trunk/prefork \
  --with-perl=/usr/local/bin/perl \
  --enable-v4-mapped \
  --with-dbm=sdbm \
  --with-ssl=/usr \
  --enable-ssl \
  --with-port=9999 \
  --with-mpm=event \
  --with-expat=/usr/local \
  --enable-debug \
  --enable-modules=all \
  --enable-mods-shared=all \
  --enable-so \
  --enable-proxy=shared \
  --enable-deflate=shared \
  --enable-maintainer-mode

rm -rf /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork
cp -R /usr/home/pgollucci/dev/repos/asf/perl/modperl/trunk 
/usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork
cd /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork ;
make distclean
cd /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork ; 
/usr/home/pgollucci/dev/apps/perl/bleed/bin/perlbleed Makefile.PL\
  MP_APXS=/usr/home/pgollucci/dev/apps/httpd/svn/prefork/bin/apxs \
  MP_MAINTAINER=1 \
cd /usr/home/pgollucci/dev/repos/asf/perl/modperl/bleed_svn_prefork ; 
make all




/usr/home/pgollucci/dev/apps/perl/bleed/bin/perlbleed -V
Summary of my perl5 (revision 5 version 9 subversion 3 patch 26758) 
configuration:
   Platform:
     osname=freebsd, osvers=6.0-release, archname=i386-freebsd-64int
     uname='freebsd freebsd.p6m7g8.net 6.0-release freebsd 6.0-release 
#0: thu nov 3 09:36:13 utc 2005 
root@x64.samsco.home:usrobjusrsrcsysgeneric i386 '
     config_args='-sde -Dprefix=/usr/home/pgollucci/dev/apps/perl/bleed 
-Dscriptdir=/usr/home/pgollucci/dev/apps/perl/bleed/bin 
-Uinstallusrbinperl -Dcc=cc -Doptimize=-g3 -O0 -Duseshrplib -Dusedevel 
-Dusethreads=n -Dusemymalloc=n -Duse64bitint -Dccflags=-pipe -Ud_dosuid 
-Ui_gdbm -Ui_malloc -Ui_iconv -Ubincompat5005'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=undef, usemultiplicity=undef
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=define, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-pipe -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H 
-DDEBUGGING -fno-strict-aliasing -Wdeclaration-after-statement 
-I/usr/local/include',
     optimize='-g3 -O0',
     cppflags='-pipe -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING 
-fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include'
     ccversion='', gccversion='3.4.4 [FreeBSD] 20050518', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long long', ivsize=8, nvtype='double', nvsize=8, 
Off_t='off_t', lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
     libpth=/usr/lib /usr/local/lib
     libs=-lgdbm -lm -lcrypt -lutil -lc
     perllibs=-lm -lcrypt -lutil -lc
     libc=, so=so, useshrplib=true, libperl=libperl.so
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' 
-Wl,-R/usr/home/pgollucci/dev/apps/perl/bleed/lib/5.9.3/i386-freebsd-64int/CORE'
     cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'


Characteristics of this binary (from libperl):
   Compile-time options: DEBUGGING PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
                         SPRINTF_RETURNS_STRLEN USE_64_BIT_INT
                         USE_LARGE_FILES USE_PERLIO
   Built under freebsd
   Compiled at Jan  9 2006 16:24:52
   %ENV:
     PERLDOC_PAGER="less -+C -E"
   @INC:
     /usr/home/pgollucci/dev/apps/perl/bleed/lib/5.9.3/i386-freebsd-64int
     /usr/home/pgollucci/dev/apps/perl/bleed/lib/5.9.3
/usr/home/pgollucci/dev/apps/perl/bleed/lib/site_perl/5.9.3/i386-freebsd-64int
     /usr/home/pgollucci/dev/apps/perl/bleed/lib/site_perl/5.9.3
     /usr/home/pgollucci/dev/apps/perl/bleed/lib/site_perl

------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 
subsides."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

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


Re: MP2 + Bleedperl broken

Posted by Stas Bekman <st...@stason.org>.
Philip M. Gollucci wrote:
> Hi all,
> 
> As I've reviving this thread, let me link to it:
> http://www.gossamer-threads.com/lists/modperl/dev/83393
> 
> I'll start by saying across at least 20 FreeBSD computers and a mirriad 
> of versions and configs between 5.0 and 7.0-current, I've never seen 
> this work since at least August 22, 2005.
> 
> Thats bleed versions ~25197 -> current (26703)

How did you build mp2, Philip? I've just tried 26758 and it works fine 
while building with:

make clean
APACHE_TEST_COLOR=1; export APACHE_TEST_COLOR
/home/stas/perl/blead-ithread/bin/perl Makefile.PL \
MP_GENERATE_XS=1                          \
MP_USE_DSO=1                              \
MP_DEBUG=1                                \
MP_TRACE=1                                \
MP_USE_GTOP=1                             \
MP_APXS=/home/stas/httpd/prefork/bin/apxs \
MP_MAINTAINER=1                           \
&& make -j2 && make test

Also please show your perl -V.

Thanks.

-- 
_____________________________________________________________
Stas Bekman mailto:stas@stason.org  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/


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