Client hangs if loading complex world resulting in permanent black gzclient

Create issue
Issue #2429 resolved
d_hood created an issue

Seems that a race condition has been exaggerated in the latest gazebo version that makes the following more likely to occur:

Start gazebo with a complex world file. The gzclient shows a black world with the orange "loading world" popup, forever. The gzserver is running fine, however, and if you start another gzclient, it will work fine too. It's just the first gzclient that seems to start before something is ready.

The reason I suspect it's a race condition is because we first noticed it on an older laptop, and I can reproduce it on my newer desktop by running stress at the same time. Also, the fact that additional gzclients started later on work fine.

The trigger seems to be having many models in the world. For simple worlds, I can't trigger this, but with complex worlds, the issue appears.

I have attached a world file with a lot of models, and no plugins. The model is from https://bitbucket.org/osrf/ariac/src/772ae339342000114e20a1fe9819f085a36bcb66/osrf_gear/models/part3_ariac/?at=master, and doesn't refer to meshes/materials in other models.

If I run the world with all models, it will give the black screen even on gazebo 8.2, but if I run the world with only half the models, it'll be fine in 8.2, unless I add CPU stress. On 8.3, the world with only half the models will always give black screen on my machine. That's what makes me think that this is not a new bug, but just a race condition that is now more likely to occur.

$ stress --cpu 7 --timeout 60
$ gazebo ~/ariac_ws/many_gear_parts.world --verbose
Gazebo multi-robot simulator, version 8.3.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.23.1.167
Gazebo multi-robot simulator, version 8.3.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.23.1.167
[Err] [Node.cc:105] No namespace found
[Err] [Node.cc:105] No namespace found
<client hangs with black screen>

Anecdotally, it seems that if "No namespace found" is printed zero or once things are fine, but if it's printed twice or more, the client will give the black screen. I'm not sure what causes that to be output though, so don't have any other insight.

@jrivero noticed this with 8.3 but we've had ARIAC users run into this on 7.11, so it must have come from a PR that targeted both versions.

Comments (6)

  1. d_hood reporter

    yes! it does look the same:

    <while client is hanging>
    dhood@osrf-esteve:~/ariac_ws [ariac_ws]$ gz topic -l
    /gazebo/ariac/atmosphere
    /gazebo/ariac/bin3|part3_198/link/wrench
    /gazebo/ariac/factory
    /gazebo/ariac/factory/light
    /gazebo/ariac/gui
    /gazebo/ariac/joint
    /gazebo/ariac/light
    /gazebo/ariac/light/modify
    /gazebo/ariac/model/info
    /gazebo/ariac/model/modify
    /gazebo/ariac/physics
    /gazebo/ariac/physics/contacts
    /gazebo/ariac/playback_control
    /gazebo/ariac/pose/info
    /gazebo/ariac/pose/local/info
    /gazebo/ariac/pose/modify
    /gazebo/ariac/request
    /gazebo/ariac/response
    /gazebo/ariac/visual
    /gazebo/ariac/wind
    /gazebo/ariac/world_control
    /gazebo/ariac/world_stats
    /gazebo/default/factory
    /gazebo/default/factory/light
    /gazebo/default/undo_redo
    /gazebo/default/user_cmd_stats
    

    Changing the world name to default makes it go away.

    Good to know that there's a workaround for now, thank you. This is definitely affecting more users than normal with the latest release though.

  2. Log in to comment