Git Product home page Git Product logo

Comments (8)

andreisel avatar andreisel commented on April 29, 2024

When adding a new GEE Server with Server Accociation Manager, Fusion crashes when Server is not reachable: no status message returned from request.

Expected:
Report Failure.
Warning: Unable to contact stream data server.
Segmentation fault. in LoggingManager::AppendErrMsg(std::string const&) () from NATIVE-REL-x86_64/lib/libgecommon.so

It crashes on writing to err_str_ of LoggingManager -object in void LoggingManager::AppendErrMsg(const std::string& msg).

from earthenterprise.

tst-ccamp avatar tst-ccamp commented on April 29, 2024

From @bradh:
I pushed a simple built globe, although the server wasn't installed / running.

Repro'd under gdb, here is the backtrace:

[2017-04-21 21:26:21] Warning: No status message returned from 
  request: http://googleearth/geserve/StreamPush?Cmd=Ping&Host=googleearth

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6647bf6 in LoggingManager::AppendErrMsg(std::string const&) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libgecommon.so
(gdb) bt
#0  0x00007ffff6647bf6 in LoggingManager::AppendErrMsg(std::string const&) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libgecommon.so
#1  0x00007ffff59d276e in PublishHelper::ProcessGetRequest(std::string const&, std::string const&, bool, std::string*, std::map<std::string, std::vector<std::string, std::allocator<std::string> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocator<std::string> > > > >*, std::string const&) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libgepublish.so
#2  0x00007ffff59d2c42 in PublishHelper::ProcessGetRequest(PublishHelper::ServerType, std::string*, std::map<std::string, std::vector<std::string, std::allocator<std::string> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocator<std::string> > > > >*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libgepublish.so
#3  0x00007ffff59d3172 in PublishHelper::ProcessGetRequest(PublishHelper::ServerType, std::string*, std::string const&, std::vector<std::string, std::allocator<std::string> >*) ()
   from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libgepublish.so
#4  0x00007ffff59c44f6 in PublisherClient::PingServer(PublishHelper::ServerType) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libgepublish.so
#5  0x00007ffff59c94f9 in PublisherClient::AddDatabase(std::string const&, std::string const&) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libgepublish.so
#6  0x000000000046804e in AssetManager::PushDatabase(khRefGuard<gstAssetHandleImpl> const&) ()
#7  0x000000000046b115 in AssetManager::ShowAssetMenu(khRefGuard<gstAssetHandleImpl> const&, QPoint const&) ()
#8  0x000000000046b5be in AssetManager::tableAssetMenu(int, int, QPoint const&) ()
#9  0x00000000005c343a in AssetManager::qt_invoke(int, QUObject*) ()
#10 0x00007ffff49f5fb2 in QObject::activate_signal(QConnectionList*, QUObject*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#11 0x00007ffff4cad52d in QTable::contextMenuRequested(int, int, QPoint const&) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#12 0x00007ffff4b80deb in QTable::contentsContextMenuEvent(QContextMenuEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#13 0x00007ffff4acb8b4 in QScrollView::viewportContextMenuEvent(QContextMenuEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#14 0x00007ffff4acbbb5 in QScrollView::eventFilter(QObject*, QEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#15 0x00007ffff49f429f in QObject::activate_filters(QEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#16 0x00007ffff49f42f7 in QObject::event(QEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#17 0x00007ffff4a1daa5 in QWidget::event(QEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#18 0x00007ffff49a9e0b in QApplication::internalNotify(QObject*, QEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#19 0x00007ffff49aa47b in QApplication::notify(QObject*, QEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#20 0x00007ffff495b328 in QETWidget::translateMouseEvent(_XEvent const*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#21 0x00007ffff4959a69 in QApplication::x11ProcessEvent(_XEvent*) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#22 0x00007ffff4967996 in QEventLoop::processEvents(unsigned int) () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#23 0x00007ffff49b91b1 in QEventLoop::enterLoop() () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#24 0x00007ffff49b9122 in QEventLoop::exec() () from /home/bradh/earthenterprise/earth_enterprise/src/NATIVE-OPT-x86_64/lib/libqt-mt.so.3
#25 0x00000000004439af in main ()

