LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > [RESOLVED] Restart problem (old server isn't killed)

Reply
 
Thread Tools Display Modes
  #11  
Old 02-04-2010, 11:04 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
i will test it on ruby becous my lsapi for php is older
Reply With Quote
  #12  
Old 02-04-2010, 11:10 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
it won't help

server exits and leave lsapi process (ID: 16273) and


Code:
in4max@core2:~% ps aux |grep RAILS
in4max 16506 25.4  1.8 728968 152608  ??  S     8:07PM   0:16.78 ruby: RAILS: fdb.pl (production ID:16496) (ruby)
in4max 16507 22.7  1.8 728968 151572  ??  S     8:07PM   0:30.46 ruby: RAILS: fdb.pl (production ID:16496) (ruby)
in4max 16505 15.0  1.8 727944 149984  ??  S     8:07PM   0:18.65 ruby: RAILS: fdb.pl (production ID:16496) (ruby)
in4max 16273  0.0  1.8 721800 145036  ??  Ss    8:06PM   0:04.22 ruby: RAILS: fdb.pl (production ID:16273) (ruby)
in4max 16281  0.0  1.8 727944 149996  ??  S     8:06PM   0:06.69 ruby: RAILS: fdb.pl (production ID:16273) (ruby)
in4max 16282  0.0  1.8 727944 150796  ??  S     8:06PM   0:07.13 ruby: RAILS: fdb.pl (production ID:16273) (ruby)
in4max 16283  0.0  1.8 728968 152244  ??  S     8:06PM   0:14.94 ruby: RAILS: fdb.pl (production ID:16273) (ruby)
in4max 16496  0.0  1.8 721800 145040  ??  Ss    8:07PM   0:04.32 ruby: RAILS: fdb.pl (production ID:16496) (ruby)
in4max 16508  0.0  1.8 727944 149956  ??  S     8:07PM   0:07.46 ruby: RAILS: fdb.pl (production ID:16496) (ruby)
when i truss them are killed:

Code:
root@core2:/var/db/mysql# truss -p 16281
clock_gettime(4,{4022.010929191 })		 = 0 (0x0)
select(1,{0},0x0,0x0,{0.774455 })		 = 0 (0x0)
getppid(0x1,0x7fffffffe0e0,0x0,0x0,0x7fffffffdff0,0x0) = 17682 (0x4512)
sigaction(SIGINT,{ SIG_DFL SA_RESTART ss_t },{ 0x45ee24 SA_RESTART ss_t }) = 0 (0x0)
close(3)					 = 0 (0x0)
close(6)					 = 0 (0x0)
close(6)					 ERR#9 'Bad file descriptor'
write(5,"\^A\0\0\0\^A",5)			 = 5 (0x5)
shutdown(5,SHUT_RDWR)				 = 0 (0x0)
close(5)					 = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
...

Last edited by Grzegorz Derebecki; 02-04-2010 at 11:13 AM..
Reply With Quote
  #13  
Old 02-04-2010, 11:15 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
There should be one ruby process with parent PID of 1, that's the one started by LSWS, the other worker ruby processes are forked by that process.
So, check that ruby process with ktrace/kdump, see if it is doing getppid(), and the result.

The configuration change only affect newly started ruby processes, so you may need to restart LSWS the second time to check the effect.
Reply With Quote
  #14  
Old 02-05-2010, 02:56 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
still sometimes all lsapi process arent turned off. Why server exit before it checkc that all sapi process are killed?

(i meen root process not www with not have rights to kill sapi process)

This is lived lsapi process:

Code:
root@core2:/opt/lsws/fcgi-bin# truss -p 68635
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367432.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)
nanosleep({0.100000000 })			 = 0 (0x0)
clock_gettime(13,{1265367433.000000000 })	 = 0 (0x0)

if i do kill 68635 it property kills all childs. Why litespeed don't killed them?

Last edited by Grzegorz Derebecki; 02-05-2010 at 02:59 AM..
Reply With Quote
  #15  
Old 02-05-2010, 09:19 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Are you sure you removed "LSAPI_PPID_NO_CHECK" completely from env, instead of set it to "0"?
As long as "LSAPI_PPID_NO_CHECK" is present, regardless value, LSAPI will not check PPID.

lshttpd process that starts the LSAPI app in suEXEC mode cannot kill it due to permission issue, only the parent lshttpd process running as "root" can, but it has exit already at this stage.
Reply With Quote
  #16  
Old 02-05-2010, 02:03 PM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Quote:
Originally Posted by mistwang View Post
Are you sure you removed "LSAPI_PPID_NO_CHECK" completely from env, instead of set it to "0"?
As long as "LSAPI_PPID_NO_CHECK" is present, regardless value, LSAPI will not check PPID.
Hmm right i set it to 0 strange

Quote:
lshttpd process that starts the LSAPI app in suEXEC mode cannot kill it due to permission issue, only the parent lshttpd process running as "root" can, but it has exit already at this stage.
of corse parent should to it i think. But i will test it with completly removed LSAPI_PPID_NO_CHECK
Reply With Quote
  #17  
Old 02-11-2010, 12:44 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Ok after few days tests all working ok
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:29 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.