Giter Site home page Giter Site logo

Comments (4)

hyper0x avatar hyper0x commented on July 17, 2024

Hi, maybe you could describe in detail.

from goc2p.

lzl1024 avatar lzl1024 commented on July 17, 2024

scheduler.go line 102 has to be put to the end of the start function, because scheduler actually has not been fully started yet at that time. Downloader, analyzer are all not initialized.

However, monitor is waiting for this stat change and will query those components afterwards. So there will be a risk condition when those initializing components are queried by the monitor.

from goc2p.

hyper0x avatar hyper0x commented on July 17, 2024

OK, sometimes there will be a problem, although it seems had little effect. What do you do to improve it? Welcome to send PR. :-)

In fact, it's to prevent repeated start.

from goc2p.

SwanSpouse avatar SwanSpouse commented on July 17, 2024

@lzl1024 You are right.
@hyper0x
E.g. :

  1. When the monitor is waiting for state change of scheduler at monitor.go line 193
  2. Then go to line 102 in scheduler.go the state of scheduler change to be running.
  3. After that Function "waitForSchedulerStart" returns, and it runs to line 201 in monitor.go. But at that time, the ErrorChan is not initialized. So it occurs a nil pointer panic.

from goc2p.

Related Issues (12)

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.