GithubHelp home page GithubHelp logo

Comments (17)

brandon-kohn avatar brandon-kohn commented on May 13, 2024 1

Ok, I'll try develop.

from rpmalloc.

brandon-kohn avatar brandon-kohn commented on May 13, 2024

If it helps, you can get my full test by building the following:

https://github.com/brandon-kohn/simulation_toolkit/tree/feature/rpmalloc

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

Are you using the malloc/free and new/delete wrappers? If so, that could be the issue, try only building the core lib with only rpmalloc.c

You can also try the latest develop branch to see if the problem persists. I noticed a couple of issues in the 1.2.2 release that I've fixed, and I'm preparing a new 1.3.0 release but it's still a couple of days away.

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

But the usage seems ok, the important part is the rpmalloc_initialize/rpmalloc_finalize completely encompassing the use of the library, and that each thread has rpmalloc_thread_initialize/rpmalloc_thread_finalize on entry/exit.

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

Also, if you could post a callstack of an access violation that would be helpful

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

Actually, if you could try the release/1.3.0 branch it would be really helpful

from rpmalloc.

brandon-kohn avatar brandon-kohn commented on May 13, 2024

It happens in that branch. I'm trying to get a stack, but it only happens in my optimized build. It's a structured exception caused by an integer being divided by zero if that helps. The exception is thrown from rpmalloc. I only compile rpmalloc.c in my version of the lib.

from rpmalloc.

brandon-kohn avatar brandon-kohn commented on May 13, 2024

Another note is that if I put a sleep between the thread pool initialization (thus the calls of rpmalloc_thread_initialize) and the first call to rpmalloc, the issue doesn't seem to happen. This might suggest a data race between the thread initialization and something under the rpmalloc call.

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

Thanks, I will try to replicate the issue using your repo

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

Can't seem to get boost, cmake and your repo to play nice on my system (I never use neither boost nor cmake normally). It fails to find boost in the libcds cmake step. Also, is googletest supposed to build using mingw/gcc?

from rpmalloc.

brandon-kohn avatar brandon-kohn commented on May 13, 2024

If you're using the sudo command to build it.. be sure to use the -E switch to bring the BOOST_ROOT environment over. That got me a lot, so maybe it applies to your situation. I think you can build it however you like. I've built it on gcc linux, visual studio, and xcode. All of it should just work.

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

It doesn't seem to work on my Windows machine, I run the b2 builder with the arguments listed in your readme, point BOOST_ROOT to C:\Boost and run update.bat

D:\simulation_toolkit>set BOOST_ROOT=C:\Boost

D:\simulation_toolkit>update.bat d:\simulation_toolkit_install Ninja
From https://github.com/brandon-kohn/simulation_suite
 * branch            HEAD       -> FETCH_HEAD
Already up-to-date.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/simulation_toolkit/cmake.build.release/googletest-download
[1/6] Performing update step for 'googletest'
Current branch master is up to date.
[2/6] No configure step for 'googletest'
[3/6] No build step for 'googletest'
[4/6] No install step for 'googletest'
[5/6] No test step for 'googletest'
[6/6] Completed 'googletest'
-- Clipper version 6.4.2.
-- NLopt version 2.5.0
-- Poly2tri version 1.0.0.
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
  libcds/CMakeLists.txt:30 (find_package)


CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
  libcds/CMakeLists.txt:30 (find_package)


CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
  libcds/CMakeLists.txt:30 (find_package)


CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
  libcds/CMakeLists.txt:30 (find_package)


CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
  libcds/CMakeLists.txt:30 (find_package)


-- Could NOT find Boost
-- Binary output path: D:/simulation_toolkit/cmake.build.release/libcds/bin
C++ std: -std=c++11 (default)
Build type -- release
Compiler version: GNU 4.8.2
System: Windows version: 10.0.16299
Target architecture: x86_64
Compiler flags:  -O3 -DNDEBUG -std=c++11;-mcx16 -Wall;-Wextra;-pedantic;-Wno-unused-local-typedefs
Exe flags:
Boost: Using CMake-fied boost
...

and then it goes downhill from there with compile errors due to missing boost. Dunno why it picks gcc over msvc toolchain.

from rpmalloc.

brandon-kohn avatar brandon-kohn commented on May 13, 2024

Let me try to replicate what you've done. What was the command you issued to build boost?
Was it?

b2 toolset=<toolset> address-model=64 link=static,shared threading=multi --layout=versioned --with-system --with-thread --with-fiber --with-context install

from rpmalloc.

brandon-kohn avatar brandon-kohn commented on May 13, 2024

The problem is the version of cmake doesn't know how to find the version of boost you've got. It's probably a new boost? 1.66 or greater?

https://gitlab.kitware.com/cmake/cmake/issues/17575

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

Ah, yes, I was using 1.66. Will try again with 1.65.1 like in your readme

from rpmalloc.

mjansson avatar mjansson commented on May 13, 2024

Right, with boost 1.65.1 and the latest develop rpmalloc it seems to pass:

      Start 91: rpmalloc_tests
91/91 Test #91: rpmalloc_tests ............................   Passed    0.85 sec

100% tests passed, 0 tests failed out of 91

from rpmalloc.

brandon-kohn avatar brandon-kohn commented on May 13, 2024

That does indeed seem to have sorted the issue. Cheers ;)

from rpmalloc.

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.