New issue
Advanced search Search tips

Issue 672369 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 668692
Owner:
Closed: Dec 2016
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

The fd never close.

Reported by a32824...@gmail.com, Dec 8 2016

Issue description


From "Settings > About Chrome"
Application version:53.0.2785.97
Operating system:Android

URLs (if applicable):

Steps to reproduce:
(1)open a new tab
(2)close the new tab
(3)open a new tab.
(4)close the new tab.
(5)loop it.

And then you will see some fd will never close, if you open and close tab again and again in several times, it will be crash .the logcat has some log like this:

"12-07 13:15:18.150: E/chromium(32515): [ERROR:socket_posix.cc(82)] CreatePlatformSocket() returned an error, errno=24: Too many open files
12-07 13:15:18.170: E/Surface(32515): queueBuffer: error queuing buffer to SurfaceTexture, -22"

I think the fd from epoll forget to close but I can't find some code which not close it,you can use this command to show the process hold the fd information.

#lsof| grep pid

 
The Chrome 54 has the same problem.
We may found the root cause:
in ThreadedInputConnectionFactory.java file.

the HandlerThread can't quit because the Looper is not call quit().

Must call it in ImeAdapter.detach() like

Handler handler = mInputConnectionFactory.getHandler();
        if (handler != null) {
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    Looper looper = mInputConnectionFactory.getHandler().getLooper();
                    looper.quitSafely();
                }
            }, 500);
        }
If any commiter see this content, I hope you will fix it :)
Owner: changwan@chromium.org
Now we only create single thread from m55. Btw, what is the relationship betweeb fd and thread here?
Mergedinto: 668692
Status: Duplicate (was: Unconfirmed)
Please feel free to reopen if you can repro this issue on M55 or Chrome beta/dev/canary.

Sign in to add a comment