Hi,

Thanks for providing reply.

Yes. It works fine without any issue on my custom Linux Board with single listen port but failed to execute on multiple listen ports.

I have started my httpd process with "*-DNO_DETACH -DONE_PROCESS*" options and debug that process using strace on my Linux Board with single and multiple listen port requests.

I have found from strace output of each request that following two system calls are not executed in multiple listen port request compare to single listen port request which is used to create that fd as non blocking.

    fcntl64(9, F_GETFL)                     = 0x2 (flags O_RDWR)
    fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK)  = 0

so that *read()* system call goes into hang state after sending HTTP request in multiple listen port on my custom Linux board.

Please find attached text files which contains output of strace command of single and multiple listen ports request of my custom Linux board.

Regards,
Ritesh Prajapati,
System Level Solutions (India) Pvt.Ltd.

On Thursday 17 July 2014 04:28 PM, Jeff Trawick wrote:
On Wed, Jul 16, 2014 at 7:17 AM, Ritesh Prajapati <[email protected] <mailto:[email protected]>> wrote:

    Hi All,

    I have one Custom Linux board on which I want to run apache web
    server (httpd) to test HTML and other web based pages.

    I have configured, cross compiled and installed httpd (2.2.24,
    2.4.1, 2.4.4 and 2.4.9 packages) on my Linux PC (Ubuntu 12.04 LTS)
    as well as
    on my own custom Linux board. Then I have added support of SSL
    Module (mod_ssl) to test HTTP as well as HTTPS request.

    Both HTTP and HTTPS request works fine without any issue on my
    Linux PC (Ubuntu 12.04 LTS). But when I tried to execute same HTTP
    request
    on my Linux Board using httpd (2.4.4 and 2.4.9 with SSL Module
    Enabled) at that time browser page goes into loading state and can
    not be came out from that situation.
    Also I have seen that HTTPS request works fine at that time.


Does it work on your Linux board with just one listening socket enabled? ("Listen 0.0.0.0:80 <http://0.0.0.0:80>")


    I have also did some debugging task through wire-shark tool and
    found that connection is established successfully after sending
    request through HTTP
    but can not get response of that request. I have also found that
    response of that HTTP request received on wire-shark after closing
    that HTTP
    requested page from browser.

    Also, I can run HTTP and HTTPS requests successfully using httpd
    (2.2.24 and 2.2.27 with SSL Module enabled) on my Linux Board as
    well but failed to execute same request
    using httpd (2.4.X with SSL Module enabled) package.

    I have also changed some configurations by creating different
    virtual host for HTTP (Port 80) and HTTPS (Port 443) but still
    failed to
    execute that HTTP request.

    I have also tried to listen on different ports like (Listen 80 and
    Listen 8000) without SSL module (using httpd 2.4.4. and 2.4.9 ) at
    that
    time HTTP request goes into loading state.

    Does anyone has idea about this issue or help me to solve this
    type of issue?


It might be a basic problem with the cross-compile -- syscalls used inappropriately due to wrong decisions made at configure time.

Do you have strace or similar available on the Linux board? Configure it with the prefork MPM, start it with -DNO_DETACH -DONE_PROCESS arguments, strace -f against it, then send a request.



-- Regards,
    Ritesh Prajapati,
    System Level Solutions (India) Pvt.Ltd.



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    <mailto:[email protected]>
    For additional commands, e-mail: [email protected]
    <mailto:[email protected]>




--
Born in Roswell... married an alien...
http://emptyhammock.com/
http://edjective.org/


