Giter Site home page Giter Site logo

Comments (7)

tkellogg avatar tkellogg commented on July 22, 2024

I'll see if I can reproduce this in a test.

I'm not sure how it would go into deadlock like this. The algorithm is:

  1. start up, write own PID to config.json
  2. start loop, check if PID in config.json is same as own PID. If not, exit loop and fail process.
  3. do work, go to 2.

If a process dies unexpectedly, the new process will overwrite & take control. dura kill overwrites the PID with None/null so it effectively stops all processes.

The behavior you're describing seems to be that dura kill is running on repeat.

Are you running on Docker or an overlay filesystem? Ive seen strange behavior like this on Docker (overwrites not being recognized/consistent).

from dura.

jazzdan avatar jazzdan commented on July 22, 2024

@tkellogg ah sorry, I should have included the environment. I'm running dura on macOS 12.0.1 arm64.

I tried git pull'ing my dura repo and re-installing. Now when I run dura serve or dura kill both hang with no output. Interesting!

from dura.

tkellogg avatar tkellogg commented on July 22, 2024

can you check the logs in ~/.config/dura/logs/

also i wouldn't mind seeing a ls -lathr ~/.config/dura/ and also the config file.

from dura.

tkellogg avatar tkellogg commented on July 22, 2024

I just tracked down the issue. I'll push out a fix as soon as I can. The problem is that the json file gets corrupted when overwriting with a shorter file. i.e. "overwrite" isn't what I normally think of as overwrite since it doesn't reduce the length of the file.

In your case, i think you might have restarted your laptop, which caused the PID count to reset to a shorter number, shortening the length of the file.

from dura.

tkellogg avatar tkellogg commented on July 22, 2024

Thanks for submitting this one. I don't know how I got so far without seeing it.

from dura.

jazzdan avatar jazzdan commented on July 22, 2024

Ahh good catch @tkellogg !! Thanks for the fix and for making dura :)

from dura.

jazzdan avatar jazzdan commented on July 22, 2024

@tkellogg you're theory was right by the way, here's what my config.json looks like:

{"pid":57878,"repos":{}}sers/dan/devel/backend":{}}}}%      

from dura.

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.