Code Monkey home page Code Monkey logo

Comments (4)

carrotIndustries avatar carrotIndustries commented on July 21, 2024

Looks very much like an issue related to walking the pool directories.
Can you run it in gdb and provide backtrace at some random point when it gets stuck?

from horizon.

rnestler avatar rnestler commented on July 21, 2024

This was after ~30s and about 800MB RAM usage.

#0  0x0000000000415622 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::lexer::scan() (this=0x7fffffffb320) at ./json.hpp:7967
#1  0x0000000000411922 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::parser::get_token() (this=0x7fffffffb2f0) at ./json.hpp:9232
#2  0x000000000040ed97 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::parser::parse() (this=0x7fffffffb2f0) at ./json.hpp:9022
#3  0x000000000040e40a in nlohmann::operator>>(std::istream&, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>&) (i=..., j=...) at ./json.hpp:6139
#4  0x0000000000437b4a in horizon::Part::new_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, horizon::Pool&) (filename="/home/roughl/proggen/projects/horizon-pool/parts/", pool=...) at pool/part.cpp:107
#5  0x00000000004d5948 in horizon::Pool::get_part(horizon::UUID const&) (this=0x7fffffffd4e0, uu=...)
    at pool/pool.cpp:78
#6  0x0000000000436b2d in horizon::Part::Part(horizon::UUID const&, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator> const&, horizon::Pool&) (this=0x7fffffffc2e0, uu=..., j=..., pool=...)
    at pool/part.cpp:14
#7  0x0000000000437bb3 in horizon::Part::new_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, horizon::Pool&) (filename="/home/roughl/proggen/projects/horizon-pool/parts/passive/resistors/cpl/CPL-RES-0603-3.6K-0.1W.json", pool=...) at pool/part.cpp:109
#8  0x00000000004edd13 in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts/passive/resistors/cpl", prefix="passive/resistors/cpl") at pool-update/pool-update.cpp:199
#9  0x00000000004edfce in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts/passive/resistors", prefix="passive/resistors") at pool-update/pool-update.cpp:218
#10 0x00000000004edfce in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts/passive", prefix="passive") at pool-update/pool-update.cpp:218
#11 0x00000000004edfce in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts", prefix="") at pool-update/pool-update.cpp:218
#12 0x00000000004eeb81 in main(int, char**) (c_argc=1, c_argv=0x7fffffffdb38)
    at pool-update/pool-update.cpp:274

Then again after some minutes and ~6GB RAM usage:

#0  0x0000000000419c8c in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::lexer::fill_line_buffer() (this=0x7fffffffb320) at ./json.hpp:8628
#1  0x0000000000415617 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::lexer::scan() (this=0x7fffffffb320) at ./json.hpp:7965
#2  0x0000000000411922 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::parser::get_token() (this=0x7fffffffb2f0) at ./json.hpp:9232
#3  0x000000000040ed97 in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::parser::parse() (this=0x7fffffffb2f0) at ./json.hpp:9022
#4  0x000000000040e40a in nlohmann::operator>>(std::istream&, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>&) (i=..., j=...) at ./json.hpp:6139
#5  0x0000000000437b4a in horizon::Part::new_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, horizon::Pool&) (filename="/home/roughl/proggen/projects/horizon-pool/parts/", pool=...) at pool/part.cpp:107
#6  0x00000000004d5948 in horizon::Pool::get_part(horizon::UUID const&) (this=0x7fffffffd4e0, uu=...) at pool/pool.cpp:78
#7  0x0000000000436b2d in horizon::Part::Part(horizon::UUID const&, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator> const&, horizon::Pool&) (this=0x7fffffffc2e0, uu=..., j=..., pool=...) at pool/part.cpp:14
#8  0x0000000000437bb3 in horizon::Part::new_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, horizon::Pool&) (filename="/home/roughl/proggen/projects/horizon-pool/parts/passive/resistors/cpl/CPL-RES-0603-3.6K-0.1W.json", pool=...) at pool/part.cpp:109
#9  0x00000000004edd13 in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts/passive/resistors/cpl", prefix="passive/resistors/cpl") at pool-update/pool-update.cpp:199
#10 0x00000000004edfce in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts/passive/resistors", prefix="passive/resistors")
    at pool-update/pool-update.cpp:218
#11 0x00000000004edfce in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts/passive", prefix="passive")
    at pool-update/pool-update.cpp:218
#12 0x00000000004edfce in update_parts(SQLite::Database&, horizon::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (db=..., pool=..., directory="/home/roughl/proggen/projects/horizon-pool/parts", prefix="") at pool-update/pool-update.cpp:218
#13 0x00000000004eeb81 in main(int, char**) (c_argc=1, c_argv=0x7fffffffdb38) at pool-update/pool-update.cpp:274

from horizon.

carrotIndustries avatar carrotIndustries commented on July 21, 2024

Oh, I see

/home/roughl/proggen/projects/horizon-pool/parts/

Try the latest commit: 3b19979 At least, it should blow up with an exception.

Looks like I really need to rethink how the parts get updated.

from horizon.

carrotIndustries avatar carrotIndustries commented on July 21, 2024

Closing due to old age, probably fixed by now.

from horizon.

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.