$ ./strace -p 6515
Process 6515 attached
accept(4, {sa_family=AF_INET6, sin6_port=htons(56493), inet_pton(AF_INET6, 
"::ffff:192.168.0.45", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 9
fcntl64(9, F_GETFD)                     = 0
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
semop(1769486, {{0, 1, SEM_UNDO}}, 1)   = 0
gettimeofday({1405598630, 559443}, NULL) = 0
getsockname(9, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, 
"::ffff:192.168.0.183", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
fcntl64(9, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
gettimeofday({1405598630, 562379}, NULL) = 0
gettimeofday({1405598630, 563202}, NULL) = 0
read(9, "GET / HTTP/1.1\r\nHost: 192.168.0."..., 8000) = 289
gettimeofday({1405598630, 566106}, NULL) = 0
gettimeofday({1405598630, 568347}, NULL) = 0
gettimeofday({1405598630, 570265}, NULL) = 0
gettimeofday({1405598630, 572616}, NULL) = 0
gettimeofday({1405598630, 574532}, NULL) = 0
gettimeofday({1405598630, 576433}, NULL) = 0
gettimeofday({1405598630, 578344}, NULL) = 0
gettimeofday({1405598630, 580027}, NULL) = 0
gettimeofday({1405598630, 582467}, NULL) = 0
gettimeofday({1405598630, 583592}, NULL) = 0
stat64("/usr/local/apache2/htdocs/", {st_mode=S_IFDIR|0777, st_size=4096, ...}) 
= 0
stat64("/usr/local/apache2/htdocs/index.html", {st_mode=S_IFREG|0777, 
st_size=45, ...}) = 0
open("/usr/local/apache2/htdocs/index.html", O_RDONLY|O_CLOEXEC) = 10
open("/etc/localtime", O_RDONLY)        = 11
fstat64(11, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
fstat64(11, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2a01d000
read(11, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 
4096) = 127
_llseek(11, -11, [116], SEEK_CUR)       = 0
read(11, "\n<GMT-8>-8\n", 4096)         = 11
close(11)                               = 0
munmap(0x2a01d000, 4096)                = 0
gettimeofday({1405598630, 613836}, NULL) = 0
read(9, 0x504c30, 8000)                 = -1 EAGAIN (Resource temporarily 
unavailable)
gettimeofday({1405598630, 618100}, NULL) = 0
old_mmap(NULL, 45, PROT_READ, MAP_SHARED, 10, 0) = 0x29576000
writev(9, [{"HTTP/1.1 200 OK\r\nDate: Thu, 17 J"..., 280}, {"<html><body><h1>It 
works!</h1></"..., 45}], 2) = 325
munmap(0x29576000, 45)                  = 0
gettimeofday({1405598630, 629700}, NULL) = 0
write(7, "192.168.0.45 - - [17/Jul/2014:20"..., 70) = 70
times({tms_utime=36, tms_stime=35, tms_cutime=0, tms_cstime=0}) = 2053499
close(10)                               = 0
gettimeofday({1405598630, 639513}, NULL) = 0
gettimeofday({1405598630, 641338}, NULL) = 0
poll([{fd=9, events=POLLIN}], 1, 5000)  = 1 ([{fd=9, revents=POLLIN}])
read(9, "GET /favicon.ico HTTP/1.1\r\nHost:"..., 8000) = 270
gettimeofday({1405598630, 753559}, NULL) = 0
gettimeofday({1405598630, 754281}, NULL) = 0
gettimeofday({1405598630, 754777}, NULL) = 0
stat64("/usr/local/apache2/htdocs/favicon.ico", 0x7b9b27a0) = -1 ENOENT (No 
such file or directory)
lstat64("/usr", {st_mode=S_IFDIR|0775, st_size=140, ...}) = 0
lstat64("/usr/local", {st_mode=S_IFDIR|0775, st_size=124, ...}) = 0
lstat64("/usr/local/apache2", {st_mode=S_IFLNK|0777, st_size=20, ...}) = 0
stat64("/usr/local/apache2", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/usr/local/apache2/htdocs", {st_mode=S_IFDIR|0777, st_size=4096, ...}) 
= 0
lstat64("/usr/local/apache2/htdocs/favicon.ico", 0x7b9b27a0) = -1 ENOENT (No 
such file or directory)
gettimeofday({1405598630, 776903}, NULL) = 0
read(9, 0x506c38, 8000)                 = -1 EAGAIN (Resource temporarily 
unavailable)
gettimeofday({1405598630, 781034}, NULL) = 0
writev(9, [{"HTTP/1.1 404 Not Found\r\nDate: Th"..., 213}, {"<!DOCTYPE HTML 
PUBLIC \"-//IETF//"..., 209}], 2) = 422
gettimeofday({1405598630, 788113}, NULL) = 0
write(7, "192.168.0.45 - - [17/Jul/2014:20"..., 82) = 82
times({tms_utime=37, tms_stime=35, tms_cutime=0, tms_cstime=0}) = 2053515
gettimeofday({1405598630, 795425}, NULL) = 0
gettimeofday({1405598630, 797172}, NULL) = 0
poll([{fd=9, events=POLLIN}], 1, 5000)  = 1 ([{fd=9, revents=POLLIN}])
read(9, "GET /favicon.ico HTTP/1.1\r\nHost:"..., 8000) = 300
gettimeofday({1405598630, 976762}, NULL) = 0
gettimeofday({1405598630, 979619}, NULL) = 0
gettimeofday({1405598630, 981716}, NULL) = 0
stat64("/usr/local/apache2/htdocs/favicon.ico", 0x7b9b27a0) = -1 ENOENT (No 
such file or directory)
lstat64("/usr", {st_mode=S_IFDIR|0775, st_size=140, ...}) = 0
lstat64("/usr/local", {st_mode=S_IFDIR|0775, st_size=124, ...}) = 0
lstat64("/usr/local/apache2", {st_mode=S_IFLNK|0777, st_size=20, ...}) = 0
stat64("/usr/local/apache2", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lstat64("/usr/local/apache2/htdocs", {st_mode=S_IFDIR|0777, st_size=4096, ...}) 
= 0
lstat64("/usr/local/apache2/htdocs/favicon.ico", 0x7b9b27a0) = -1 ENOENT (No 
such file or directory)
gettimeofday({1405598631, 14596}, NULL) = 0
read(9, 0x508c40, 8000)                 = -1 EAGAIN (Resource temporarily 
unavailable)
gettimeofday({1405598631, 16674}, NULL) = 0
writev(9, [{"HTTP/1.1 404 Not Found\r\nDate: Th"..., 213}, {"<!DOCTYPE HTML 
PUBLIC \"-//IETF//"..., 209}], 2) = 422
gettimeofday({1405598631, 21375}, NULL) = 0
write(7, "192.168.0.45 - - [17/Jul/2014:20"..., 82) = 82
times({tms_utime=37, tms_stime=35, tms_cutime=0, tms_cstime=0}) = 2053538
gettimeofday({1405598631, 26225}, NULL) = 0
gettimeofday({1405598631, 27234}, NULL) = 0
poll([{fd=9, events=POLLIN}], 1, 5000)  = 0 (Timeout)
gettimeofday({1405598636, 32832}, NULL) = 0
gettimeofday({1405598636, 33255}, NULL) = 0
gettimeofday({1405598636, 33744}, NULL) = 0
gettimeofday({1405598636, 34232}, NULL) = 0
shutdown(9, SHUT_WR)                    = 0
poll([{fd=9, events=POLLIN}], 1, 2000)  = 1 ([{fd=9, revents=POLLIN|POLLHUP}])
read(9, "", 512)                        = 0
close(9)                                = 0
read(5, 0x7b9b2a97, 1)                  = -1 EAGAIN (Resource temporarily 
unavailable)
gettimeofday({1405598636, 39022}, NULL) = 0
semop(1769486, {{0, -1, SEM_UNDO}}, 1)  = 0
accept(4, 
$ ./strace -p 6527
Process 6527 attached
restart_syscall(<... resuming interrupted call ...>) = 0
poll([{fd=6, events=POLLIN}, {fd=4, events=POLLIN}], 2, 10000) = 0 (Timeout)
poll([{fd=6, events=POLLIN}, {fd=4, events=POLLIN}], 2, 10000) = 0 (Timeout)
poll([{fd=6, events=POLLIN}, {fd=4, events=POLLIN}], 2, 10000) = 1 ([{fd=4, 
revents=POLLIN}])
accept(4, {sa_family=AF_INET6, sin6_port=htons(56543), inet_pton(AF_INET6, 
"::ffff:192.168.0.45", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 
11
fcntl64(11, F_GETFD)                    = 0
fcntl64(11, F_SETFD, FD_CLOEXEC)        = 0
semop(1802255, {{0, 1, SEM_UNDO}}, 1)   = 0
gettimeofday({1405598733, 589454}, NULL) = 0
getsockname(11, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, 
"::ffff:192.168.0.183", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
gettimeofday({1405598733, 591566}, NULL) = 0
gettimeofday({1405598733, 593101}, NULL) = 0
read(11, "GET / HTTP/1.1\r\nHost: 192.168.0."..., 8000) = 289
gettimeofday({1405598733, 596680}, NULL) = 0
gettimeofday({1405598733, 598920}, NULL) = 0
gettimeofday({1405598733, 600798}, NULL) = 0
gettimeofday({1405598733, 602927}, NULL) = 0
gettimeofday({1405598733, 604846}, NULL) = 0
gettimeofday({1405598733, 606881}, NULL) = 0
gettimeofday({1405598733, 608923}, NULL) = 0
gettimeofday({1405598733, 610957}, NULL) = 0
gettimeofday({1405598733, 613539}, NULL) = 0
gettimeofday({1405598733, 615663}, NULL) = 0
stat64("/usr/local/apache2/htdocs/", {st_mode=S_IFDIR|0777, st_size=4096, ...}) 
= 0
stat64("/usr/local/apache2/htdocs/index.html", {st_mode=S_IFREG|0777, 
st_size=45, ...}) = 0
open("/usr/local/apache2/htdocs/index.html", O_RDONLY|O_CLOEXEC) = 12
open("/etc/localtime", O_RDONLY)        = 13
fstat64(13, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
fstat64(13, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2a01d000
read(13, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 
4096) = 127
_llseek(13, -11, [116], SEEK_CUR)       = 0
read(13, "\n<GMT-8>-8\n", 4096)         = 11
close(13)                               = 0
munmap(0x2a01d000, 4096)                = 0
gettimeofday({1405598733, 658836}, NULL) = 0
read(11, 
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to