Bug 1276162

Summary: Bugzilla serialization errors aren't reflected in web logs
Product: [Community] Bugzilla Reporter: Will Thames <wthames>
Component: Bugzilla GeneralAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: fweimer, huiwang, jmcdonal, mtahir, mtyson, qgong
Target Milestone: 4.4   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 4.4.10044.10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-16 00:43:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Will Thames 2015-10-28 23:45:02 UTC
Description of problem:

We see a lot of database serialization errors at the DB side but these aren't reflected in the web logs at all. 

4.4.9039

How reproducible:
Not predictably

Steps to Reproduce:
1. Have a serialization error
2. Look in the logs
3.

Actual results:
No errors appearing in the bz.log

Expected results:
An error should appear showing what query was being performed and what the failure was.

Additional info:

Comment 1 Hui Wang 2015-11-12 05:21:35 UTC
Verified this issue.
The result is PASS
Version:
rh-bugzilla-4.4.10044-1.el6.noarch
Steps: 
Do a invalid query, it will give an error in the Web page and also give output the error info in the bz.log file.

Comment 2 Hui Wang 2015-11-12 06:32:30 UTC
Sorry, I am new one for bugzilla. Misunderstood the verified scenario. Change the status to ON_QA. Will re-verify against the hot_fix later.

Comment 3 Rony Gong 🔥 2015-11-12 09:20:49 UTC
Test this on build 4.4.10042-7
Try to reproduce an error of db_sync_error_web, then get the error report both from web and log:
From Web:
Red Hat Bugzilla's database reported a query serialization error. Most likely this occurred because another user or process attempted to change the same data that you were attempting to change. 

Please press Back and retry the transaction.

From Log:
[2015/11/12 09:08:48.037815] [bugzilla-qe-05.host.stage.eng.rdu2.redhat.com;61976] [ERROR] [/var/www/html/bugzilla/buglist.cgi:10.11.5.7::342498:Xiong Zhi Ming:zxiong] [Bugzilla::Error::ThrowUserError /var/www/html/bugzilla/Bugzilla/Error.pm (155)] - ThrowUserError: $VAR1 = 'db_sync_error_web';
$VAR2 = {
          'query' => undef
        };


From both web and log, I can't find the detailed query statement, it is undef.

Comment 4 Jeff Fearn 🐞 2015-11-12 23:20:30 UTC
You can't always get the statement from the error handler, so I added a trace and say it can't be found in those cases.

Comment 5 Rony Gong 🔥 2015-11-13 05:44:05 UTC
Test this on build 4.4.10042-10, now it could print out "No query statement found" or the detail sql statement.

Red Hat Bugzilla's database reported a query serialization error. Most likely 
this occurred because another user or process attempted to change the same data that you were attempting to change. 

Please press Back and retry the transaction.
No query statement found at /var/www/html/bugzilla/Bugzilla/Search/Recent.pm line 60. Bugzilla::Search::Recent::create("Bugzilla::Search::Recent", HASH(0x7f45a3117078)) called at /var/www/html/bugzilla/Bugzilla/Search/Recent.pm line 69 Bugzilla::Search::Recent::create_placeholder("Bugzilla::Search::Recent") called at /var/www/html/bugzilla/Bugzilla/CGI.pm line 489 Bugzilla::CGI::redirect_search_url(Bugzilla::CGI=HASH(0x7f45a30f6830)) called at /var/www/html/bugzilla/buglist.cgi line 53 ModPerl::ROOT::Bugzilla::ModPerl::ResponseHandler::var_www_html_bugzilla_buglist_2ecgi::handler(Apache2::RequestRec=SCALAR(0x7f45a360f870)) 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(Bugzilla::ModPerl::ResponseHandler=HASH(0x7f45a0e35828)) called at /usr/lib64/perl5/vendor_perl/ModPerl/RegistryCooker.pm line 170 ModPerl::RegistryCooker::default_handler(Bugzilla::ModPerl::ResponseHandler=HASH(0x7f45a0e35828)) called at /usr/lib64/perl5/vendor_perl/ModPerl/Registry.pm line 31 ModPerl::Registry::handler("Bugzilla::ModPerl::ResponseHandler", Apache2::RequestRec=SCALAR(0x7f45a360f870)) called at /var/www/html/bugzilla/mod_perl.pl line 134 Bugzilla::ModPerl::ResponseHandler::handler("Bugzilla::ModPerl::ResponseHandler", Apache2::RequestRec=SCALAR(0x7f45a360f870)) called at -e line 0 eval {...} called at -e line 0

Comment 6 Matt Tyson 🤬 2015-11-16 00:43:03 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.