Plugins not loading via Houdini Subcore on Linux (ioghoudini_subcore)

From @nyue on Discord:
I have houdini 19.5.303 (py 3.9), I git clone the iograft houdini repo. I can start iograft_ui but it fails to load any of the standard nodes that is shipped with iograft Truncated log (too big to include in discord)

[2022-09-11 22:44:31.106] [info] Loaded plugin successfully: '/opt/iograft/nodes/create_temp_dir.py'.
[2022-09-11 22:44:34.959] [info] Launching subcore process for environment: 'hython'.
[2022-09-11 22:44:37.955] [info] Initializing iograft. (Version: 1.3.1)
[2022-09-11 22:44:37.956] [error] Failed to expand variables in environment settings for environment: hython. Leaving settings unexpanded.
[2022-09-11 22:44:37.956] [error] Failed to expand variables in environment settings for appended environments for environment: hython. Leaving settings unexpanded.
[2022-09-11 22:44:37.961] [info] Shutting down subcore process for environment: 'hython'.
[2022-09-11 22:44:39.963] [info] Subcore process for environment: 'hython' has terminated.
[2022-09-11 22:44:39.963] [info] Retrieved 0 types from subcore for environment: 'hython'
[2022-09-11 22:44:39.963] [info] Retrieved 0 nodes from subcore for environment: 'hython'

Environment JSON

$ cat ~/.iograft/envs/hython.json 
// Environment settings for iograft. These settings define an environment
// within the iograft system.

// WARNING: This file is auto-generated so comments and unrecognized
// settings will NOT be preserved.
{
    "plugin_path": [
        "/opt/iograft/types",
        "/opt/iograft/nodes",
        "/home/nyue/.iograft/types",
        "/home/nyue/.iograft/nodes",
        "/home/nyue/projects/iograft/iograft_git/python/hython"
    ],
    "subcore": {
        "launch_command": "ioghoudini_subcore"
    },
    "path": [
        "/opt/iograft/bin",
        "/home/nyue/projects/iograft/github_iograft_houdini_git/bin/",
        "/opt/sesi/hfs19.5.303/bin"
    ],
    "python_path": [
        "/opt/iograft/types",
        "/opt/iograft/python39"
    ],
    "environment_variables": {},
    "appended_environments": [],
    "name": "hython"
}

Hey @nyue, This is definitely a strange one that we haven’t seen before although we haven’t run with Houdini 19.5 with Python 3.9 on Linux yet.

We will investigate and try to reproduce the issue, but a couple of items that might help us out:

  • What version of Linux you are running on?
  • Can you please attach the full JSON file for your Hython environment (not only the contents copy/pasted)?

I’ll put together a new houdini subcore command later today that dumps some more debugging information as well.

I have attached the environment JSON file

hython.json (842 Bytes)

BTW which version of Houdini/python did you find working for you. Let me try with that combination so I may be able to narrow down things further to assist in your bug isolation.

We have been primarily testing with Houdini 19.0.x with Python 3.7.

I will try that combination and report back

Same error with Houdini 19.0.622 Python 3.7 on Ubuntu 20.04

