<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>116587</bug_id>
          
          <creation_ts>2013-05-21 19:08:16 -0700</creation_ts>
          <short_desc>[EFL] Layout Test Error related to &quot;_ecore_main_fd_handlers_bads_rem() No bad fd found. Maybe a foreign fd from glib?&quot;</short_desc>
          <delta_ts>2017-03-11 10:32:47 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit EFL</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>135831</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gyuyoung Kim">gyuyoung.kim</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>g.czajkowski</cc>
    
    <cc>lucas.de.marchi</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>ossy</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>seokju</cc>
    
    <cc>sergio</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>892086</commentid>
    <comment_count>0</comment_count>
    <who name="Gyuyoung Kim">gyuyoung.kim</who>
    <bug_when>2013-05-21 19:08:16 -0700</bug_when>
    <thetext>EFL Buildbot prints lots of error logs on some test cases. It looks this error looks like EFL specific problem.

13:43:41.353 16645 worker/0 http/tests/websocket/tests/hybi/close-on-navigate-new-location.html output stderr lines:
13:43:41.369 16645   ERR&lt;23756&gt;:ecore ecore_main.c:1531 _ecore_main_fd_handlers_bads_rem() Removing bad fds
13:43:41.369 16645   ERR&lt;23756&gt;:ecore ecore_main.c:1573 _ecore_main_fd_handlers_bads_rem() No bad fd found. Maybe a foreign fd from glib?
13:43:41.369 16645   ERR&lt;23756&gt;:ecore ecore_main.c:1531 _ecore_main_fd_handlers_bads_rem() Removing bad fds
13:43:41.369 16645   ERR&lt;23756&gt;:ecore ecore_main.c:1573 _ecore_main_fd_handlers_bads_rem() No bad fd found. Maybe a foreign fd from glib?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>892180</commentid>
    <comment_count>1</comment_count>
    <who name="Grzegorz Czajkowski">g.czajkowski</who>
    <bug_when>2013-05-22 02:08:20 -0700</bug_when>
    <thetext>This error message is being printed while typing to the input fields. It can be reproduced in MiniBrowser and EWebLauncher as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>892183</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2013-05-22 02:09:47 -0700</bug_when>
    <thetext>Yes, they have been there for a while, I have noticed them as well. It would be good to fix them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>923627</commentid>
    <comment_count>3</comment_count>
    <who name="Seokju Kwon">seokju</who>
    <bug_when>2013-09-02 02:10:30 -0700</bug_when>
    <thetext>Also on remote web inspector :-(
Is there any plan to fix it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>923637</commentid>
    <comment_count>4</comment_count>
    <who name="Gyuyoung Kim">gyuyoung.kim</who>
    <bug_when>2013-09-02 02:45:26 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Also on remote web inspector :-(
&gt; Is there any plan to fix it?

This bug isn&apos;t my top priority now. So, If there is volunteer, I&apos;m willing to give up this bug. :) Do you want to fix this bug ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1028424</commentid>
    <comment_count>5</comment_count>
    <who name="Ryuan Choi">ryuan.choi</who>
    <bug_when>2014-08-11 22:34:13 -0700</bug_when>
    <thetext>I traced the bad fd and it looks because g_main_context_query returns bad fd which is already closed.

I reproduced it as clicking &quot;reload&quot; button frequently on the MiniBrowser (which loads google.com)

And when select (in ecore_glib.c) is failed, one of fd which returns g_main_context_query got EBADF.

In strace, I got below log. (42 is bad fd in below log)

[pid 25226] socket(PF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP &lt;unfinished ...&gt;
[pid 25227] select(33, [30 32], NULL, NULL, NULL &lt;unfinished ...&gt;
[pid 25226] &lt;... socket resumed&gt; )      = 42
[pid 25217] read(18,  &lt;unfinished ...&gt;
[pid 25226] fcntl(42, F_GETFL &lt;unfinished ...&gt;
[pid 25217] &lt;... read resumed&gt; &quot;\1\0\0\0&quot;, 4) = 4
[pid 25226] &lt;... fcntl resumed&gt; )       = 0x2 (flags O_RDWR)
[pid 25217] read(18,  &lt;unfinished ...&gt;
[pid 25226] fcntl(42, F_SETFL, O_RDWR|O_NONBLOCK &lt;unfinished ...&gt;
[pid 25217] &lt;... read resumed&gt; &quot;W&quot;, 1)  = 1
[pid 25226] &lt;... fcntl resumed&gt; )       = 0
[pid 25217] read(18, 0xa863d8, 4)       = -1 EAGAIN (Resource temporarily unavailable)
[pid 25226] connect(42, {sa_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr(&quot;168.219.61.252&quot;)}, 16 &lt;unfinished ...&gt;
[pid 25217] fcntl(3, F_GETFD)           = 0x1 (flags FD_CLOEXEC)
[pid 25226] &lt;... connect resumed&gt; )     = -1 EINPROGRESS (Operation now in progress)

...

[pid 25217] select(32, [3 31], [], [], {0, 0} &lt;unfinished ...&gt;
[pid 25226] &lt;... write resumed&gt; )       = 8
[pid 25217] &lt;... select resumed&gt; )      = 0 (Timeout)
[pid 25217] recvfrom(12, 0xab34e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 25226] close(42 &lt;unfinished ...&gt;

...

[pid 25227] &lt;... recvmsg resumed&gt; 0x7f668f139b60, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 25226] select(44, [3 24 42 43], [], [], {0, 0} &lt;unfinished ...&gt;
[pid 25227] select(33, [30 32], NULL, NULL, NULL &lt;unfinished ...&gt;
[pid 25226] &lt;... select resumed&gt; )      = -1 EBADF (Bad file descriptor)
[pid 25217] fcntl(3, F_GETFD &lt;unfinished ...&gt;
[pid 25226] write(2, &quot;_ecore_glib_select__locked **\n&quot;, 30_ecore_glib_select__locked **
 &lt;unfinished ...&gt;
[pid 25217] &lt;... fcntl resumed&gt; )       = 0x1 (flags FD_CLOEXEC)
[pid 25226] &lt;... write resumed&gt; )       = 30
[pid 25217] poll([{fd=12, events=POLLIN|POLLOUT}], 1, 4294967295 &lt;unfinished ...&gt;
[pid 25226] fcntl(24, F_GETFD &lt;unfinished ...&gt;
[pid 25217] &lt;... poll resumed&gt; )        = 1 ([{fd=12, revents=POLLOUT}])
[pid 25226] &lt;... fcntl resumed&gt; )       = 0x1 (flags FD_CLOEXEC)
[pid 25217] writev(12, [{&quot;\22\0\16\0\3\0@\4&apos;\0\0\0\24\1\0\0\10\0\0\0\36\0\0\0Google (&quot;..., 336}, {NULL, 0}, {&quot;&quot;, 0}], 3 &lt;unfinished ...&gt;
[pid 25226] fcntl(42, F_GETFD &lt;unfinished ...&gt;
[pid 25217] &lt;... writev resumed&gt; )      = 336
[pid 25226] &lt;... fcntl resumed&gt; )       = -1 EBADF (Bad file descriptor)
[pid 25217] recvfrom(12,  &lt;unfinished ...&gt;
[pid 25226] write(2, &quot;_ecore_glib_context_trace : 42 #&quot;..., 37_ecore_glib_context_trace : 42 #### 
 &lt;unfinished ...&gt;
[pid 25217] &lt;... recvfrom resumed&gt; &quot;\34\0\36\6\3\0@\4&apos;\0\0\0\207;\322\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&quot;..., 4096, 0, NULL, NULL) = 192
[pid 25226] &lt;... write resumed&gt; )       = 37
[pid 25217] recvfrom(12,  &lt;unfinished ...&gt;
[pid 25226] fcntl(43, F_GETFD &lt;unfinished ...&gt;
[pid 25217] &lt;... recvfrom resumed&gt; 0xab34e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 25226] &lt;... fcntl resumed&gt; )       = 0x1 (flags FD_CLOEXEC)

I don&apos;t know why glib returns this fd, but glib(g_main_context_iterate) looks not check the results of poller.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045709</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-11-03 04:31:30 -0800</bug_when>
    <thetext>Is there any plan to fix this old bug on EFL side?

It seems something is broken near the websocket implementation,
which caused the test flakiness, and I assume the non-working
inspector server is related to this bug too - https://bugs.webkit.org/show_bug.cgi?id=125073</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1286192</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-03-11 10:32:47 -0800</bug_when>
    <thetext>Closing this bug because the EFL port has been removed from trunk.

If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>