GithubHelp home page GithubHelp logo

Comments (32)

Diego91RA avatar Diego91RA commented on July 19, 2024

The same situation with clean install.
Debian 9, PSQL 12, TimescaleDB 1.7.2, Tango 9.3.4-rc6, all hdbpp repos are cloned from github.
image

@bourtemb @chedburgh any ideas?

from hdbpp-es.

Diego91RA avatar Diego91RA commented on July 19, 2024

I've inserted configuration from console and it works.
image

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

Hi, reason is that configuration in the DB has been moved from hdbpp-cm to hdbpp-es, but modification is still in progress and not yet merged in master branch, you should try integrated-build branch. @dlacoste-esrf should be working on this.

from hdbpp-es.

Diego91RA avatar Diego91RA commented on July 19, 2024

Now I have error compiling integrated-build, HdbClient.h not found.

What version of libhdbpp should I use with TimescaleDB? https://github.com/tango-controls-hdbpp/libhdbpp-timescale/tree/master/thirdparty/libhdbpp or https://github.com/tango-controls-hdbpp/libhdbpp?

from hdbpp-es.

dlacoste-esrf avatar dlacoste-esrf commented on July 19, 2024

Hi,
you should use https://github.com/tango-controls-hdbpp/libhdbpp

there is as well a custom cmake flag FETCH_LIBHDBPP, so that libhdbpp is downloaded and built with the event subscriber.

Sorry for the sad state of the repositories right now, I'll try to fix it up soon.

from hdbpp-es.

Diego91RA avatar Diego91RA commented on July 19, 2024

Hello.
I've compiled the DS with cmake flag. When I try to run it (with -v5 option) I have such output.

1597132187 [140323005146944] DEBUG sys/tools/es_test HdbEventSubscriber::init_device() create device sys/tools/es_test
1597132187 [140323005146944] DEBUG sys/tools/es_test subscribeRetryPeriod = 60
1597132187 [140323005146944] DEBUG sys/tools/es_test subscribeChangeAsFallback = 0
1597132187 [140323005146944] INFO sys/tools/es_test HdbEventSubscriber id=0
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding ALWAYS <-> 0
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding RUN <-> 1
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding SHUTDOWN <-> 2
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding SERVICE <-> 3
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Database::Database(): TANGO host mpd-ecal-sc-1.he.jinr.ru port 10000
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceImpl destructor for device sys/tools/es_test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceImpl destructor for device sys/tools/es_test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceClass destructor for class HdbEventSubscriber
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceClass destructor for class HdbEventSubscriber
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceImpl destructor for device dserver/hdb++es-srv/test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceImpl destructor for device dserver/hdb++es-srv/test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceClass destructor for class DServer
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceClass destructor for class DServer
Tango exception
Severity = ERROR
Error reason = API_MemoryAllocation
Desc : Can't allocate memory in server while building command(s) or device(s) for class number 1
Origin : DServer::init_device

Received a CORBA_Exception
Exiting

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

I have the same issue, it looks like it is crashing in HdbppTimescaleDbUtils::extractConfig

from hdbpp-es.

bourtemb avatar bourtemb commented on July 19, 2024

It looks like Tango received a std::bad_alloc exception during the device server initialization.
https://github.com/tango-controls/cppTango/blob/8fd3b4d85ad43bfac8f0e50bfdee22a98ac0c574/cppapi/server/dserver.cpp#L385

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

Is no one following the combined guide on hdbpp-timescale-project?

https://github.com/tango-controls-hdbpp/hdbpp-timescale-project/blob/master/doc/build.md

Since some of the branches have been merged, you will need to update what the integrated project builds, but it should checkout and build everything for you. You no longer need to build the individual components.

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

It looks like Tango received a std::bad_alloc exception during the device server initialization.
https://github.com/tango-controls/cppTango/blob/8fd3b4d85ad43bfac8f0e50bfdee22a98ac0c574/cppapi/server/dserver.cpp#L385

As I already said, this seems a bug in libhdbpp-timescale, since bypassing HdbppTimescaleDbUtils::extractConfig make it work.

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

Maybe this is version mismatch? Since some components have there updated branch merged. Some have not been tagged correctly either. Can I suggest trying:

hdbpp_cm - master
hdbpp_es - intergated branch
libhdbpp - master (v2.0)

If the issue is in HdbppTimescaleDbUtils::extractConfig(), just put some cout statements in and see what configuration parameter it is crashing on. Is there a config parameter without an equals sign?

There is information here on the config parameters: https://github.com/tango-controls-hdbpp/libhdbpp-timescale/blob/master/doc/configuration.md

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

Maybe this is version mismatch? Since some components have there updated branch merged. Some have not been tagged correctly either. Can I suggest trying:

You are right! It happens only when using libhdbpp-timescale not project-build2 with libhdbpp master (which is actually v2). So HdbppTimescaleDbFactory::create_db is called with the wrong parameters ending with a vector configuration not initialized so making explode extractConfig

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

The right combination for v.2 at the moment is
hdbpp_cm - master
hdbpp_es - integrated-build
libhdbpp - master (v2.0)
libhdbpp-timescale - project-build2

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

Excellent. Suggested TODO:

  • I have opened tickets to tag some repos correctly, lets fix the tags ASAP.
  • hdbpp-es needs the integrated build branch reviewing and merging ASAP, then tagging correctly.
  • hdbpp-timescale-project needs its build updated to embed the know working tags.

Its vital the repositories are tagged correctly when changes occur, otherwise we can hit some madness.

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

I am sorry, but I was (again) wrong: with the above combination I have