[2022-09-12 10:28:51.588] [info] Launching in environment: 'default'.
[2022-09-12 10:28:53.983] [info] Starting new local session.
[2022-09-12 10:28:54.012] [info] Initializing iograft. (Version: 1.3.1)
[2022-09-12 10:28:54.012] [info] Loading embedded python from plugin: /opt/iograft/lib/iograft_embedded_py3
[2022-09-12 10:28:54.080] [info] Setting current environment to: 'default' based on the 'IOGRAFT_ENV' environment variable.
[2022-09-12 10:28:54.345] [info] Loaded plugin successfully: '/opt/iograft/types/iopythontypes.py'.
[2022-09-12 10:28:54.348] [info] Loaded plugin successfully: '/opt/iograft/types/iobasictypes.py'.
[2022-09-12 10:28:54.349] [info] Loaded plugin successfully: '/opt/iograft/types/libbasic_types.iot'.
[2022-09-12 10:28:54.370] [info] Loaded plugin successfully: '/opt/iograft/nodes/write_json_file.py'.
[2022-09-12 10:28:54.371] [info] Loaded plugin successfully: '/opt/iograft/nodes/set_file_extension.py'.
[2022-09-12 10:28:54.372] [info] Loaded plugin successfully: '/opt/iograft/nodes/list_directory.py'.
[2022-09-12 10:28:54.373] [info] Loaded plugin successfully: '/opt/iograft/nodes/create_directory.py'.
[2022-09-12 10:28:54.413] [info] Loaded plugin successfully: '/opt/iograft/nodes/copy_files.py'.
[2022-09-12 10:28:54.414] [info] Loaded plugin successfully: '/opt/iograft/nodes/write_file_lines.py'.
[2022-09-12 10:28:54.415] [info] Loaded plugin successfully: '/opt/iograft/nodes/load_json_file.py'.
[2022-09-12 10:28:54.416] [info] Loaded plugin successfully: '/opt/iograft/nodes/read_file_lines.py'.
[2022-09-12 10:28:54.417] [info] Loaded plugin successfully: '/opt/iograft/nodes/get_environment_variable.py'.
[2022-09-12 10:28:54.418] [info] Loaded plugin successfully: '/opt/iograft/nodes/remove_directory.py'.
[2022-09-12 10:28:54.419] [info] Loaded plugin successfully: '/opt/iograft/nodes/write_json_string.py'.
[2022-09-12 10:28:54.420] [info] Loaded plugin successfully: '/opt/iograft/nodes/split_string.py'.
[2022-09-12 10:28:54.421] [info] Loaded plugin successfully: '/opt/iograft/nodes/read_file.py'.
[2022-09-12 10:28:54.421] [info] Loaded plugin successfully: '/opt/iograft/nodes/split_file_extension.py'.
[2022-09-12 10:28:54.422] [info] Loaded plugin successfully: '/opt/iograft/nodes/set_dictionary_value.py'.
[2022-09-12 10:28:54.423] [info] Loaded plugin successfully: '/opt/iograft/nodes/create_empty_dictionary.py'.
[2022-09-12 10:28:54.424] [info] Loaded plugin successfully: '/opt/iograft/nodes/concatenate_strings.py'.
[2022-09-12 10:28:54.425] [info] Loaded plugin successfully: '/opt/iograft/nodes/filter_files.py'.
[2022-09-12 10:28:54.426] [info] Loaded plugin successfully: '/opt/iograft/nodes/write_file.py'.
[2022-09-12 10:28:54.427] [info] Loaded plugin successfully: '/opt/iograft/nodes/set_current_directory.py'.
[2022-09-12 10:28:54.428] [info] Loaded plugin successfully: '/opt/iograft/nodes/get_current_directory.py'.
[2022-09-12 10:28:54.429] [info] Loaded plugin successfully: '/opt/iograft/nodes/get_dictionary_value.py'.
[2022-09-12 10:28:54.430] [info] Loaded plugin successfully: '/opt/iograft/nodes/format_string.py'.
[2022-09-12 10:28:54.431] [info] Loaded plugin successfully: '/opt/iograft/nodes/load_json_string.py'.
[2022-09-12 10:28:54.432] [info] Loaded plugin successfully: '/opt/iograft/nodes/get_python_path.py'.
[2022-09-12 10:28:54.433] [info] Loaded plugin successfully: '/opt/iograft/nodes/split_path.py'.
[2022-09-12 10:28:54.434] [info] Loaded plugin successfully: '/opt/iograft/nodes/join_path.py'.
[2022-09-12 10:28:54.434] [info] Loaded plugin successfully: '/opt/iograft/nodes/string_length.py'.
[2022-09-12 10:28:54.473] [info] Loaded plugin successfully: '/opt/iograft/nodes/create_temp_dir.py'.
[2022-09-12 10:28:58.260] [info] Launching subcore process for environment: 'hython'.
[2022-09-12 10:29:00.114] [info] Initializing iograft. (Version: 1.3.1)
[2022-09-12 10:29:00.116] [error] Failed to expand variables in environment settings for environment: hython. Leaving settings unexpanded.
[2022-09-12 10:29:00.116] [error] Failed to expand variables in environment settings for appended environments for environment: hython. Leaving settings unexpanded.
[2022-09-12 10:29:00.121] [info] Shutting down subcore process for environment: 'hython'.
[2022-09-12 10:29:01.266] [info] Subcore process for environment: 'hython' has terminated.
[2022-09-12 10:29:01.266] [info] Retrieved 0 types from subcore for environment: 'hython'
[2022-09-12 10:29:01.266] [info] Retrieved 0 nodes from subcore for environment: 'hython'

Environment JSON
hython.json (842 Bytes)

Thanks for checking on that, Nicholas! I will be digging in a little more into this error tonight.

I squeezed in a small update to version 1.3.2 that went out today that provides a little more context to the error if you have a chance to update and re-run the hython environment.

I’m thinking the error you are seeing is not the root cause of the nodes not loading though, so I am still planning to get you a new ioghoudini_subcore to collect some additional info.

Here is the log with iograft 1.3.2

[2022-09-12 16:08:01.563] [info] Launching subcore process for environment: 'hython'.
[2022-09-12 16:08:03.215] [info] Initializing iograft. (Version: 1.3.2)
[2022-09-12 16:08:03.216] [error] Failed to expand variables in environment settings for environment: hython. Leaving settings unexpanded.
[2022-09-12 16:08:03.216] [error] Exception was: std::bad_alloc
[2022-09-12 16:08:03.216] [error] Failed to expand variables in environment settings for appended environments for environment: hython. Leaving settings unexpanded.
[2022-09-12 16:08:03.216] [error] Exception was: std::bad_alloc
[2022-09-12 16:08:03.220] [info] Shutting down subcore process for environment: 'hython'.
[2022-09-12 16:08:04.567] [info] Subcore process for environment: 'hython' has terminated.
[2022-09-12 16:08:04.567] [info] Retrieved 0 types from subcore for environment: 'hython'
[2022-09-12 16:08:04.567] [info] Retrieved 0 nodes from subcore for environment: 'hython'

Thanks, Nicholas. I have been able to reproduce the issue. Will continue to investigate the root cause and provide an update when I know more!

Hey Nicholas,
Wanted to give you a quick update on this. I was able to track down the source of this error.

It turns out we got a little ahead of ourselves and are building the iograft libraries on Ubuntu with the “new” C++ ABI (_GLIBCXX_USE_CXX11_ABI=1). This conflicts with what Houdini provides resulting in the errors you are seeing. This is only an issue on Ubuntu.

In general, our goal has been to match the VFX Reference Platform, so in the next release we will match the “old” C++ ABI which should resolve the errors you are seeing in Houdini on Ubuntu.

Starting next year, the VFX Reference Platform switches to the new C++ ABI at which point we will update iograft’s default to match, but will most likely also continue to include iograft libraries to support the old ABI at least for 2023.