Hi,

I've been running some x86_64 guests with the new ptrace_fixes patch
for the last few days. For the most part everything has been running
very well, but I have encountered a couple of problems running the
apache2 server. The first problem is documented here.

Ordinarily apache2 runs just fine, but when you configure it to
run with ssl configured (mod_ssl) it starts to get hit by a SIGSEGV
about once every second. This condition is triggered as soon as the
first request arrives. Note, that this initial request does not need
to be on port 443 (HTTPS), a normal HTTP request triggers it as well.

My Host is a debian stock 2.6.18-3-amd64.

My Guest is 2.6.20 built from kernel.org sources with the following
six patches applied:

[patches from 2007-01-23]
5/7: style fixes in startup code
6/7: libc-dependent code should call libc
7/7: fix style violations 

[patches from 2007-02-08]
1/3: Fix error output during early boot
2/3: x86_64 thread fixes
3/3: x86_64 ptrace fixes

I've taken straces running both with and without mod_ssl loaded. The
major difference appears to be that epoll is used when mod_ssl
is loaded. The following shows what happens when I issue something 
like: 

  curl --head http://my.pache.server


== Output without mod_ssl ==
842   02:35:43 accept(3,  <unfinished ...>
...
812   02:35:53 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
812   02:35:54 wait4(-1, 0x7f7ffabcdc, WNOHANG|WSTOPPED, NULL) = 0
812   02:35:54 select(0, NULL, NULL, NULL, {1, 0} <unfinished ...>
842   02:35:54 <... accept resumed> {sa_family=AF_INET, sin_port=htons(53125), 
sin_addr=inet_addr("10.0.0.22")}, [17179869200]) = 10
842   02:35:54 futex(0x64124c, FUTEX_WAKE, 1) = 1
841   02:35:54 <... futex resumed> )    = 0
842   02:35:54 accept(3,  <unfinished ...>
841   02:35:54 futex(0x6411f8, FUTEX_WAKE, 1) = 0
841   02:35:54 getsockname(10, {sa_family=AF_INET, sin_port=htons(80), 
sin_addr=inet_addr("10.0.0.190")}, [17179869200]) = 0
...
841   02:35:54 futex(0x64124c, FUTEX_WAIT, 27, NULL <unfinished ...>
812   02:35:55 <... select resumed> )   = 0 (Timeout)
812   02:35:55 wait4(-1, 0x7f7ffabcdc, WNOHANG|WSTOPPED, NULL) = 0
812   02:35:55 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
== END TRACE ==


== Output with mod_ssl ==
904   03:19:56 epoll_create(2)          = 13
904   03:19:56 epoll_ctl(13, EPOLL_CTL_ADD, 4, {EPOLLIN, {u32=6031368, 
u64=6031368}}) = 0
904   03:19:56 epoll_ctl(13, EPOLL_CTL_ADD, 3, {EPOLLIN, {u32=6031416, 
u64=6031416}}) = 0
904   03:19:56 rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
904   03:19:56 rt_sigaction(SIGHUP, {0x445040, [], SA_RESTORER|SA_INTERRUPT, 
0x4113f410}, {0x445000, [HUP USR1], SA_RESTORER, 0x4113f410}, 8) = 0
904   03:19:56 semop(65536, 0x40df2da0, 1) = 0
904   03:19:56 epoll_wait(13,  <unfinished ...>
...
870   03:20:43 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
870   03:20:44 wait4(-1, 0x7f7f907e2c, WNOHANG|WSTOPPED, NULL) = 0
870   03:20:44 select(0, NULL, NULL, NULL, {1, 0} <unfinished ...>
904   03:20:45 <... epoll_wait resumed> {{EPOLLIN, {u32=0, u64=0}}}, 2, 
4294967295) = 1 
904   03:20:45 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
904   03:20:45 chdir("/etc/apache2")    = 0
904   03:20:45 rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
904   03:20:45 kill(871, SIGSEGV)       = 0
871   03:20:45 <... read resumed> 0x7f7f907de7, 1) = ? ERESTARTSYS (To be 
restarted)
871   03:20:45 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
904   03:20:45 +++ killed by SIGSEGV +++
875   03:20:45 <... futex resumed> )    = -1 EINTR (Interrupted system call)
877   03:20:45 <... futex resumed> )    = -1 EINTR (Interrupted system call)
...
875   03:20:45 +++ killed by SIGSEGV +++
877   03:20:45 +++ killed by SIGSEGV +++
== END TRACE ==

Soon after this it enters a loop of cloning batches of processes
(threads?) only to have them killed off by a SIGSEGV.

epoll is actually used when mod_ssl is not loaded as well,
but it's used very sparingly (a few calls to epoll_create and
epoll_ctl). Apache2 isn't shutting down very cleanly at the moment
(as I hope to highlight in follow up post), so I'm hoping there's
a correlation here.

jez


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to