libaio needs aarch64 support

Bug #1090273 reported by Riku Voipio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro AArch64 cross-distro work
Fix Released
Low
Unassigned
Linaro OpenEmbedded
Fix Released
Undecided
Riku Voipio

Bug Description

libaio build bombs out with:

| aarch64-oe-linux-gcc --sysroot=/data/oe/build/tmp-eglibc/sysroots/genericarmv8 -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC -c -o io_queue_init.ol io_queue_init.c
| In file included from io_queue_init.c:19:0:
| ./libaio.h:111:2: error: #error endian?
| ./libaio.h:115:2: error: expected specifier-qualifier-list before 'PADDED'
| ./libaio.h:124:2: error: expected specifier-qualifier-list before 'PADDEDptr'
| ./libaio.h:139:2: error: expected specifier-qualifier-list before 'PADDEDptr'
| ./libaio.h:155:2: error: expected specifier-qualifier-list before 'PADDEDptr'
| ./libaio.h: In function 'io_set_callback':
| ./libaio.h:184:6: error: 'struct iocb' has no member named 'data'
| ./libaio.h: In function 'io_prep_pread':
...

Porting is needed.

Libaio is needed by qemu(kvm), mysql and some other tools.

Revision history for this message
Riku Voipio (riku-voipio) wrote :

For reference, the patch adding 32-bit ARM support:

http://git.fedorahosted.org/cgit/libaio.git/commit/?id=f997fa1a2f8d2673139b8e6317d27a435075df39

Seems like a short task, and there is a harness test suite, as well as test cases in ltp.
It seems, that for many of the tools (qemu, ltp at least) libaio is optional. So low priority for now.

Changed in linaro-aarch64:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Looks like I have something - at least it compiled. Have to run tests in model.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :
Download full text (10.7 KiB)

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/libaio/files/libaio-0.3.109-generic-arch.patch?revision=1.1 + this patch made libaio built for AArch64.

But "make check" fails:

rm -f testdir/rwfile
echo "test" >testdir/rwfile
chmod 600 testdir/rwfile
rm -f testdir/wofile
echo "test" >testdir/wofile
chmod 200 testdir/wofile
./runtests.sh cases/2.p cases/3.p cases/4.p cases/5.p cases/6.p cases/7.p cases/11.p cases/12.p cases/13.p cases/14.p cases/15.p cases/16.p
Test run starting at Mon Jan 7 09:16:56 UTC 2013
Starting cases/2.p
expect -14: io_setup(-1000, 0xffffffff81000000) = -14 [Bad address]
expect -14: io_setup( 1000, 0xffffffff81000000) = -14 [Bad address]
expect -14: io_setup( 0, 0xffffffff81000000) = -14 [Bad address]
expect -22: io_setup(-1000, 0x7ffc28a060) = -22 [Invalid argument]
expect -22: io_setup( -1, 0x7ffc28a060) = -22 [Invalid argument]
expect -22: io_setup( 0, 0x7ffc28a060) = -22 [Invalid argument]
expect 0: io_setup( 1, 0x7ffc28a060) = 0 [Success]
expect -22: io_setup( 1, 0x7ffc28a060) = -22 [Invalid argument]
test cases/2.t completed PASSED.
Completed cases/2.p with 0.
Starting cases/3.p
expect -22: io_submit(0xffffffffffffffff, 1, 0x7fe614ace0) = -22 [Invalid argument]
expect 0: io_submit(0x7fb448f000, 0, 0x7fe614ace0) = 0 [Success]
expect -14: io_submit(0x7fb448f000, 1, (nil)) = -14 [Bad address]
expect -14: io_submit(0x7fb448f000, 1, 0xffffffffffffffff) = -14 [Bad address]
expect -14: io_submit(0x7fb448f000, 2, 0x7fe614acf0) = -14 [Bad address]
expect -14: io_submit(0x7fb448f000, 2, 0x7fe614ad00) = -14 [Bad address]
expect -22: io_submit(0x7fb448f000, -1, 0x7fe614ace0) = -22 [Invalid argument]
test cases/3.t completed PASSED.
Completed cases/3.p with 0.
Starting cases/4.p
expect -9: (w), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
expect -9: (r), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
expect 512: (w), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
expect 512: (r), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
expect -22: (r), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument]
expect -22: (w), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument]
expect 0: (r), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
expect 4: (w), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
expect 4: (w), res = sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
expect 8: (r), res = 4.p: cases/4.t:60: test_main: Assertion `memcmp(buf, "12345678", 8) == 0' failed.
sync_submit: io_submit res=-22 [Invalid argument]
-22 [Invalid argument] -- FAILED
read after append: []
Completed cases/4.p with 134 -- FAILED.
Starting cases/5.p
expect 512: (w), res = sync_submit: io_submit res=-22 [Invalid argument]
  -22 [Invalid argument] -- FAILED
expect 512: (r), res = sync_submit: io_submit res=-22 [Invalid argument]
  -22 [Invalid argument] -- FA...

Revision history for this message
Riku Voipio (riku-voipio) wrote :

Here's update to Marcin's patch that actually works with the testsuite.

Libaio upstream appears to be quite idle, many port patches floating around. Upstream git seems to be:

http://git.fedorahosted.org/cgit/libaio.git/

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
status: New → In Progress
Fathi Boudra (fboudra)
Changed in linaro-oe:
status: In Progress → Fix Committed
milestone: none → 13.02
assignee: nobody → Riku Voipio (riku-voipio)
Fathi Boudra (fboudra)
Changed in linaro-oe:
status: Fix Committed → Fix Released
Changed in linaro-aarch64:
status: Triaged → Fix Committed
Revision history for this message
Riku Voipio (riku-voipio) wrote :

Fix released in libaio 0.3.110

Changed in linaro-aarch64:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.