You got to be kidding me, or can't kill a process with Solaris 10

So, I noticed apache running...

So, I want to kill apache, since I don't use it at all....

I have disabled apache2 using svcadm already

root 605210 01:16:39 ?0:00 /usr/apache/bin/httpd -f /etc/apache/httpd-standalone-ipp.conf

lp 6053 60520 01:16:39 ?0:00 /usr/apache/bin/httpd -f /etc/apache/httpd-standalone-ipp.conf

I'm root...

# kill -9 6053 6052

Do ps -ef and, lo and behold, both processes have been restarted.

Ok.

Use scvadm to disable it:

Only apache I see is lrc:/etc/rc3_d/S50apache

svcadm: Operation not supported for legacy service 'lrc:/etc/rc3_d/S50apache'

Ok.

# /etc/init.d/apache stop

Do ps -ef and, lo and behold, both processes have been restarted, again.

Ok.

/etc/rc2.d/S850apache stop

Do a ps -ef and, lo and behold, both processes have been restarted, yet again.

WTF!!!!!!

What's next? A registry? I"M FREAKING ROOT. I want to kill a process.

You are telling me that I need to remove the "legacy" script and REBOOT?!?!?!? I"M FREAKING ROOT. If I want to kill a process, I should be able to kill a process without having something else restarting the service I don't want running, and sure as hell without rebooting....

Ok. I feel better now. I'll feel even better when I go back to Solaris 9

[1356 byte] By [Codename47] at [2007-11-26 6:42:40]
# 1

Not to be rude, but did you read back what you posted? You tried disable apache2 when apache was running, also you tried to stop apache in general when apache was running for IPP. When you disable that part, then your apache goes away. Also downgrading to Solaris 9 aren't going to fixed these kind of problems.

hspaans at 2007-7-6 14:58:46 > top of Java-index,General,Talk to the Sysop...
# 2

Legacy processes are not monitored nor restarted by SMF. Only the fact that the startup script was seen and ran at startup is shown.

If a process is being restarted, its either by something other than SMF, or its for a service that is non-legacy.

You should double-check that no other apache service is running.

Most services are set so that if the process dies 3 times, the service goes into maintenance mode and does not retry the launch. The service will restart on the next reboot, though.

--

Darren

Darren_Dunham at 2007-7-6 14:58:46 > top of Java-index,General,Talk to the Sysop...
# 3

Not to be rude, but I did read what I posted.

The point is that I'm trying to kill -9 a process, stop it using it's stop/start script, and it keeps coming back.

The point is that I don't like Solaris acting like Windows telling me what I can't or can kill/stop.

The point is that a single svc (svc:/application/print/ipp-listener:default) is basically showing as 2 other processes (/usr/apache/bin/httpd x2) in ps -ef even when the uses for IPP are not even configured and/or disabled -as in print server or LDAP-.

Solaris 9 will fix "these type of problems" as you call them because, so far, when I have kill -9'd something in Solaris 9 it has died, and when I've used it's stop/start script, it has stopped, and in my experience, if something is not configured, it usually doesn't run and/or it can be stopped/killed with kill or its run control command.

While I'll admit I went overboard with the dramatic emphasis, I don't like the idea of Solaris acting like Windows telling me what I can or can't do as root and "disguising" what a process truly is.

Codename47 at 2007-7-6 14:58:46 > top of Java-index,General,Talk to the Sysop...
# 4

> Not to be rude, but I did read what I posted.

I did attempt to read your post before replying.

> The point is that I'm trying to kill -9 a process,

> stop it using it's stop/start script, and it keeps

> coming back.

I got that part.

> The point is that I don't like Solaris acting like

> Windows telling me what I can't or can kill/stop.

You may not like it, but that is how several default services are delivered. You can change the behavior but that's a lot of work.

However, the only service you showed in your post was an 'lrc' service. Those are legacy services (started due to links in /etc/rc2.d or /etc/rc3.d) and they are never restarted after being manually killed. At least the SMF framework doesn't do it.

Only newer-style services (start with 'svc') would have that behavior.

> The point is that a single svc

> (svc:/application/print/ipp-listener:default) is

> basically showing as 2 other processes

> (/usr/apache/bin/httpd x2) in ps -ef even when the

> uses for IPP are not even configured and/or disabled

> -as in print server or LDAP-.

Right. Didn't understand that ipp-listener was a service from your first post.

> Solaris 9 will fix "these type of problems" as you

> call them because, so far, when I have kill -9'd

> something in Solaris 9 it has died, and when I've

> used it's stop/start script, it has stopped, and in

> my experience, if something is not configured, it

> usually doesn't run and/or it can be stopped/killed

> with kill or its run control command.

Yup. But it'll start back up again when you reboot. You'll probably want to disable it permanently too. While moving the startup script aside (or modifying /etc/inetd.conf. or whatever) would work, that wasn't necessarily a supported interface (mainly because patches could always add the link back). With Solaris 10 the supported interface is:

#svcadm disable ipp-listener

> While I'll admit I went overboard with the dramatic

> emphasis, I don't like the idea of Solaris acting

> like Windows telling me what I can or can't do as

> root and "disguising" what a process truly is.

I'm not sure that it's disguising anything. You can run 'svcs -p' to display all the PIDs of servers running from services. Given the PID, you can find the service that is running it.

Most services are explicitly configured to restart a process that dies unexpectedly (up to 3 times). You can change that, but it's probably easier to just disable the service.

Note that one of the big differences between the svc stuff and traditional startup scripts is that its a way to encode *intentionality* into the system. Pre-10, a process is just a process. If a process dies unexpectedly, the system can make no decision about it. With 10, the SMF now has a flag to say that a service (like Apache or sendmail or anything) *should* be running and that it is an error not to run. This lets the system make better decisions if a CPU dies and takes a process with it. (Pre-10, the system would have to assume that the process was critical and would immediately schedule a reboot).

The price to pay for that functionality is that you now have to manage the intentionality at the service level rather than simply killing processes.

--

Darren

Darren_Dunham at 2007-7-6 14:58:46 > top of Java-index,General,Talk to the Sysop...
# 5
Darren,I'm sorry. The response I typed was for the poster before you. I should've made it clear. I apologize for not making it clear.
Codename47 at 2007-7-6 14:58:46 > top of Java-index,General,Talk to the Sysop...
# 6

> Darren,

>

> I'm sorry. The response I typed was for the poster

> before you. I should've made it clear. I apologize

> for not making it clear.

Ha! I just now read the text more clearly that I not only read once, but actually pasted backin. Yes, indeed.

No worries. SMF (and maybe GRUB for x86) is the one new feature of Solaris 10 that really changes the way the system works out of the box. Zones, Dtrace, ZFS, etc all have to be turned on by the admin today so you know when you're going to deal with it. You can still do legacy startup stuff in the future, but most of the OS daemons are going to be part of SMF going forward.

--

Darren

Darren_Dunham at 2007-7-6 14:58:46 > top of Java-index,General,Talk to the Sysop...