Bug 956442
Summary: | Server script rhq-server.sh 'stop' command creates many shutdown threads that can exhaust user process limits | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Operations Network | Reporter: | Larry O'Leary <loleary> | ||||
Component: | Launch Scripts | Assignee: | Thomas Segismont <tsegismo> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | JON 3.1.2 | CC: | mkoci, tsegismo | ||||
Target Milestone: | ER01 | ||||||
Target Release: | JON 3.2.0 | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-01-02 20:35:45 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: | |||||||
Attachments: |
|
Description
Larry O'Leary
2013-04-24 23:30:30 UTC
Is there a reason to send multiple QUIT or TERM signals ? Can't we just send one TERM, wait X minutes and then send KILL ? I'm thinking of having two variables in the script: * one to set the number of minutes to wait for the server to shutdown after the TERM signal * another to decide if the server should be killed if still being up after the waiting period (In reply to Thomas Segismont from comment #1) > Is there a reason to send multiple QUIT or TERM signals ? Can't we just send > one TERM, wait X minutes and then send KILL ? The QUIT is for thread dumps in the event RHQ_SERVER_DEBUG is enabled. This should be sent multiple times to generate a thread dump. The TERM, I really don't think so. Not sure why we were sending multiple in the first place. I felt that sending four during the total wait was better then sending one every two seconds. But my original solution only included one TERM as this should be sufficient to trigger the shutdown hook. (In reply to Thomas Segismont from comment #2) > I'm thinking of having two variables in the script: > * one to set the number of minutes to wait for the server to shutdown after > the TERM signal > * another to decide if the server should be killed if still being up after > the waiting period This sounds like a good idea. Was actually what I was intending as well. My original thought was that if stop failed the user could manually invoke rhq-server.sh kill to kill the server using SIGKILL. But, provide an option to do this automatically if the user chooses to. Fixed in master commit a704d926b0adafa8f197ba4eaf87b3d3ca858187 Author: Thomas Segismont <tsegismo> Date: Fri May 31 11:21:40 2013 +0200 Bug 956442 - Server script rhq-server.sh 'stop' command creates many shutdown threads that can exhaust user process limits Added two variables in the script: * one to set the number of minutes to wait for the server to shutdown after the TERM signal * another to decide if the server should be killed if still being up after the waiting period Stop and kill cases updated accordingly As this is MODIFIED or ON_QA, setting milestone to ER1. Created attachment 817083 [details]
Measuring the number of threads of RHQ server before and during its stopping.
Verified.
The number of threads of RHQ server was during its stopping decreasing. Before stopping RHQ server, the number of its threads was found out by command (ps -e -T | grep -c <SERVER_PID>) and 2 operations on the platform (Manual Autodiscovery and view Process List) were executed. During the process of stopping the server its threads number was measured a few times. The result of the whole job can be seen in the attached screenshot.
|