Customapache kills sshd

Are there any updates on this ?
I have a few RH and Debian servers that really should be updated soon, however I can't restart the servers remote at the moment, due to 'human error' when we moved to the new datacenter...
 
I just have the problem of kill ...

I was compiling php (i had freetype) on a new da server (with FC3)

Before i stoped all services except sshd and directadmin. And boom, during php compiling, sshd killed, directadmin killed.

I'm asking to my data center to reboot my server, i will install webmin (thanks dennisc), but that can be better if this problem can be solve.
 
Has anyone that has seen this problem been able to look at the console when encountering the problem? I read a post after doing a google search, that could be part of the problem. Someone was compiling a kernel and the sshd process was killed due to running out of swap space. Both FreeBSD and Linux have a system in place to kill processes when they reach a so called OOM (Out Of Memory) state. What was the swap allocation for the systems that had this problem?

I have scoured the build process for php and there is nothing there that would cause this type of thing. It has to be somthing in the OS or outside process doing the killing.
 
toml said:
Has anyone that has seen this problem been able to look at the console when encountering the problem? I read a post after doing a google search, that could be part of the problem. Someone was compiling a kernel and the sshd process was killed due to running out of swap space. Both FreeBSD and Linux have a system in place to kill processes when they reach a so called OOM (Out Of Memory) state. What was the swap allocation for the systems that had this problem?

I have scoured the build process for php and there is nothing there that would cause this type of thing. It has to be somthing in the OS or outside process doing the killing.
Since it only happens when compiling PHP, it has *something* to do with it. I don't think it's something 'in the OS', because people reported here running all kind of Linux and Unix OS's. And since it doesn't happen (as far as i know) on a server that doesn't run DirectAdmin, it's probably the combination of PHP and DirectAdmin (or a combination of software versions running with the default DirectAdmin installation). What you say about 'OOM' could be the problem, because besides the SSHD, also other processes get killed sometimes.

With a bit of luck, we're going to install a new server with DirectAdmin next week or the week after that. I already had contact with DirectAdmin and if the problem occur on that server, they will take a look on the server and maybe can find out what is going wrong! I'll also monitor the swap useage as you say, to see if that has something to do with it.
 
Actually here is a post from a FreeBSD list with no mention of DA. It is possible that one of the php compile options that DA uses causes the swap to be consumed. But since, customapache is nothing but plain vanilla php tar balls with custom build options, I can't see how it is a DA problem. It sounds more like a system or php problem.

If you can duplicate the problem, try one by one removing some options from the configure.php until it builds, the last one removed is most likely the culprit.
 
I do think that it is not a DA problem :

I just compiled php two times on RH9

In both cases, I could not get a connection with ssh :
ssh_exchange_identification: Connection closed by remote host

DA in not involved in the process : I could use ssh to go to ./build and, during the process of compilation, suddently, I got no longer access with a new ssh.


The only strange thing is that DA still shows a sshd process with a pid.
If I issue a sshd restart (including with DA services monitoring screen) everything comes back.


Michel
 
The whole thing is weird, problem goes away when I use ports version of openssh it only dies if I use the os version.

Could it be a bug with older sshd perhaps?
 
Hello,

I got the same problem in the past, I guess it was because of my configure.php file.

When you add inside some parameters, you must be careful I tried few minutes ago to add --with-gettext \[ ] (where [] means 2space after \ and all crashed... SSH broke down).

Maybe try to see if it's not a very sensitive file.

Anyway good luck for who have problems!
 
Maniak said:
Hello,

I got the same problem in the past, I guess it was because of my configure.php file.

When you add inside some parameters, you must be careful I tried few minutes ago to add --with-gettext \[ ] (where [] means 2space after \ and all crashed... SSH broke down).

Maybe try to see if it's not a very sensitive file.

Anyway good luck for who have problems!


I have the same problem at a FC 3 server, ssh and directadmin both go down while updating.

I have check the configure.php file like you said and checked the spaces, but everything seems fine..

After many time of searching I can't figure out what is causin' this :confused:, so I hope somebody got an answer!
 
Like I said in an earlier post a workaround is to stop using the base version of sshd on the operating system this at least works for FreeBSD, I have not had a single sshd session die on me since I started using openssh-portable.
 
dennisc said:
Not everyone wants that, I assume. I would never replace the system SSH [FreeBSD] with the portable one.
And your reason is ???

I don't understand not wanting to replace an unworking version of a program with a working one.

Jeff
 
openssh-portable is developed by the exact same people as the base version, its simply one thats maintained by ports maintainers who make it work optimally for FreeBSD like everything else in the ports, whilst the default one is distributed with FreeBSD simply so they have a functioning ssh system out of the box, simply using that has many disadvantages such as it is usually out of date even on release day never mind months after, whilst the port is kept maintained.
 
The sshd in the base system is also from openbsd or are you claiming they code a seperate version especially for the base system, the only difference's will be are the base version is usually out of date and the port version you can compile with custom configuration flags and maintain easier. The base version will also be linked to the out of date openssl shipped with freebsd base system which I guess you also probably use thinking the ports version is not the same quality.

I dont leave things simply because they work, I like to keep my software up to date for security fixes and the like and there is some particular sshd fixes that exist post freebsd 5.3 and 5.4, I dont know if 6.0 has them or not. Concerning the bug mentioned in this thread, I didnt move to ssh portable for this reason I just happen to use it anyway but I picked up on the fact that when using the base version it gets killed during customapache compiling so I made others aware of the workaround. You dont have to use this workaround and if you dont need it good for you, I am just trying to help others.
 
Again, with a brand new installation of FC4 and DA on a new server... I wanted to install a few apache modules, added the configure.php file, then
./build clean
./build php

php compiled perfectly, but DirectAdmin and Apache died....
 
SSH killed when upgrading PHP

I haven't seen the right answer on this thread yet, while the answer is pretty straightforward. If you watch the PHP compile process closely, your SSH connection is breaking down at the point where zlib is being recompiled.

Both PHP and SSH use the same shared library "zlib" but if the library "/usr/local/lib/libz.so" is being replaced SSH detects that and kills itself.

The solution is either to rebuild PHP without rebuilding zlib, or to add a cronjob to restart SSH within half an hour or so.
 
Back
Top