Current time: 12-07-2019, 03:02 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loop process
Author Message
JCircle Offline
Junior Member
*

Posts: 32
Joined: May 2011
Reputation: 0
Post: #1
Loop process
I was digging around and found this ticket
http://isp-control.net/ispcp/ticket/2557
already open. I to see this issue with almost everything I do with in the CP.
this is a HUGE problem. This process filled up 200 GB in 2 hours.
this happens EVERY time I add a client or the client makes a domain related change.

I also run openSuSE 11.3 and 1.07
06-04-2011 07:11 AM
Find all posts by this user Quote this message in a reply
JCircle Offline
Junior Member
*

Posts: 32
Joined: May 2011
Reputation: 0
Post: #2
RE: Loop process
this process is something that calls /usr/bin/yes
the yes command is a repeat command, something is looping "start" into the yes command and never ends it. this causes both the ispcp-serv-mngr.stdout file to get huge as well as /var/tmp to fill with junk.

waiting untill the process has done what it "should do" and killing the yes pid will fix the problem. This problem happens every domain added and mail box added


Im going to test this on centos and others next to see if this is openSuSE only.


Update:
This yes process is related to the mail server.
on mail box create/change the isp-msgr service is calling for a stop and start on the mail server (or related process)

this causes 2 loops. first loop on email stop. the server never stops. second loop if you kill the first one is server start, and the server never gets the start command.

looping into the config files for something that is pointed wrong.
(This post was last modified: 06-06-2011 11:17 AM by JCircle.)
06-06-2011 11:02 AM
Find all posts by this user Quote this message in a reply
JCircle Offline
Junior Member
*

Posts: 32
Joined: May 2011
Reputation: 0
Post: #3
RE: Loop process
snip from the logfile running in debug

