Bug 1138

Summary: [LTP] Some growfiles cases failed with Yocto 1.1 M1 build
Product: [Yocto Project Subprojects] Kernel Reporter: Jiajun Xu <jiajun.xu>
Component: kernel-toolingAssignee: Darren Hart <dvhart>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Low CC: dexuan.cui, dvhart, ke.yu, sgw, wenhuax.fan, yi.zhao, yp.kernel.watcher, yp.watcher
Version: unspecified   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard: suggestion is post 1.1. test cases still fail with eglibc 4.5.1(June 16)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2011-06-06 06:58:09 UTC
Tree/Branch: Poky/1.1_M1
Poky Commit: 4ff7af11ef69849ef9c16f585eae58ac920b222b
Meta Branch: 1.1_M1
Meta Commit: fc719f0cd6530ce15148b4aa274f1644b461b298

With Yocto 1.1 M1 RC2 build, some growfiles cases failed on x86/x86-64 targets(blacksand and sugarbay), which used to run pass in Yocto 1.0 M4. Growfiles test case will create and truncate files in gradual steps using write, and lseek.

The error log of these failure cases show:
#######
<<<test_output>>>
growfiles(gf02): 13903 growfiles.c/2144: 1 tlibio.c/1675 aio_write, aio_error = 1 Operation not permitted; random method 0200002
growfiles(gf02): 13903 growfiles.c/1679: 1 Hit max errors value of 1
gf02        1  TFAIL  :  Test failed
#######

To reproduce the bug, you could download the LTP from http://downloads.sourceforge.net/project/ltp/LTP%20Source/ltp-20110606/ltp-full-20110606.bz2 and build it in target system. Then you could find growfiles under "./testcases/kernel/fs/doio/growfiles.c". Run it with commands "growfiles -W gf02 -b -e 1 -L 10 -i 100 -I p -S 2 -u -f gf03_ -d $TMPDIR" you will get above failure. $TMPDIR is a temp folder you create for temp file save.
Comment 1 Bruce Ashfield 2011-06-06 07:24:09 UTC
We've got a kernel uprev between those test points, so likely this
is either a LTP test case issue or something that the kernel has done
on purpose and LTP hasn't updated yet. At least that is the typical
issue/premise for this sort of issue. The 3rd choice is obvious: it's
a mainline kernel regression.
Comment 2 Darren Hart 2011-06-09 14:33:51 UTC
Was the move to gcc 4.6.0 also between those points?
Comment 3 Darren Hart 2011-06-09 14:35:31 UTC
Can we confirm this is still broken on gcc 4.5.1 before assigning it as a kernel bug
Comment 4 Dexuan Cui 2011-06-09 21:40:18 UTC
(In reply to comment #0)
> The error log of these failure cases show:
> #######
> <<<test_output>>>
> growfiles(gf02): 13903 growfiles.c/2144: 1 tlibio.c/1675 aio_write, aio_error =
> 1 Operation not permitted; random method 0200002
> growfiles(gf02): 13903 growfiles.c/1679: 1 Hit max errors value of 1
> gf02        1  TFAIL  :  Test failed
> #######
aio_write is implemented in libc's librt and I think it's not related to kernel aio( io_submit(), libaio).  Since aio_write doesn't need support of the kernel, I don't think this bug is related to kernel change.
I think eglibc 4.6 may be the cause since previously with eglibc 4.5 we don't have this bug.
Comment 5 Dexuan Cui 2011-06-09 21:46:28 UTC
(In reply to comment #4)
> (In reply to comment #0)
> > The error log of these failure cases show:
> > #######
> > <<<test_output>>>
> > growfiles(gf02): 13903 growfiles.c/2144: 1 tlibio.c/1675 aio_write, aio_error =
> > 1 Operation not permitted; random method 0200002
> > growfiles(gf02): 13903 growfiles.c/1679: 1 Hit max errors value of 1
> > gf02        1  TFAIL  :  Test failed
> > #######
> aio_write is implemented in libc's librt and I think it's not related to kernel
> aio( io_submit(), libaio).  Since aio_write doesn't need support of the kernel,
> I don't think this bug is related to kernel change.


> I think eglibc 4.6 may be the cause since previously with eglibc 4.5 we don't
> have this bug.
Sorry, actually I can't 100% make sure eglibc 4.5 is ok here. Jiajun is trying to see if 4.5 is ok.
Comment 6 Jiajun Xu 2011-06-15 19:57:09 UTC
Hi all,
I built the target image against the same commit with eglibc 4.5.1. Then I build the LTP test cases in the image. These growfiles cases still fail.

######
root@sugarbay:/opt/ltp/testcases/bin# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-poky-linux/4.5.1/lto-wrapper
Target: x86_64-poky-linux
Configured with: /home/jxu49/osel/poky/build/tmp/work/snb-poky-linux/gcc-4.5.1-r5/gcc-4.5.1/configure --build=i686-linux --host=x86_64-poky-linux --target=x86_64-poky-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --with-libtool-sysroot=/home/jxu49/osel/poky/build/tmp/sysroots/sugarbay --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=x86_64-poky-linux- --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --enable-cheaders=c_global --with-local-prefix=/home/jxu49/osel/poky/build/tmp/sysroots/sugarbay/usr --with-gxx-include-dir=/usr/include/c++/ --enable-nls --enable-__cxa_atexit
Thread model: posix
gcc version 4.5.1 (GCC)
######

######
root@sugarbay:/opt/ltp/testcases/bin# ./growfiles -W gf02 -b -e 1 -L 10 -i 100 -I p -S 2 -u -f gf03_ -d /opt/tmp/
growfiles(gf02): 17568 growfiles.c/2144: 1 tlibio.c/1675 aio_write, aio_error = 1 Operation not permitted; random method 0200002
growfiles(gf02): 17568 growfiles.c/1679: 1 Hit max errors value of 1
gf02        1  TFAIL  :  Test failed
######
Comment 7 Darren Hart 2011-06-16 08:01:15 UTC
I presume you mean gcc 4.5.1? not eglibc?
Comment 8 Jiajun Xu 2011-06-16 08:12:47 UTC
(In reply to comment #7)
> I presume you mean gcc 4.5.1? not eglibc?

You are right, Darren. It's gcc 4.5.1, not eglibc. Sorry for confusion.
Comment 9 Bruce Ashfield 2011-08-22 20:11:12 UTC
Darren: I don't have access to any hardware that can reproduced this issue. 

Although, I see this as a minor issue that can be dealt with post 1.1
Comment 10 Yi Zhao 2011-09-21 00:29:55 UTC
With 1.1 M4 RC2 build, this issue happened on routerstationpro and beagleboard. It can pass on mpc8315e-rdb.
Comment 11 Yi Zhao 2012-01-19 23:09:50 UTC
With 1.2 M2 RC1 build, all growfiles cases can pass with 3.0 kernel on beagleboard, routerstationpro and mpc8315e-rdb.
Comment 12 Saul Wold 2013-04-29 23:22:13 UTC
Is this still an issue?
Comment 13 Yi Zhao 2013-05-02 05:38:15 UTC
(In reply to comment #12)
> Is this still an issue?

There is no such issue in 1.3 and 1.4. Mark as fixed.