snowball: 0xbench native test fails to run to completion

Reported by Abhishek Paliwal on 2012-01-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
High
Tony Mansson

Bug Description

Description:
==========
On https://android-build.linaro.org/builds/~linaro-android/landing-snowball/#build=135
"native" tests in 0xbenchmark hangs in between while running and does not run to completion.
Hangs after starting operation "c_flock_10"

Logs:
====

I/NativeTester( 2284): ------------------------ process cascade_flock -E -C 70 -L -S -W -N c_flock_10 -P 10 -I 50000 start ------------------------
I/NativeTester( 2284): server socket created
I/NativeTester( 2284): command executed
I/NativeTester( 2284): waiting conncetion with timeout 40000
I/NativeTester( 2284): connection accepted
I/NativeTester( 2284): stream created
D/dalvikvm( 2284): GC_CONCURRENT freed 443K, 8% free 7538K/8135K, paused 3ms+3ms
E/NativeTester( 2284): Native process idle for over 40 Seconds, killing.

root@android:/ #
root@android:/ # F/BatteryStatsImpl( 1538): problem reading network stats
F/BatteryStatsImpl( 1538): java.lang.IllegalStateException: problem parsing idx 1
F/BatteryStatsImpl( 1538): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
F/BatteryStatsImpl( 1538): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:250)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.getNetworkStatsDetailGroupedByUid(BatteryStatsImpl.java:5734)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.access$100(BatteryStatsImpl.java:76)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl$Uid.computeCurrentTcpBytesReceived(BatteryStatsImpl.java:2457)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl$Uid.getTcpBytesReceived(BatteryStatsImpl.java:2446)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.writeSummaryToParcel(BatteryStatsImpl.java:5437)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.writeLocked(BatteryStatsImpl.java:4836)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.writeAsyncLocked(BatteryStatsImpl.java:4818)
F/BatteryStatsImpl( 1538): at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1649)
F/BatteryStatsImpl( 1538): at com.android.server.am.ActivityManagerService$3.run(ActivityManagerService.java:1531)
F/BatteryStatsImpl( 1538): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
F/BatteryStatsImpl( 1538): at libcore.io.IoBridge.open(IoBridge.java:406)
F/BatteryStatsImpl( 1538): at java.io.FileInputStream.<init>(FileInputStream.java:78)
F/BatteryStatsImpl( 1538): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
F/BatteryStatsImpl( 1538): ... 10 more
F/BatteryStatsImpl( 1538): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
F/BatteryStatsImpl( 1538): at libcore.io.Posix.open(Native Method)
F/BatteryStatsImpl( 1538): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
F/BatteryStatsImpl( 1538): at libcore.io.IoBridge.open(IoBridge.java:390)
F/BatteryStatsImpl( 1538): ... 12 more
D/dalvikvm( 1538): GC_CONCURRENT freed 388K, 13% free 8533K/9735K, paused 2ms+4ms
F/BatteryStatsImpl( 1538): problem reading network stats
F/BatteryStatsImpl( 1538): java.lang.IllegalStateException: problem parsing idx 1
F/BatteryStatsImpl( 1538): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
F/BatteryStatsImpl( 1538): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:250)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.getNetworkStatsDetailGroupedByUid(BatteryStatsImpl.java:5734)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.access$100(BatteryStatsImpl.java:76)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl$Uid.computeCurrentTcpBytesReceived(BatteryStatsImpl.java:2457)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl$Uid.getTcpBytesReceived(BatteryStatsImpl.java:2446)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.writeSummaryToParcel(BatteryStatsImpl.java:5437)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.writeLocked(BatteryStatsImpl.java:4836)
F/BatteryStatsImpl( 1538): at com.android.internal.os.BatteryStatsImpl.writeAsyncLocked(BatteryStatsImpl.java:4818)
F/BatteryStatsImpl( 1538): at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1649)
F/BatteryStatsImpl( 1538): at com.android.server.am.ActivityManagerService$3.run(ActivityManagerService.java:1531)
F/BatteryStatsImpl( 1538): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
F/BatteryStatsImpl( 1538): at libcore.io.IoBridge.open(IoBridge.java:406)
F/BatteryStatsImpl( 1538): at java.io.FileInputStream.<init>(FileInputStream.java:78)
F/BatteryStatsImpl( 1538): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
F/BatteryStatsImpl( 1538): ... 10 more
F/BatteryStatsImpl( 1538): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
F/BatteryStatsImpl( 1538): at libcore.io.Posix.open(Native Method)
F/BatteryStatsImpl( 1538): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
F/BatteryStatsImpl( 1538): at libcore.io.IoBridge.open(IoBridge.java:390)
F/BatteryStatsImpl( 1538): ... 12 more

Reproducible:
===========
Yes, 2/2

Steps:
==========
1. Bootup device
2. Start 0xbench app
3. Select Native test -> Run
Observation: benchmark test hangs in middle and does not run to completion.

Hardware:
==========
Snowball: V11
HDMI Out to TV - via HDMI cable
USB-Serial Logging

Software:
==========
https://android-build.linaro.org/builds/~linaro-android/landing-snowball/#build=135

Changed in linaro-android:
importance: Undecided → Medium
Zach Pfeffer (pfefferz) on 2012-01-30
Changed in linaro-android:
importance: Medium → High
milestone: none → 12.02
assignee: nobody → Tony Mansson (tony-mansson)
Tony Mansson (tony-mansson) wrote :

This bug can be repeated with other operations then "c_flock_10" too. It happens when the P parameter is used and P>2 resulting in fork() calls and multiple processes being used.

In this case the barrier function will not work. the process will never return from this call:

(void) barrier_queue(lm_barrier, &r);

on line 560 of libmicro.c

The barrier implementation contains a (C) notice from Sun Microsystems 2007, and it's unclear if it is completely compatible with Android pthreads.

A simple solution would be to remove "-P 2" option from the four benchmark operations that uses it and replace it with "-T 2". This way the benchmark will still be utilizing multiple CPUs but avoid the problem of synchronizing threads in separate processes in an Android environment.

Changed in linaro-android:
status: New → Fix Committed
Zach Pfeffer (pfefferz) on 2012-02-22
Changed in linaro-android:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers