Apache 2 crashes with a lot of Virtual Hosts

Wido

Verified User
Joined
Sep 30, 2005
Messages
43
Hi,

On Debian Sarge systems you can get a Segmentation Fault when running Apache 2 with a lot of Virtual Hosts, this is due to a bug in libssl0.9.7 supplied by Debian.

For more information: http://lists.alioth.debian.org/pipermail/pkg-openssl-devel/2006-March/000689.html

But, now the big surprise :)

Due to this bug we decided to run our new server on Ubuntu Dapper, since Ubuntu uses OpenSSL 0.9.8 by default.

I tried everything i could, but still Apache 2 starts to crash with a lot of Virtual Hosts. This is because DirectAdmin always creates a "secure" / SSL virtualhost for every domain / subdomain.

You can find out wether this bug is effecting your system by running a strace on your system:
Code:
time(NULL)                              = 1169047932
getpid()                                = 4624
open("/dev/urandom", O_RDONLY|O_NONBLOCK|O_NOCTTY) = 1379
select(1380, [1026 1059 1060 1069 1071 1072 1073 1074 1083 1091 1094 1096 1099 1101 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1122 1155 1156 1165 1167 1168 1169 1170 1179 1188 1193 1196 1219 1222 1224 1227 1229 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1249 1250 1251 1256 1258 1260 1261 1262 1263 1266 1275 1283 1284 1293 1295 1296 1297 1298 1307 1315 1317 1325 1327 1328 1329 1330 1339 1376 1378], NULL, NULL, {0, 10000}) = 168 (in [1025 1029 1031 1033 1034 1036 1038 1042 1043 1045 1046 1047 1048 1049 1050 1052 1053 1054 1055 1061 1070 1075 1076 1077 1078 1079 1080 1081 1082 1084 1085 1086 1087 1093 1094 1096 1097 1101 1104 1105 1106 1115 1120 1122 1155 1156 1165 1167 1168 1169 1170 1179 1219 1222 1224 1227 1229 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1249 1250 1251 1256 1258 1260 1261 1262 1263 1266 1275 1283 1284 1293 1295 1296 1297 1298 1307 1315 1317 1325 1327 1328 1329 1330 1339 1376 1378], left {0, 10000})
read(1379, "\3115_\\2`\214\344|\241\351|\366!\350m,\315N\204v\20\231"..., 32) = 32
close(1379)                             = 0
getuid32()                              = 0
time(NULL)                              = 1169047932
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

As you can see, Apache opens /dev/urandom for a seed of random numbers for the encryption, and then it crashes.

This is for your information, you can do with it what you want.
 
Back
Top