Hi,
Apache uses sendfile, which went through several changes in latest kernels.
I believe you have to apply splice patch (see in /patches/ directory in aufs 
sources).

But maybe I am wrong.

By the way, 2.6.24.24 doesn't exist yet :)

Tomas M


Wolfgang Barth wrote:
> Hi,
> 
> I have a reproducable bug with Kernel 2.6.24.[24] and apache2. Apache only
> delivers files up to 256 bytes, transfer of larger files will be
> interrupted (nothing was delivered). Others applications seems to work
> correctly. A squid-2.6 on the same machine has no problems to access files
> larger than 256 bytes, copying, transferring via network or editing works
> correctly too.
> 
> I've tested randomly some aufs versions since 20071001, all shows the same
> effect. On the other side, in my older kernel 2.6.20.21 with aufs from
> 20071015 works correctly.
> 
> The curious thing: the time I've seen this bug was two years ago with
> unionfs - and this bug was the reason to switch to aufs ;-)
> 
> Some debug infos including a strace from apache process below.
> 
> Wolfgang
> 
> =====================================
> 
> 1) cat /proc/mounts:
> 
> rootfs / rootfs rw 0 0
> /dev/sr0 / iso9660 ro 0 0
> none /proc proc rw 0 0
> tmpfs /MEMORY tmpfs rw 0 0
> none /etc aufs rw,xino=/MEMORY/etc/.aufs.xino,br:/MEMORY/etc=rw:/z-etc=rr 0 0
> none /dev aufs rw,xino=/MEMORY/dev/.aufs.xino,br:/MEMORY/dev=rw:/dev=rr 0 0
> /dev/sda2 /DISK/var ext3 rw,data=ordered 0 0
> none /var aufs rw,xino=/DISK/var/.aufs.xino,br:/DISK/var=rw:/z-var=rr 0 0
> tmpfs /lib/init/rw tmpfs rw,nosuid 0 0
> sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
> usbfs /proc/bus/usb usbfs rw,nosuid,nodev,noexec 0 0
> tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
> devpts /dev/pts devpts rw,nosuid,noexec 0 0
> /dev/sda5 /var/tmp/havp ext3 rw,mand,data=ordered 0 0
> 
> 2)  ls -l /sys/fs/aufs/*
> 
> -rw-r--r-- 1 root root 0 Apr  4 17:37 /sys/fs/aufs/brs
> -rw-r--r-- 1 root root 0 Apr  4 17:37 /sys/fs/aufs/config
> -rw-r--r-- 1 root root 0 Apr  4 17:37 /sys/fs/aufs/debug
> -rw-r--r-- 1 root root 0 Apr  4 17:37 /sys/fs/aufs/stat
> 
> /sys/fs/aufs/f6cca000:
> total 0
> -rw-r--r-- 1 root root 0 Apr  4 17:37 xino
> 
> /sys/fs/aufs/f75c0a00:
> total 0
> -rw-r--r-- 1 root root 0 Apr  4 17:37 xino
> 
> /sys/fs/aufs/f7c99e00:
> total 0
> -rw-r--r-- 1 root root 0 Apr  4 17:37 xino
> 
> 3)  cat /proc/version
> Linux version 2.6.24.4 ([EMAIL PROTECTED]) (gcc version 4.1.2 20061115
> (prerelease) (Debian 4.1.1-21)) #3 SMP Sun Mar 30 11:00:50 CEST 2008
> 
> 4) strings --all /lib/modules/2.6.24.4/kernel/fs/aufs/aufs.ko |grep version
>  version=20080324
> 
> 5) make KDIR=/usr/src/linux -f local.mk (plain local.mk)
> 
> 6) strace apache process:
> 
> Process 2101 attached - interrupt to quit
> accept(3, {sa_family=AF_INET, sin_port=htons(52723),
> sin_addr=inet_addr("172.17.49.1")}, [16]) = 8
> getsockname(8, {sa_family=AF_INET, sin_port=htons(80),
> sin_addr=inet_addr("172.17.49.12")}, [16]) = 0
> fcntl64(8, F_GETFL)                     = 0x2 (flags O_RDWR)
> fcntl64(8, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
> read(8, "GET /squid/download.html\r\n", 8000) = 26
> gettimeofday({1207336449, 210394}, NULL) = 0
> stat64("/var/www/squid/download.html", {st_mode=S_IFREG|0644, st_size=458,
> ...}) = 0
> open("/var/www/squid/download.html", O_RDONLY|O_LARGEFILE) = 9
> sendfile(8, 9, [0], 458)                = -1 EINVAL (Invalid argument)
> read(8, 0x81c8150, 8000)                = -1 EAGAIN (Resource temporarily
> unavailable)
> write(7, "172.17.49.1 - - [04/Apr/2008:21:"..., 88) = 88
> close(8)                                = 0
> read(4, 0xbff11297, 1)                  = -1 EAGAIN (Resource temporarily
> unavailable)
> close(9)                                = 0
> close(5)                                = 0
> close(4)                                = 0
> exit_group(0)                           = ?
> Process 2101 detached
> 
> =====================================
> 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

Reply via email to