Closed Bug 171674 Opened 22 years ago Closed 21 years ago

File::Temp (required by TT 2.08) is broken in Perl 5.6.0

Categories

(Bugzilla :: Documentation, defect)

2.14
Other
Linux
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: ashokk, Assigned: jacob)

References

Details

HI ,
i am facing the following problem .Please check it from ur side
i installed bugzilla 2.14 version and it runs fine .
when i am installing bugzilla 2.16 on RH7.2 machine after updating all the perl 
modules 
the checksetup.pl worked fine and database was created 
after that i configured apache 2.19 and i am getting normal html files, sample 
cgi programs i am able to run 
but when i am trying to run index.cgi file i am getting premature end of script 
header in log file and in browser it is showing internal error 500
i had done perl index.cgi >>temp.html and when i viewed the html file 
it showed the following error and i am able to get the bugzilla home page below 
that.Is it a problem in u r version or from my side 
if u want more questions about the setup i had done shoot some questions here
i will get abck to it 

Your vendor has not defined Fcntl macro O_NOINHERIT, used 
at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 208.

For help, please send mail to this site's webmaster, giving this error message 
and the time and date of the error. 

Content-type: text/html 
Software error:
Your vendor has not defined Fcntl macro O_TEMPORARY, used 
at /usr/lib/perl5/site_perl/5.6.0/File/Temp.pm line 229.

For help, please send mail to this site's webmaster, giving this error message 
and the time and date of the error. 

Thankx in advance
regards
ashok
bugzilla product?
Assignee: asa → justdave
Component: Bugzilla: Keyword & Component → Bugzilla-General
Product: mozilla.org → Bugzilla
QA Contact: timeless → matty
Version: other → 2.14
This sounds like you have suexec enabled in Apache for the Bugzilla directory,
and something in the path to the Bugzilla scripts is group- or world-writable. 
Apache's suexec mechanism will fail to execute a script if anything in the path
to it is writable by anyone other than the owner.

