-24 即 EMFILE,屬於進程內文件描述符耗盡的問題 Solution: ??? 須要找出究竟是哪些文件沒有關閉(查看方式: adb shell, cd /proc/pid/fd , ls -l),以及爲何沒關閉. 發現不少/dev/ashmem file handle,而後去/proc/pid/maps去看這些/dev/ashmem的名字,能夠發現些蛛絲馬跡。 重現辦法:在Browser裏不斷用新增tab的方式來打開新的含有不少圖片的網站。java
E CursorWindow: Could not allocate CursorWindow '/data/data/com.android.browser/databases/browser2.db' of size 2097152 due to error -24.android
E AndroidRuntime: FATAL EXCEPTION: AsyncTask #5sql
E AndroidRuntime: java.lang.RuntimeException: An error occured while executing doInBackground()shell
E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:299)ide
E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)網站
E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:219)this
E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:239)sqlite
E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)進程
E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)圖片
E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
E AndroidRuntime: at java.lang.Thread.run(Thread.java:838)
E AndroidRuntime: Caused by: android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=1 (# cursors opened by this proc=1)
E AndroidRuntime: at android.database.CursorWindow.<init>(CursorWindow.java:104)
E AndroidRuntime: at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
E AndroidRuntime: at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:154)
E AndroidRuntime: at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:148)
E AndroidRuntime: at com.android.browser.provider.BrowserProvider2.shouldUpdateImages(BrowserProvider2.java:2064)
E AndroidRuntime: at com.android.browser.provider.BrowserProvider2.updateInTransaction(BrowserProvider2.java:1965)
E AndroidRuntime: at com.android.browser.provider.SQLiteContentProvider.update(SQLiteContentProvider.java:157)
E AndroidRuntime: at android.content.ContentProvider$Transport.update(ContentProvider.java:235)
E AndroidRuntime: at android.content.ContentResolver.update(ContentResolver.java:1016)
E AndroidRuntime: at com.android.browser.Controller$18.doInBackground(Controller.java:2764)
E AndroidRuntime: at com.android.browser.Controller$18.doInBackground(Controller.java:2740)
E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:287)
E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:234)
E AndroidRuntime: ... 4 more