ThrowCodeError results in a recursive template error if the database error occurs within the header

RESOLVED FIXED in Bugzilla 6.0

Status

()

Bugzilla
Bugzilla-General
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: glob, Unassigned)

Tracking

Bugzilla 6.0

Details

(Reporter)

Description

3 years ago
ThrowCodeError results in a recursive template error if the database error occurs within the header.

for example, if get_api_token() throws a db error due to the database being in read-only mode (bug 1128853), instead of displaying the error we get..

here's a stacktrace from bmo:

file error - recursion into 'global/header.html.tmpl'
at /usr/lib64/perl5/Template/Context.pm line 500
	Template::Context::throw(...) called at /usr/lib64/perl5/Template/Context.pm line 385
	Template::Context::process(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Template/Context.pm line 45
	Bugzilla::Template::Context::process(...) called at /usr/lib64/perl5/Template/Service.pm line 94
	eval {...} called at /usr/lib64/perl5/Template/Service.pm line 91
	Template::Service::process(...) called at /usr/lib64/perl5/Template.pm line 66
	Template::process(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Template.pm line 674
	Bugzilla::Template::process(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Error.pm line 102
	Bugzilla::Error::_throw_error(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Error.pm line 195
	Bugzilla::Error::ThrowCodeError(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/DB.pm line 181
	Bugzilla::DB::_handle_error(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Token.pm line 457
	Bugzilla::Token::_create_token(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Token.pm line 65
	Bugzilla::Token::issue_api_token(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Template.pm line 1044
	Bugzilla::Template::__ANON__(...) called at /data/www/bugzilla.mozilla.org/template/en/default/global/header.html.tmpl line 244
	eval {...} called at /data/www/bugzilla.mozilla.org/template/en/default/global/header.html.tmpl line 18
	Template::Provider::__ANON__(...) called at /usr/lib64/perl5/Template/Document.pm line 151
	eval {...} called at /usr/lib64/perl5/Template/Document.pm line 149
	Template::Document::process(...) called at /usr/lib64/perl5/Template/Context.pm line 351
	eval {...} called at /usr/lib64/perl5/Template/Context.pm line 321
	Template::Context::process(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Template/Context.pm line 45
	Bugzilla::Template::Context::process(...) called at /data/www/bugzilla.mozilla.org/template/en/default/list/list.html.tmpl line 1
	eval {...} called at /data/www/bugzilla.mozilla.org/template/en/default/list/list.html.tmpl line 18
	Template::Provider::__ANON__(...) called at /usr/lib64/perl5/Template/Document.pm line 151
	eval {...} called at /usr/lib64/perl5/Template/Document.pm line 149
	Template::Document::process(...) called at /usr/lib64/perl5/Template/Context.pm line 351
	eval {...} called at /usr/lib64/perl5/Template/Context.pm line 321
	Template::Context::process(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Template/Context.pm line 45
	Bugzilla::Template::Context::process(...) called at /usr/lib64/perl5/Template/Service.pm line 94
	eval {...} called at /usr/lib64/perl5/Template/Service.pm line 91
	Template::Service::process(...) called at /usr/lib64/perl5/Template.pm line 66
	Template::process(...) called at /data/www/bugzilla.mozilla.org/Bugzilla/Template.pm line 674
	Bugzilla::Template::process(...) called at /data/www/bugzilla.mozilla.org/buglist.cgi line 1108
	ModPerl::ROOT::Bugzilla::ModPerl::ResponseHandler::data_www_bugzilla_2emozilla_2eorg_buglist_2ecgi::handler(...) called at /usr/lib64/perl5/vendor_perl/ModPerl/RegistryCooker.pm line 204
	eval {...} called at /usr/lib64/perl5/vendor_perl/ModPerl/RegistryCooker.pm line 204
	ModPerl::RegistryCooker::run(...) called at /usr/lib64/perl5/vendor_perl/ModPerl/RegistryCooker.pm line 170
	ModPerl::RegistryCooker::default_handler(...) called at /usr/lib64/perl5/vendor_perl/ModPerl/Registry.pm line 31
	ModPerl::Registry::handler(...) called at /data/www/bugzilla.mozilla.org/mod_perl.pl line 143
	Bugzilla::ModPerl::ResponseHandler::handler(...) called at -e line 0
	eval {...} called at -e line 0

Comment 1

3 years ago
I backed out the offending patch from bug 1089475.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.