[DEBUG] push_el() sub_name: serv_mngr_start_up(), msg: Starting...
[DEBUG] push_el() sub_name: check_master(), msg: Starting...
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Starting...
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Ending...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: [DEBUG] External command exited with value 0
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Ending...
[DEBUG] push_el() sub_name: del_file(), msg: Starting...
[DEBUG] push_el() sub_name: del_file(), msg: Ending...
[DEBUG] push_el() sub_name: del_file(), msg: Starting...
[DEBUG] push_el() sub_name: del_file(), msg: Ending...
[DEBUG] push_el() sub_name: check_master(), msg: Ending...
[DEBUG] push_el() sub_name: serv_mngr_start_up(), msg: Ending...
[DEBUG] push_el() sub_name: serv_mngr_engine(), msg: Starting...
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Starting...
Shutting down Courier Authentication Daemon ..done
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Ending...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: [DEBUG] External command exited with value 0
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Ending...
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Starting...
stop
stop
stop
stop
---------------killed the /usr/bin/yes pid
start
start
start
start
start
-----------------killed the /usr/bin/yes pid again
st[DEBUG] push_el() sub_name: sys_command_rs(), msg: Ending...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: [ERROR] External command died with signal 9, without coredump
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Ending...
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Starting...
Starting Courier-IMAP ..done
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Ending...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: [DEBUG] External command exited with value 0
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Ending...
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Starting...
Starting Courier-POP3 ..done
[DEBUG] push_el() sub_name: sys_command_rs(), msg: Ending...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: [DEBUG] External command exited with value 0
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Ending...
[DEBUG] push_el() sub_name: restart_httpd(), msg: Starting...
[DEBUG] push_el() sub_name: sys_command_stderr(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: [DEBUG] External command exited with value 0
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Ending...
[DEBUG] push_el() sub_name: sys_command_stderr(), msg: Ending...
[DEBUG] push_el() sub_name: restart_httpd(), msg: Reloading...
[DEBUG] push_el() sub_name: sys_command_stderr(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Starting...
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: [DEBUG] External command exited with value 0
[DEBUG] push_el() sub_name: getCmdExitValue(), msg: Ending...
[DEBUG] push_el() sub_name: sys_command_stderr(), msg: Ending...
[DEBUG] push_el() sub_name: restart_httpd(), msg: Ending...
[DEBUG] push_el() sub_name: serv_mngr_engine(), msg: Ending...
[DEBUG] push_el() sub_name: serv_mngr_shut_down(), msg: Starting...
[DEBUG] push_el() sub_name: serv_mngr_shut_down(), msg: Ending...
06-08-2011 09:03 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: Loop process
This is the code that is causing your problems:
Code:
97    sub serv_mngr_engine {
98    
99            push_el(\@main::el, 'serv_mngr_engine()', 'Starting...');
100    
101            my $cmd;
102    
103            if ($main::changed_mail_cnt > 0 || $main::changed_dmn_cnt > 0 ||
104                    $main::changed_sub_cnt > 0) {
105    
106                    if ($main::cfg{'CMD_AUTHD'} ne 'no') {
107                            $cmd = $main::cfg{'CMD_AUTHD'};
108                            sys_command_rs("$cmd stop");
109                    }
110    
111                    if ($main::cfg{'CMD_AMAVIS'} ne 'no') {
112                            $cmd = $main::cfg{'CMD_AMAVIS'};
113                            sys_command_rs("$cmd stop");
114                    }
115    
116                    if ($main::cfg{'CMD_IMAP'} ne 'no') {
117                            $cmd = $main::cfg{'CMD_IMAP'};
118                            sys_command_rs("$cmd stop");
119                    }
120    
121                    if ($main::cfg{'CMD_POP'} ne 'no') {
122                            $cmd = $main::cfg{'CMD_POP'};
123                            sys_command_rs("$cmd stop");
124                    }
125            }
126    
127            if ($main::changed_dmn_cnt > 0 || $main::changed_sub_cnt > 0 ||
128                    $main::changed_als_cnt > 0 || $main::changed_alssub_cnt > 0) {
129    
130                    # TODO move to rndc
131                    if ($main::cfg{'CMD_NAMED'} ne 'no') {
132                            $cmd = $main::cfg{'CMD_NAMED'};
133                            sys_command_rs("$cmd restart");
134                    }
135            }
136    
137            if ($main::changed_sub_cnt > 0 || $main::changed_als_cnt > 0 ||
138                    $main::changed_alssub_cnt > 0) {
139    
140                    if ($main::cfg{'CMD_FTPD'} ne 'no') {
141                            $cmd = $main::cfg{'CMD_FTPD'};
142                            sys_command_rs("$cmd restart");
143                    }
144            }
145    
146            if ($main::changed_mail_cnt > 0 || $main::changed_dmn_cnt > 0 ||
147                    $main::changed_sub_cnt > 0 || $main::changed_als_cnt > 0) {
148    
149                    # Ensure that postfix is running - Do nothing if running
150                    if ($main::cfg{'CMD_MTA'} ne 'no') {
151                            $cmd = $main::cfg{'CMD_MTA'};
152                            sys_command_rs("$cmd start");
153                    }
154    
155                    if ($main::cfg{'CMD_AUTHD'} ne 'no') {
156                            $cmd = $main::cfg{'CMD_AUTHD'};
157                            sys_command_rs("$cmd start");
158                    }
159    
160                    if ($main::cfg{'CMD_AMAVIS'} ne 'no') {
161                            $cmd = $main::cfg{'CMD_AMAVIS'};
162                            sys_command_rs("$cmd start");
163                    }
164    
165                    if ($main::cfg{'CMD_IMAP'} ne 'no') {
166                            $cmd = $main::cfg{'CMD_IMAP'};
167                            sys_command_rs("$cmd start");
168                    }
169    
170                    if ($main::cfg{'CMD_POP'} ne 'no') {
171                            $cmd = $main::cfg{'CMD_POP'};
172                            sys_command_rs("$cmd start");
173                    }
174            }
175    
176            if ($main::changed_dmn_cnt > 0 || $main::changed_sub_cnt > 0 ||
177                    $main::changed_als_cnt > 0 || $main::changed_alssub_cnt > 0) {
178    
179                    if ($main::cfg{'CMD_HTTPD'} ne 'no') {
180                            my $rs = restart_httpd();
181                            return $rs if ($rs != 0);
182                    }
183            }
184    
185            push_el(\@main::el, 'serv_mngr_engine()', 'Ending...');
186    
187            0;
188    }

Hence, you can try to reproduce the function manually in order to determine where it is going nuts. Basically, you know that there are some changed mail accounts, so you start by "simulating" this bit:
Code:
106                    if ($main::cfg{'CMD_AUTHD'} ne 'no') {
107                            $cmd = $main::cfg{'CMD_AUTHD'};
108                            sys_command_rs("$cmd stop");
109                    }
Hence, you first have to obtain the CMD_AUTH config. variable and run the corresponding script with a "stop" argument. This can be done in a bash shell by issuing the command (you can also do it by parts):
Code:
`grep 'CMD_AUTH' /etc/ispcp/ispcp.conf | cut -d'=' -f2` stop

At some point the process should hang up (issuing those infamous "yes" stuff), so maybe we can work on from there....
06-08-2011 07:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
JCircle Offline
Junior Member
*

Posts: 32
Joined: May 2011
Reputation: 0
Post: #5
RE: Loop process
I have found the issue.
/usr/sbin/rcamavis was linked wrong. when the service tried to stop and start it looped out of control.

I have tested the install 3 more times and found this issue to be on one server only.
This issue was most likely caused by a admin error before ispcp was installed.
(06-08-2011 07:19 PM)kilburn Wrote:  This is the code that is causing your problems:
Code:
97    sub serv_mngr_engine {
98    
99            push_el(\@main::el, 'serv_mngr_engine()', 'Starting...');
100    
101            my $cmd;
102    
103            if ($main::changed_mail_cnt > 0 || $main::changed_dmn_cnt > 0 ||
104                    $main::changed_sub_cnt > 0) {
105    
106                    if ($main::cfg{'CMD_AUTHD'} ne 'no') {
107                            $cmd = $main::cfg{'CMD_AUTHD'};
108                            sys_command_rs("$cmd stop");
109                    }
110    
111                    if ($main::cfg{'CMD_AMAVIS'} ne 'no') {
112                            $cmd = $main::cfg{'CMD_AMAVIS'};
113                            sys_command_rs("$cmd stop");
114                    }
115    
116                    if ($main::cfg{'CMD_IMAP'} ne 'no') {
117                            $cmd = $main::cfg{'CMD_IMAP'};
118                            sys_command_rs("$cmd stop");
119                    }
120    
121                    if ($main::cfg{'CMD_POP'} ne 'no') {
122                            $cmd = $main::cfg{'CMD_POP'};
123                            sys_command_rs("$cmd stop");
124                    }
125            }
126    
127            if ($main::changed_dmn_cnt > 0 || $main::changed_sub_cnt > 0 ||
128                    $main::changed_als_cnt > 0 || $main::changed_alssub_cnt > 0) {
129    
130                    # TODO move to rndc
131                    if ($main::cfg{'CMD_NAMED'} ne 'no') {
132                            $cmd = $main::cfg{'CMD_NAMED'};
133                            sys_command_rs("$cmd restart");
134                    }
135            }
136    
137            if ($main::changed_sub_cnt > 0 || $main::changed_als_cnt > 0 ||
138                    $main::changed_alssub_cnt > 0) {
139    
140                    if ($main::cfg{'CMD_FTPD'} ne 'no') {
141                            $cmd = $main::cfg{'CMD_FTPD'};
142                            sys_command_rs("$cmd restart");
143                    }
144            }
145    
146            if ($main::changed_mail_cnt > 0 || $main::changed_dmn_cnt > 0 ||
147                    $main::changed_sub_cnt > 0 || $main::changed_als_cnt > 0) {
148    
149                    # Ensure that postfix is running - Do nothing if running
150                    if ($main::cfg{'CMD_MTA'} ne 'no') {
151                            $cmd = $main::cfg{'CMD_MTA'};
152                            sys_command_rs("$cmd start");
153                    }
154    
155                    if ($main::cfg{'CMD_AUTHD'} ne 'no') {
156                            $cmd = $main::cfg{'CMD_AUTHD'};
157                            sys_command_rs("$cmd start");
158                    }
159    
160                    if ($main::cfg{'CMD_AMAVIS'} ne 'no') {
161                            $cmd = $main::cfg{'CMD_AMAVIS'};
162                            sys_command_rs("$cmd start");
163                    }
164    
165                    if ($main::cfg{'CMD_IMAP'} ne 'no') {
166                            $cmd = $main::cfg{'CMD_IMAP'};
167                            sys_command_rs("$cmd start");
168                    }
169    
170                    if ($main::cfg{'CMD_POP'} ne 'no') {
171                            $cmd = $main::cfg{'CMD_POP'};
172                            sys_command_rs("$cmd start");
173                    }
174            }
175    
176            if ($main::changed_dmn_cnt > 0 || $main::changed_sub_cnt > 0 ||
177                    $main::changed_als_cnt > 0 || $main::changed_alssub_cnt > 0) {
178    
179                    if ($main::cfg{'CMD_HTTPD'} ne 'no') {
180                            my $rs = restart_httpd();
181                            return $rs if ($rs != 0);
182                    }
183            }
184    
185            push_el(\@main::el, 'serv_mngr_engine()', 'Ending...');
186    
187            0;
188    }

Hence, you can try to reproduce the function manually in order to determine where it is going nuts. Basically, you know that there are some changed mail accounts, so you start by "simulating" this bit:
Code:
106                    if ($main::cfg{'CMD_AUTHD'} ne 'no') {
107                            $cmd = $main::cfg{'CMD_AUTHD'};
108                            sys_command_rs("$cmd stop");
109                    }
Hence, you first have to obtain the CMD_AUTH config. variable and run the corresponding script with a "stop" argument. This can be done in a bash shell by issuing the command (you can also do it by parts):
Code:
`grep 'CMD_AUTH' /etc/ispcp/ispcp.conf | cut -d'=' -f2` stop

At some point the process should hang up (issuing those infamous "yes" stuff), so maybe we can work on from there....



Thanks for your help!!! pointed me right to the issue/ error.
(This post was last modified: 06-08-2011 07:33 PM by JCircle.)
06-08-2011 07:31 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)