Giter VIP home page Giter VIP logo

filemango's People

Contributors

holozene avatar johnnydouble avatar prologic avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

prologic

filemango's Issues

Empty file queue causes index out of range error.

If the file queue is empty, calling managePool() will produce the following error.

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
FileMango/src/scheduler.managePool()
        /home/melkor/go/src/FileMango/src/scheduler/worker_pool.go:52 +0x2a5

On second run db.Fold function causes a segmentation violation

works fine on first run, after a second run without deleting the 000000000.data file gives this error:

loading config... done
loading database... done
watching...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x51c102]

goroutine 1 [running]:
github.com/prologic/bitcask.(*Bitcask).Fold(0x0, 0x617938, 0xc000000180, 0x5a85f5)
        /home/melkor/go/pkg/mod/github.com/prologic/[email protected]/bitcask.go:304 +0x62
FileMango/src/db.FoldQueue(...)
        /home/melkor/go/src/FileMango/src/db/database.go:19
FileMango/src/scheduler.addInitialJobs()
        /home/melkor/go/src/FileMango/src/scheduler/worker_pool.go:147 +0x39
FileMango/src/scheduler.RunAnalysis()
        /home/melkor/go/src/FileMango/src/scheduler/worker_pool.go:28 +0x3a
main.run()
        /home/melkor/go/src/FileMango/main.go:37 +0x356
main.main()
        /home/melkor/go/src/FileMango/main.go:17 +0x25

Process finished with exit code 2

if the 000000000.data file is deleted works fine again.

Worker pool

Write a worker pattern using goroutines to dynamically pool providers.

Corrupted file queue leading to null pointer dereference

Something is breaking the file queue by not properly writing new lines to it in some cases.
This leads to invalid file paths in the file queue.
It eventually leads to to a null pointer defeference in worker_pool.go and the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x595d6a]

goroutine 1 [running]:
os.(*File).Name(...)
        /usr/lib/go/src/os/file.go:54
FileMango/src/scheduler.(*fileQueue).addNewJobs(0x741ec0, 0xc00011a180)
        /home/melkor/go/src/FileMango/src/scheduler/worker_pool.go:124

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.