From:             
Operating system: Linux
PHP version:      5.3.6
Package:          FPM related
Bug Type:         Bug
Bug description:FPM+chroot: random Error 404

Description:
------------
Debian squeze:



# uname -a

Linux xxx 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64
GNU/Linux



Lighty 1.4.28 with fastcgi config lines:

fastcgi.server             = ( ".php" =>

                               (

                                 (

                                   "host" => "127.0.0.1",

                                   "port" => 9001

                                 )

                               )

                            )





# ls -l /web/web/host/web/web/host

lrwxrwxrwx 1 root root 1 Apr 26 15:10 /web/web/host/web/web/host -> /



Docroot is:

/web/web/host/teszdomain.hu/pages



If I turn on chroot to /web/web/host in the fpm config, PHP starts dropping
error 404 randomly:



Process 26491 attached - interrupt to quit

accept(0, {sa_family=AF_INET, sin_port=htons(57968),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 3

poll([{fd=3, events=POLLIN}], 1, 5000)  = 1 ([{fd=3, revents=POLLIN}])

read(3, "\1\1\0\1\0\10\0\0", 8)         = 8

read(3, "\0\1\0\0\0\0\0\0", 8)          = 8

read(3, "\1\4\0\1\3`\0\0", 8)           = 8

read(3, "\17\17SERVER_SOFTWARElighttpd/1.4.28"..., 864) = 864

read(3, "\1\4\0\1\0\0\0\0", 8)          = 8

lstat("/web/web/host/tesztdomain.hu/pages/x.php", {st_mode=S_IFREG|0644,
st_size=102, ...}) = 0

lstat("/web/web/host/tesztdomain.hu/pages", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0

lstat("/web/web/host/tesztdomain.hu", {st_mode=S_IFDIR|0755, st_size=29,
...}) = 0

stat("/web/web/host/tesztdomain.hu/pages", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0

stat("/web/web/host/tesztdomain.hu", {st_mode=S_IFDIR|0755, st_size=29,
...}) = 0

stat("/web/web/host", {st_mode=S_IFDIR|0111, st_size=4096, ...}) = 0

stat("/web/web", {st_mode=S_IFDIR|0755, st_size=17, ...}) = 0

stat("/web", {st_mode=S_IFDIR|0755, st_size=16, ...}) = 0

stat("", 0x7fffc3463110)                = -1 ENOENT (No such file or
directory)

setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) = 0

rt_sigaction(SIGPROF, {0x664e20, [PROF], SA_RESTORER|SA_RESTART,
0x7f04f9d7e1e0}, {0x664e20, [PROF], SA_RESTORER|SA_RESTART,
0x7f04f9d7e1e0}, 8) = 0

rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0

write(3, "\1\6\0\1\0002\6\0Status: 404 Not Found\r\nC"..., 80) = 80

shutdown(3, 1 /* send */)               = 0

recvfrom(3, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8

recvfrom(3, "", 8, 0, NULL, NULL)       = 0

close(3)                                = 0

setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0

accept(0, ^C <unfinished ...>

Process 26491 detached







And sometimes it works just fine:



Process 26491 attached - interrupt to quit

accept(0, {sa_family=AF_INET, sin_port=htons(59088),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 3

poll([{fd=3, events=POLLIN}], 1, 5000)  = 1 ([{fd=3, revents=POLLIN}])

read(3, "\1\1\0\1\0\10\0\0", 8)         = 8

read(3, "\0\1\0\0\0\0\0\0", 8)          = 8

read(3, "\1\4\0\1\3`\0\0", 8)           = 8

read(3, "\17\17SERVER_SOFTWARElighttpd/1.4.28"..., 864) = 864

read(3, "\1\4\0\1\0\0\0\0", 8)          = 8

lstat("/web/web/host/tesztdomain.hu/pages/x.php", {st_mode=S_IFREG|0644,
st_size=102, ...}) = 0

lstat("/web/web/host/tesztdomain.hu/pages", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0

lstat("/web/web/host/tesztdomain.hu", {st_mode=S_IFDIR|0755, st_size=29,
...}) = 0

lstat("/web/web/host", {st_mode=S_IFLNK|0777, st_size=1, ...}) = 0

readlink("/web/web/host", "/"..., 4096) = 1

stat("/web/web/host/tesztdomain.hu/pages/.user.ini", 0x7fffc3460aa0) = -1
ENOENT (No such file or directory)

setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) = 0

rt_sigaction(SIGPROF, {0x664e20, [PROF], SA_RESTORER|SA_RESTART,
0x7f04f9d7e1e0}, {0x664e20, [PROF], SA_RESTORER|SA_RESTART,
0x7f04f9d7e1e0}, 8) = 0

rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0

open("/tesztdomain.hu/pages/x.php", O_RDONLY) = 4

fstat(4, {st_mode=S_IFREG|0644, st_size=102, ...}) = 0

getcwd("/", 4095)                       = 2

chdir("/web/web/host/tesztdomain.hu/pages") = 0

setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={120, 0}}, NULL) = 0

ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffc345e850) = -1 ENOTTY
(Inappropriate ioctl for device)

fstat(4, {st_mode=S_IFREG|0644, st_size=102, ...}) = 0

mmap(NULL, 134, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f04fd5cf000

fstat(4, {st_mode=S_IFREG|0644, st_size=102, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f04fd5ce000

lseek(4, 0, SEEK_CUR)                   = 0

munmap(0x7f04fd5cf000, 102)             = 0

close(4)                                = 0

munmap(0x7f04fd5ce000, 4096)            = 0

uname({sys="Linux", node="xxx", ...}) = 0

write(3, "\1\6\0\1\37\370\0\0Content-type: text/html\r"..., 8192) = 8192

write(3, "\1\6\0\1\37\370\0\0=\"v\">Off</td></tr>\n<tr><"..., 8192) = 8192

write(3, "\1\6\0\1\37\370\0\0<td class=\"e\">y2k_compli"..., 8192) = 8192

write(3, "\1\6\0\1\37\370\0\0 cellpadding=\"3\" width=\""..., 8192) = 8192

write(3, "\1\6\0\1\37\370\0\0d><td class=\"v\">100</td>"..., 8192) = 8192

chdir("/")                              = 0

write(3, "\1\6\0\1\30\353\5\0s=\"e\">_REQUEST[\"PHPSESSI"..., 6408) = 6408

shutdown(3, 1 /* send */)               = 0

recvfrom(3, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8

recvfrom(3, "", 8, 0, NULL, NULL)       = 0

close(3)                                = 0

setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0

accept(0, ^C <unfinished ...>





Note, I run PHP-FPM with the same chroot+symlink trick on other box and it
works fine all the time.




-- 
Edit bug report at http://bugs.php.net/bug.php?id=54612&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54612&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54612&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54612&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54612&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54612&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54612&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54612&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54612&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54612&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54612&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54612&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54612&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54612&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54612&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54612&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54612&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54612&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54612&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54612&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54612&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54612&r=mysqlcfg

Reply via email to