Coder Social home page Coder Social logo

Comments (15)

Radresingen avatar Radresingen commented on July 30, 2024 1

First i just checked the code base and how to use it after that i ran the examples you provided. I havent checked that the tests are stopping and execution ends. Under the examples directory with async_simple.cpp source i can reproduce the problem. When desctructor called it's never ending.

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

Hi @Radresingen what version of libuv are you using?

from liblifthttp.

Radresingen avatar Radresingen commented on July 30, 2024

I have tried different versions i observed the same behaviour. Right now i am using version 1.48.0

from liblifthttp.

Radresingen avatar Radresingen commented on July 30, 2024

Hi @jbaldwin is there any idea or plan to fix this.

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

I probably will have some time this weekend to look at it more in depth, but do you have a test case that would reproduce this?

This code most likely would trigger if there is something still alive in the uv loop that hasn't closed, the loop above on line 138 should in theory guarantee that the loop is empty, but something is still lingering. Given a test case that you have triggering this would make it a lot easier to step through and see whats going on.

Its been a while since I've worked on this and was pretty stable the last time I really used it -- so its also possible libuv has had some changes that need to be accounted for.

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

Gotcha, most likely a libuv change that is causing it, but that narrows down where to start, thanks.

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

I'm not able to reproduce on the following configuration so I'm going to try building a custom libuv 1.48 and see if it reproduces.

ubuntu
Release:	22.04

Package: libuv1-dev
Version: 1.43.0-1ubuntu0.1

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

I've replicated with libuv 1.48.

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

Ok I've determined the libuv change, they no longer seem to allow you to close uv_handle_t objects off the loop thread, if you do the loop threads internal counters still say they are active so it never quits.

I introduced a new async channel to send a shutdown signal to the loop thread and now it will properly close all its uv_handle_t objects so it knows it can properly shutdown.

I've attached a PR if you'd like to take a look @Radresingen

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

Sadly this isn't backwards compatible and breaks it on older versions of libuv :(

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

I've managed to half port it backwards... it is working on ubuntu but not fedora 🤔

edit: ./gif its working??

from liblifthttp.

jbaldwin avatar jbaldwin commented on July 30, 2024

@Radresingen can you checkout the branch and verify it is working for you please?

from liblifthttp.

Radresingen avatar Radresingen commented on July 30, 2024

@jbaldwin i will try it and get back to you asap thanks.

from liblifthttp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.