HdbClient: Error loading symbol getDBFactory from library: libhdb++timescale.so

I am still missing something.

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

DId you use libhdbpp-timescale branch project-build2? If so, try master.

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

No master have the v1 signature of HdbppTimescaleDbFactory::create_db, probably batch-insert is the right one, testing now.

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

Its been a while since I was on this, but I think batch-insert just branches from project-build2. I may need to look into this tonight. Something seems to have been mixed up somewhere.

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

Same error with batch-insert.

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

There seems to be something fishy here.

I made libhdbpp-timescale no longer dependent on libhdbpp. It includes the headers it needs itself. Yet I see reference to it in the cmake file. Maybe there is a missing commit from me on the project-build2 branch?

project-build2 is correct. Investigating for a few mins.

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

Right, libhdbpp-timescale is implementing getDBFactory, but not exporting it.

Perhaps we need to add

extern "C"
{
    typedef hdbpp::DBFactory *getDBFactory_t();
    hdbpp::DBFactory *getDBFactory();
}

To the end of AbstractDb.hpp? This needs to be outside the namespace. It can live in one of the other public headers also.

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

I don't know.
With the same combination but using libhdbpp-mysql - libhdbpp2 branch it is working, but it looks quite similar

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

I have compiled and run a test application via the hdbpp-timescale-project without the error. I will push the changes to that project I made.

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

I also pushed the fix to libhdbpp-timescale (that I posted above). Its on the project-build2 branch. Using the hdbpp-timescale-project this should all just work. I don't have time to test individual components.

I'll setup a project board to get some of these tickets/PR's merged in an orderly fashion, if that helps.

Individually, as mentioned by @gscalamera I think the following will work:

hdbpp_cm - master
hdbpp_es - integrated-build
libhdbpp - master (v2.0)
libhdbpp-timescale - project-build2

from hdbpp-es.

Diego91RA avatar Diego91RA commented on July 19, 2024

I've tried this set and ES still has memory allocation error.

hdbpp_cm - master
hdbpp_es - integrated-build
libhdbpp - master (v2.0)
libhdbpp-timescale - project-build2

hdbpp-timescale-project cmake has multiple errors, here are logs:
CMakeOutput.log
CMakeError.log

from hdbpp-es.

dlacoste-esrf avatar dlacoste-esrf commented on July 19, 2024

We have to fix the repos, but I am not sure how long it will take to make them clean again…

If you want a quick fix, you have to rebuild libhdbpp-timescale, but on the CMakeLists.txt in src there is a flag BYPASS_LIBHDBPP, it should be removed, as it is intended to be true for the new versions.
This way you will compile HdbClient.cpp on libhdbpp-timescale.
Then on this project, change the CMakeList.txt to link directly on the previous library, so in your CMakelists.txt, line 77 replace libhdb++.so.2 with libhdb++timescale.so.2. This way it should be ok.

Sorry it's a bit of a mess right now, we will try to fix it as fast as possible

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

What are you compiling on? I see pthread missing in the errors!

CMakeFiles/cmTC_ce417.dir/src.c.o: In function `main':
src.c:(.text+0x2f): undefined reference to `pthread_create'
src.c:(.text+0x3b): undefined reference to `pthread_detach'
src.c:(.text+0x47): undefined reference to `pthread_cancel'
src.c:(.text+0x58): undefined reference to `pthread_join'
src.c:(.text+0x6c): undefined reference to `pthread_atfork'

from hdbpp-es.

chedburgh avatar chedburgh commented on July 19, 2024

I updated the hdbpp-timescale-project to reflect the merged and tagged dependencies. Everything is now set for v2.0.0 apart from libhdbpp-timescale.

This works and builds for me on Ubuntu 20. Afraid I don't have time to go deeper into the other errors.

from hdbpp-es.

Diego91RA avatar Diego91RA commented on July 19, 2024

@dlacoste-esrf It's ok, I'm just trying to test and help fixing this, take your time.

from hdbpp-es.

Diego91RA avatar Diego91RA commented on July 19, 2024

What are you compiling on? I see pthread missing in the errors!

It's Debian 9 with manually updated CMake 3.18 to match requirements.

Freshly installed Debian 10 with CMake 3.13 has similar problems with pthread.
CMakeError.log

Also there is an error detecting PostgreSQL:

CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found
version "12.4 (Debian 12.4-1.pgdg100+1)")
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.13/Modules/FindPostgreSQL.cmake:175 (find_package_handle_standard_args)
external/libhdbpp-timescale/thirdparty/libpqxx/src/CMakeLists.txt:15 (find_package)

from hdbpp-es.

gscalam avatar gscalam commented on July 19, 2024

Regarding the PostgreSQL error you can try passing -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql to cmake

from hdbpp-es.

Diego91RA avatar Diego91RA commented on July 19, 2024

If you want a quick fix, you have to rebuild libhdbpp-timescale, but on the CMakeLists.txt in src there is a flag BYPASS_LIBHDBPP, it should be removed, as it is intended to be true for the new versions.
This way you will compile HdbClient.cpp on libhdbpp-timescale.
Then on this project, change the CMakeList.txt to link directly on the previous library, so in your CMakelists.txt, line 77 replace libhdb++.so.2 with libhdb++timescale.so.2. This way it should be ok.

Thanks, it works. I've successfully subscribed to an attr and can see data via Viewer. I hope that soon we will be able to install the HDB without any edits. I'll fork repos as a temporary solution.

Regarding the PostgreSQL error you can try passing -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql to cmake

It solved problem with include dir, but PThread is still missing.

from hdbpp-es.

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.