This also sounds like a support issue rather than a bug...  you might try
posting to the mozilla-webtools list (see http://www.bugzilla.org/discussion.html)
suexec was not enabled in apache for the bugzilla directory 
when i run the same thing for bugzilla 2.14 product it is running fine
but only for 2.16 version i am facing the problem 
One more thing
Apache is serving sample cgi files but it is not serving only bugzilla cgi 
files .i am able to view normal html files and sample cgi files are being 
executed fine .
is it still a problem from my side or from the product side .

regards
ashok
Other things to check:

Are you running mod_perl?  Bugzilla doesn't work with mod_perl yet.

Have you checked the #! line at the top of the cgi files and make sure they
point at a live Perl install?
Question: Are you running mod_perl?  Bugzilla doesn't work with mod_perl yet.
Ans:i am not running mod_perl .

Question : Have you checked the #! line at the top of the cgi files and make 
sure they point at a live Perl install?
Ans :It is pointed to #!usr/bonsaitools/bin/perl -wT
In my linux system the perl executable was there in that particular directory.
i am being working on this for the past 5 days but not able to figure it out.

any help would be greatful 

regards
ashok
What version of the CGI module are you running? (and CGI::Carp). 

What version of File::Temp?
I think that this is happening because CGI::Carp doesn't check that its inside
an eval for $DIG{__DIE__}, and File::Temp tried to import those flags inside an
eval, versions < 0.12 don't localise SIG{__DIE__} to an empty sub first

TT2.08 is the first version to use File::Temp (although bugzilla HEAD does),
which is probbaly why noone saw this until recently.

Does upgrading File::Temp help this?
after upgrading the perl i am able to run bugzilla .
atlast i am left with a small configuratio issue .
when i am creating a bug and assigning to mailid's it is not sendingmails
the option i had set to send mail to all the people and all check boxes i 
clicked in preferences .
why it is not sendingmail .
when  i create account it is sendingmail but when i am submitting a new bug it 
is not sending mail .
can i know what may be the problem .
i am very thankful to u people for solving the problems and bringing my 
bugzilla up .

regards
ashok
I have thesame problem on:

Sparc SunOS 5.6 (Solaris 2.6)
Perl 5.6.0
File::Temp -- 0.13
CGI -- 2.89
Apache 1.3.12
DBI/DBD works fine.

Your vendor has not defined Fcntl macro O_EXLOCK, used 
at /usr/local/lib/perl5/site_perl/5.6.0/File/Temp.pm line 210.

Your vendor has not defined Fcntl macro O_NOINHERIT, used 
at /usr/local/lib/perl5/site_perl/5.6.0/File/Temp.pm line 210.

Your vendor has not defined Fcntl macro O_TEMPORARY, used 
at /usr/local/lib/perl5/site_perl/5.6.0/File/Temp.pm line 233.

Please, help!!
People have reported that upgrading to perl 5.6.1 fixis this.

Alternately, you might want to try adding

local *CORE::GLOBAL::die = sub {};

just above teh line which generates those error messages (inside the eval). I
don't know if that will fix it, though.
Upgrading to perl and installing all the perl modules will solve the problem.
i fixed it by upgrading to perl 5.8 and reinstalling all the modules and also 
File::Temp 


regards
ashok
Yeah, but we're trying to find a less involved fix :)
I ran into this on Syndicomm's system, and adding the line Bradley suggested,
both at line 208 and at line 230 in File/Temp.pm did solve the problem.  Since
this is something that's sort of beyond our control, does that make this a
documentation issue?

Since this is obviously a bug in File/Temp.pm which has been fixed in the
current version (which is included in Perl 5.6.1), who do we need to bug to get
the current version of File::Temp put up on CPAN as a standalone so it can be
installed on Perl 5.6.0 systems?
OK, I have another system with Perl 5.6.1 on it, and it has the same version of
File::Temp, and File/Temp.pm is identical.  Does Perl 5.6.1 internally treat
$::SIG{__DIE__} the same as *CORE::GLOBAL::die?

Guess this isn't a CPAN issue after all...
tjenness@cpan.org is in charge of File::Temp (search.cpan.org comes in handy
sometimes).

I was thinking (on irc) that we might be able to workaround this (since we can't
really require people to use 5.6.1, not with some of redhat 7.x still using it).
What if we wrote a wrapper around File::Temp and had Bugzilla::File::Temp, which
did a 'use base "File::Temp' and included our custom fixes. 

I don't know enough about the module to know if this is possible, but if not, we
can always copy File::Temp into Bugzilla/. The license would be an issue, but if
we email tjennes, we might be able to get special permission to MPL it. Gerv:
does this sound anything close to reality? (IANAL FOR SURE ;)

bbaetz, any ideas on this?
No, we are _not_ going to put File:Temp into Bugzilla.

Besides, thats not the issue - its a perl core thing, AFAICS. dave: I think that
CORE::die stuff wasn't being caught by the eval, which would be a bug (since
thats sort of the point of CORE::die vs SIG{__DIE__}

Why can't we require 5.6.1? mod_perl support will, for a variety of reasons,
strongly recommend 5.6.1 if it doesn't outright require it.

myk: This bug will mean that you need to update perl before the next bmo update,
which is likly to require TT 2.08
Summary: premature end of script headers → File::Temp (required by TT 2.08) is broken in Perl 5.6.0
strictly speaking, its actually the interaction of CGI.pm using
CORE::GLOBAL::die,  and File::Temp using Fnctl in an eval block and expecting
the result to fail, and perl 5.6.0 ignoring the eval block

A quick glance through 5.6.1's CHANGES didn't come up with anything glaringly
obvious, but it was just a quick glance.
I defer to bbaetz' superior knowledge :-)

Gerv
Here's the patch for 5.6.0's File::Temp, in case bbaetz's directions in the
above comment are too hard to follow :)

--- File/Temp.pm.orig   Thu Feb  6 16:26:00 2003
+++ File/Temp.pm        Thu Feb  6 16:26:23 2003
@@ -205,6 +205,7 @@
     # eg CGI::Carp
     local $SIG{__DIE__} = sub {};
     local $SIG{__WARN__} = sub {};
+    local *CORE::GLOBAL::die = sub {};
     $bit = &$func();
     1;
   };
@@ -226,6 +227,7 @@
     # eg CGI::Carp
     local $SIG{__DIE__} = sub {};
     local $SIG{__WARN__} = sub {};
+    local *CORE::GLOBAL::die = sub {};
     $bit = &$func();
     1;
   };
Maybe we should add a test to checksetup for 5.6.0 that informs users that they 
need to upgrade perl or patch File::Temp. I'll do this in newinstall as well. 
Blocks: 105854
Other than Zach's idea to test for it, this is somewhat out of the scope of
something we can fix, so this really needs to go in the installation documentation.
Assignee: justdave → jake
Component: Bugzilla-General → Documentation
Fixed in the 2.16 and tip docs.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.