Project

General

Profile

Bug #19461

[regression] host search by organization never finishes but causes mem.leak in foreman process

Added by Tomer Brisker about 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Hosts
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1447958

Description of problem:
Searching for hosts by organization (and optionally specifying more filters for the search) does not terminate. Rather "Passenger RackApp: /usr/share/foreman" process consumes more and more memory until OOM-killed.

This is a regression between 6.2.8 (search works fine) and 6.2.9 (search doesnt work).

Version-Release number of selected component (if applicable):
Sat 6.2.9

How reproducible:
100%

Steps to Reproduce:
1.
curl -u admin:redhat "https://$(hostname -f)/api/v2/hosts?organization_id=1&page=1&search=&sort_by=name&sort_order=ASC"

(or in WebUI, goto Hosts -> All hosts and use filter "organization = Organization_Name")

(you can try more complex query as well that shall fail the same way, like:

curl -u admin:redhat "https://$(hostname -f)/api/v2/hosts?organization_id=1&page=1&search=subscription_status+%3D+invalid&sort_by=name&sort_order=ASC"

)

2. Wait a minute

3. Monitor RSS usage of "Passenger RackApp: /usr/share/foreman" process.

Actual results:
The query never finishes.
RSS usage of the foreman process grows forever.

Expected results:
The query to finish in reasonable time.
No huge RSS increase.

Additional info:
per tbrisker, the regression is suspected due to https://bugzilla.redhat.com/show_bug.cgi?id=1419667


Related issues

Has duplicate Katello - Bug #18883: Passenger RackApp out of memoryDuplicate2017-03-13

Associated revisions

Revision 83cb2c2e (diff)
Added by Shimon Shtein about 5 years ago

Fixes #19461 - Change includes to preload in host scopes

History

#1 Updated by The Foreman Bot about 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6774 added

#2 Updated by Klaas D about 5 years ago

you can apply it manually to 3.3.1 ( /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.3.1.1/lib/katello/plugin.rb ) to avoid the memory leaks :)

#3 Updated by Justin Sherrill about 5 years ago

  • Category set to Hosts
  • Legacy Backlogs Release (now unused) set to 226
  • Difficulty set to easy

#4 Updated by Shimon Shtein about 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by The Foreman Bot about 5 years ago

  • Pull request https://github.com/Katello/katello/pull/6782 added

#6 Updated by Justin Sherrill about 5 years ago

  • Has duplicate Bug #18883: Passenger RackApp out of memory added

#7 Updated by Ivan Necas about 5 years ago

  • Target version set to 1.13.1

Also available in: Atom PDF