Bug 1265227

Summary: Stack trace on search
Product: [Community] Bugzilla Reporter: hrosnet
Component: Query/Bug ListAssignee: PnT DevOps Devs <hss-ied-bugs>
Status: CLOSED DUPLICATE QA Contact: Rony Gong 🔥 <qgong>
Severity: high Docs Contact:
Priority: high    
Version: 4.4CC: imouzann, jmcdonal, mtahir, mtyson, qgong, xiawu
Target Milestone: 4.4Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-23 01:01:26 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 hrosnet 2015-09-22 12:30:48 UTC
Description of problem:

I had a bug relative to 'tripleo::packages', therefor I looked for that directly, but I believe the usage of '::' made the search engine crash providing stack trace.

Version-Release number of selected component (if applicable):
Current version - not sure which one it is.

How reproducible:
Always

Steps to Reproduce:
1. Access https://bugzilla.redhat.com/buglist.cgi?no_redirect=1&quicksearch=tripleo%3A%3Apackage
Or
1. Search anything of the form: test::test

Actual results:
Couldn't search for the bugs containing that string

Expected results:
Could search for this type of string by escaping those type of caracters

Additional info:

Stack trace:
An error occurred while performing a database operation:

DBD::Pg::db selectcol_arrayref failed: ERROR:  syntax error in tsquery: ""test::test"" [for Statement "SELECT bugs.bug_id AS bug_id, bugs.delta_ts AS changeddate, bugs.priority AS priority, bugs.bug_severity AS bug_severity
  FROM bugs
LEFT JOIN bug_group_map AS security_map ON bugs.bug_id = security_map.bug_id
LEFT JOIN cc AS security_cc ON bugs.bug_id = security_cc.bug_id AND security_cc.who = 379844
INNER JOIN priority AS map_priority ON bugs.priority = map_priority.value
INNER JOIN bug_severity AS map_bug_severity ON bugs.bug_severity = map_bug_severity.value
LEFT JOIN bugs_fulltext AS bugs_fulltext_6 ON bugs.bug_id = bugs_fulltext_6.bug_id
 WHERE bugs.creation_ts IS NOT NULL
   AND ( (security_map.group_id IS NULL OR security_map.group_id IN (7,15,123,122,85,287,92,79,81,133,182,192,25,75,91,218,124,161,44,215,127,78,126,48,217,208,209))
        OR (bugs.reporter_accessible = 1 AND bugs.reporter = 379844)
        OR (bugs.cclist_accessible = 1 AND security_cc.who IS NOT NULL)
        OR bugs.assigned_to = 379844
        OR bugs.qa_contact = 379844        OR bugs.docs_contact = 379844)
   AND  bugs.bug_status IN ('NEW','VERIFIED','ASSIGNED','MODIFIED','ON_DEV','ON_QA','RELEASE_PENDING','POST')  AND ( ( ( 1=2 OR (1=2 OR 1=2) OR 
        bugs.bug_id IN (
            SELECT bugs_aliases.bug_id
            FROM bugs_aliases
            WHERE bugs_aliases.alias::text  ILIKE '%test::test%' ESCAPE '|'
        )
     OR bugs.short_desc::text  ILIKE '%test::test%' ESCAPE '|' OR bugs.status_whiteboard::text  ILIKE '%test::test%' ESCAPE '|' OR bugs_fulltext_6.comments_vect @@ TO_TSQUERY('"test::test"') OR bugs_fulltext_6.short_desc_vect @@ TO_TSQUERY('"test::test"') ) ) )
GROUP BY bugs.bug_id, bugs.delta_ts,bugs.priority,bugs.bug_severity,map_priority.sortkey,map_priority.value,map_bug_severity.sortkey,map_bug_severity.value
ORDER BY changeddate DESC, map_priority.sortkey, map_priority.value, map_bug_severity.sortkey, map_bug_severity.value
LIMIT 1000
"] at /var/www/html/bugzilla/Bugzilla/Search.pm line 831
	Bugzilla::Search::data('Bugzilla::Search=HASH(0x7fadde662e48)') called at /var/www/html/bugzilla/buglist.cgi line 773
	ModPerl::ROOT::Bugzilla::ModPerl::ResponseHandler::var_www_html_bugzilla_buglist_2ecgi::handler('Apache2::RequestRec=SCALAR(0x7fadde6f2998)') 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(0x7faddde26a38)') called at /usr/lib64/perl5/vendor_perl/ModPerl/RegistryCooker.pm line 170
	ModPerl::RegistryCooker::default_handler('Bugzilla::ModPerl::ResponseHandler=HASH(0x7faddde26a38)') called at /usr/lib64/perl5/vendor_perl/ModPerl/Registry.pm line 31
	ModPerl::Registry::handler('Bugzilla::ModPerl::ResponseHandler', 'Apache2::RequestRec=SCALAR(0x7fadde6f2998)') called at /var/www/html/bugzilla/mod_perl.pl line 134
	Bugzilla::ModPerl::ResponseHandler::handler('Bugzilla::ModPerl::ResponseHandler', 'Apache2::RequestRec=SCALAR(0x7fadde6f2998)') called at -e line 0
	eval {...} called at -e line 0

Traceback:

 at /var/www/html/bugzilla/Bugzilla/DB.pm line 200
	Bugzilla::DB::_handle_error(...) called at /var/www/html/bugzilla/Bugzilla/Search.pm line 831
	Bugzilla::Search::data(...) called at /var/www/html/bugzilla/buglist.cgi line 773
	ModPerl::ROOT::Bugzilla::ModPerl::ResponseHandler::var_www_html_bugzilla_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 /var/www/html/bugzilla/mod_perl.pl line 134
	Bugzilla::ModPerl::ResponseHandler::handler(...) called at -e line 0
	eval {...} called at -e line 0

Comment 1 Jason McDonald 2015-09-22 12:51:18 UTC
I suspect that this is the same issue as in Bug 1265062.  The full-text search in postgres seems to object to some characters that the old MySQL database accepted.

Until we can resolve this, you should be able to work around the issue by changing to the Advanced Search page, and using the Custom Search section at the bottom of the page to search for 'Comments' 'contains the string' 'tripleo::packages'.

Comment 2 Matt Tyson 🤬 2015-09-23 01:01:26 UTC
Yes, It's the same issue.

See bug 1265062 comment 2 for a workaround.

*** This bug has been marked as a duplicate of bug 1265062 ***

Comment 3 Matt Tyson 🤬 2015-09-23 07:05:16 UTC
We've released a hotfix which should resolve the issue.

Comment 4 hrosnet 2015-09-23 07:48:36 UTC
Indeed works now, and sorry for the duplicated report, I'll try to search better next time!