from earthenterprise.

tst-lsavoie avatar tst-lsavoie commented on April 29, 2024

I'm only getting this bug when I specify -O2 in the build. It seems that it is caused by optimization.

from earthenterprise.

bradh avatar bradh commented on April 29, 2024

Perhaps only being exposed by optimisation.

from earthenterprise.

gautamp86 avatar gautamp86 commented on April 29, 2024

Kindly give a solution to solve this bug

from earthenterprise.

tst-ccamp avatar tst-ccamp commented on April 29, 2024

@gautamp86 This is in our queue to be fixed for the first release, 5.2.0. However, the workaround for this bug is to fix the issue that is causing the utility to not be able to contact the Publish module. This could be as simple as making sure the geserver process is running or making sure your URL is correctly specified. More complex solutions might be to check the firewall and to see if you can contact the URL specified. You can see if you have connectivity by going to the URL in a web browser or by using the curl utility on the command line.

from earthenterprise.

asmitaw avatar asmitaw commented on April 29, 2024

here are few suggestions to help unblock:

  1. First see why logfile is failing to open - path issue ?
    permissions issue ? race condition ? Add some try catch and printfs to surface the problem at

My guess is that we are pushing all log messages to a local string in this situation and in optimize build, the way we are handling err_msg_ is not honored or there is no space to dump all logs.

to help find that out, add try catch around following code and print the exception.( I personally would use str::append , strcat etc. or also use a char buffer with predetermined size , depends how big is the log), you could print the length of strings before the exception occurs using both optimized and debug build and compare the lengths.

from earthenterprise.

andreisel avatar andreisel commented on April 29, 2024

We are pushing only error messages to err_msg_ in LoggingManager. And it fails on first writing to err_msg_.
I thought that problem is related to incorrect managing of LoggingManager object in multithreading - at the time we are trying to report an error into the LoggingManager, the LoggingManager object is already destroyed.

Please, look for PublisherClient usage:
It is being created in main thread:
https://github.com/google/earthenterprise/blob/master/earth_enterprise/src/fusion/fusionui/AssetManager.cpp#L1238
https://github.com/google/earthenterprise/blob/master/earth_enterprise/src/fusion/fusionui/AssetManager.cpp#L1373

.. and then being used in push/publish thread:
https://github.com/google/earthenterprise/blob/master/earth_enterprise/src/fusion/fusionui/AssetManager.cpp#L1256
https://github.com/google/earthenterprise/blob/master/earth_enterprise/src/fusion/fusionui/AssetManager.cpp#L1384

But the simplest cases are
A. it fails when pushing database with geserveradmin.
B. it fails when pinging server in creating new server association.
While these cases look correct (object is being created and used in the same thread), it still fails on writing to LoggingManager.
So it maybe some other issue with managing the LoggingManager object.

A. Pushing database with geserveradmin use-case:
https://github.com/google/earthenterprise/blob/master/earth_enterprise/src/fusion/gepublish/geserveradmin.cpp#L432
Steps to reproduce:

  1. Build database
  2. try to push with geserveradmin when server is not running:
    geserveradmin --adddb ..

B. Pinging server when creating a new Server Association use-case:
https://github.com/google/earthenterprise/blob/master/earth_enterprise/src/fusion/fusionui/ServerCombinationEdit.cpp#L60
https://github.com/google/earthenterprise/blob/master/earth_enterprise/src/fusion/fusionui/ServerCombinationEdit.cpp#L63

Steps to reproduce:

  1. Start gefusion daemon;
  2. Run GEE Fusion
  3. Open the Server Associations Manager (Tools > Server Associations Manager) and
    try to Create/Add a new Server Association.
  4. Specify any host (note GEE server is not running on that host or it can be non-existing/non-reachable host) and try to Query it:
    it will fail when appending error message to LoggingManager.

from earthenterprise.

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.