UV_EBADF error while running IO via libcurl.

27 views
Skip to first unread message

Cathy Avery

unread,
Aug 29, 2019, 1:56:33 PM8/29/19
to libuv

Hi,

I've been getting the UV_EBADF error when running IO through http ( libcurl ) to an Azure blob page. I'm using libuv-1.29.1-1.fc28.x86_64.  I've tracked it down to where it originated but now I am stuck. Any suggestions on how to proceed would be appreciated.

Thanks,

Cathy

static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int
events) { uv_poll_t* handle;

    int pevents;
    
    handle = container_of(w, uv_poll_t, io_watcher);
    
    /*
    
     * As documented in the kernel source fs/kernfs/file.c #780
     * poll will return POLLERR|POLLPRI in case of sysfs
     * polling. This does not happen in case of out-of-band
     * TCP messages.
     *
     * The above is the case on (at least) FreeBSD and Linux.
     *
     * So to properly determine a POLLPRI or a POLLERR we need
     * to check for both.
     */
    
    if ((events & POLLERR) && !(events & UV__POLLPRI)) {
    
      uv__io_stop(loop, w, POLLIN | POLLOUT | UV__POLLRDHUP |
      UV__POLLPRI);
      uv__handle_stop(handle);
      handle->poll_cb(handle, UV_EBADF, 0);    <------ Here 
      return;
    
    }

Cathy Avery

unread,
Aug 30, 2019, 1:45:48 PM8/30/19
to libuv
Ok it looks as it the cause of the POLLERR is a tcp RST.
Reply all
Reply to author
Forward
0 new messages