Bug 1965830 - [abrt] usd: _getRenderer(): stageView.py:970:_getRenderer:pxr.Tf.ErrorException:
Summary: [abrt] usd: _getRenderer(): stageView.py:970:_getRenderer:pxr.Tf.ErrorException:
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: usd
Version: 37
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Luya Tshimbalanga
QA Contact:
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:277a3d5ccee8b5491752478f795...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-30 15:43 UTC by Ben Beasley
Modified: 2023-05-16 03:13 UTC (History)
3 users (show)

Fixed In Version: usd-22.05b-24.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-11 01:53:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.37 KB, text/plain)
2021-05-30 15:43 UTC, Ben Beasley
no flags Details
File: cpuinfo (1.91 KB, text/plain)
2021-05-30 15:43 UTC, Ben Beasley
no flags Details
File: environ (5.55 KB, text/plain)
2021-05-30 15:43 UTC, Ben Beasley
no flags Details
File: mountinfo (3.83 KB, text/plain)
2021-05-30 15:43 UTC, Ben Beasley
no flags Details
File: namespaces (172 bytes, text/plain)
2021-05-30 15:43 UTC, Ben Beasley
no flags Details
File: open_fds (1.98 KB, text/plain)
2021-05-30 15:43 UTC, Ben Beasley
no flags Details
core_backtrace from python3.11 on F37 (75.08 KB, text/plain)
2022-12-14 14:53 UTC, Ben Beasley
no flags Details

Description Ben Beasley 2021-05-30 15:43:24 UTC
Description of problem:
usdview /usr/lib64/usd/usdLux/resources/usdLux/schema.usda

The USDView window appears for a couple of seconds, then exits; the following appears in the terminal:

QSocketNotifier: Can only be used with threads started with QThread
State file not found, a new one will be created.
Warning: in _ReportErrors at line 2822 of /builddir/build/BUILD/USD-21.05/pxr/usd/usd/stage.cpp -- Could not load sublayer @usdGeom/schema.usda@ of layer @/usr/lib64/usd/usdLux/resources/usdLux/schema.usda@; skipping. (instantiating stage on stage @/usr/lib64/usd/usdLux/resources/usdLux/schema.usda@ <0x55d336ef0e70>)
Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/pxr/Usdviewq/stageView.py", line 1659, in paintGL
    renderer = self._getRenderer()
  File "/usr/lib64/python3.9/site-packages/pxr/Usdviewq/stageView.py", line 970, in _getRenderer
    self._renderer = UsdImagingGL.Engine()
pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_21__pxrReserved__::GlfContextCaps::_LoadCaps' at line 162 in file /builddir/build/BUILD/USD-21.05/pxr/imaging/glf/contextCaps.cpp : 'Failed verification: ' GlfGLContext::GetCurrentGLContext()->IsValid() ''
	Error in 'pxrInternal_v0_21__pxrReserved__::{anonymous}::_IsHydraEnabled' at line 109 in file /builddir/build/BUILD/USD-21.05/pxr/usdImaging/usdImagingGL/engine.cpp : 'OpenGL context required, using reference renderer'
/usr/include/c++/11/bits/stl_vector.h:1063: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = float; _Alloc = std::allocator<float>; std::vector<_Tp, _Alloc>::const_reference = const float&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)

I am using GNOME/Wayland on AMDGPU.

Version-Release number of selected component:
usd-21.05-2.fc34

Additional info:
reporter:       libreport-2.14.0
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-1210e326-d89b-4237-9c3b-fc8fd66888e6.scope
cmdline:        /usr/bin/python3 -s /usr/bin/usdview /usr/lib64/usd/usdLux/resources/usdLux/schema.usda
crash_function: _getRenderer
exception_type: pxr.Tf.ErrorException
executable:     /usr/bin/usdview
interpreter:    python3-3.9.5-1.fc34.x86_64
kernel:         5.11.21-300.fc34.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
stageView.py:970:_getRenderer:pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_21__pxrReserved__::GlfContextCaps::_LoadCaps' at line 162 in file /builddir/build/BUILD/USD-21.05/pxr/imaging/glf/contextCaps.cpp : 'Failed verification: ' GlfGLContext::GetCurrentGLContext()->IsValid() ''
	Error in 'pxrInternal_v0_21__pxrReserved__::{anonymous}::_IsHydraEnabled' at line 109 in file /builddir/build/BUILD/USD-21.05/pxr/usdImaging/usdImagingGL/engine.cpp : 'OpenGL context required, using reference renderer'

Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/pxr/Usdviewq/stageView.py", line 1659, in paintGL
    renderer = self._getRenderer()
  File "/usr/lib64/python3.9/site-packages/pxr/Usdviewq/stageView.py", line 970, in _getRenderer
    self._renderer = UsdImagingGL.Engine()
pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_21__pxrReserved__::GlfContextCaps::_LoadCaps' at line 162 in file /builddir/build/BUILD/USD-21.05/pxr/imaging/glf/contextCaps.cpp : 'Failed verification: ' GlfGLContext::GetCurrentGLContext()->IsValid() ''
	Error in 'pxrInternal_v0_21__pxrReserved__::{anonymous}::_IsHydraEnabled' at line 109 in file /builddir/build/BUILD/USD-21.05/pxr/usdImaging/usdImagingGL/engine.cpp : 'OpenGL context required, using reference renderer'

Local variables in innermost frame:
self: <pxr.Usdviewq.stageView.StageView(0x55d337916410) at 0x7f17a8b0d980>

Comment 1 Ben Beasley 2021-05-30 15:43:26 UTC
Created attachment 1788083 [details]
File: backtrace

Comment 2 Ben Beasley 2021-05-30 15:43:27 UTC
Created attachment 1788084 [details]
File: cpuinfo

Comment 3 Ben Beasley 2021-05-30 15:43:27 UTC
Created attachment 1788085 [details]
File: environ

Comment 4 Ben Beasley 2021-05-30 15:43:28 UTC
Created attachment 1788086 [details]
File: mountinfo

Comment 5 Ben Beasley 2021-05-30 15:43:29 UTC
Created attachment 1788087 [details]
File: namespaces

Comment 6 Ben Beasley 2021-05-30 15:43:30 UTC
Created attachment 1788088 [details]
File: open_fds

Comment 7 Luya Tshimbalanga 2021-06-06 19:13:17 UTC
I confirm the issue on similar system (GNOME 40 Wayland on Ryzen 5 2500u running on amdpgu driver). It seems a problem related to c++11 at the first view. Need to investigate more...

Comment 8 Ben Beasley 2022-03-31 21:54:33 UTC
Luya, I revisited this on Fedora 35 and found I cannot run usdview at all:

Traceback (most recent call last):
  File "/usr/bin/usdview", line 28, in <module>
    import pxr.Usdviewq as Usdviewq
  File "/usr/lib64/python3.10/site-packages/pxr/Usdviewq/__init__.py", line 27, in <module>
    from pxr import Tf
  File "/usr/lib64/python3.10/site-packages/pxr/Tf/__init__.py", line 163, in <module>
    PreparePythonModule()
  File "/usr/lib64/python3.10/site-packages/pxr/Tf/__init__.py", line 88, in PreparePythonModule
    module = importlib.import_module(
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /lib64/libjemalloc.so.2: cannot allocate memory in static TLS block

I tried patching the glibc 2.34+ malloc hooks out with something similar to your suggestion in[1] so that I could build without jemalloc, and found that doing this allows me to run usdview again (and confirm that this bug *is* still present in F35).

Before I issue an update to F35 and implement this change for other branches, are there any “sanity checks” I should do to make sure that disabling jemalloc is not accidentally breaking USD support in blender?

https://github.com/PixarAnimationStudios/USD/issues/1592#issuecomment-1047152905

Comment 9 Ben Beasley 2022-03-31 22:28:41 UTC
By the way, the resulting F35 backtrace (with debuginfo installed) looked like:

$ usdview /usr/lib64/usd/usdLux/resources/usdLux/schema.usda
QSocketNotifier: Can only be used with threads started with QThread
State file not found, a new one will be created.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Warning: in _ReportErrors at line 2845 of /builddir/build/BUILD/USD-21.11/pxr/usd/usd/stage.cpp -- Could not load sublayer @usdGeom/schema.usda@ of layer @/usr/lib64/usd/usdLux/resources/usdLux/schema.usda@; skipping. (instantiating stage on stage @/usr/lib64/usd/usdLux/resources/usdLux/schema.usda@ <0x559796a36920>)
Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/pxr/Usdviewq/stageView.py", line 1673, in paintGL
    renderer = self._getRenderer()
  File "/usr/lib64/python3.10/site-packages/pxr/Usdviewq/stageView.py", line 972, in _getRenderer
    self._renderer = UsdImagingGL.Engine()
pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_21__pxrReserved__::GlfContextCaps::_LoadCaps' at line 162 in file /builddir/build/BUILD/USD-21.11/pxr/imaging/glf/contextCaps.cpp : 'Failed verification: ' GlfGLContext::GetCurrentGLContext()->IsValid() ''
	Error in 'pxrInternal_v0_21__pxrReserved__::{anonymous}::_IsHydraEnabled' at line 109 in file /builddir/build/BUILD/USD-21.11/pxr/usdImaging/usdImagingGL/engine.cpp : 'OpenGL context required, using reference renderer'
/usr/include/c++/11/bits/stl_vector.h:1063: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = float; _Alloc = std::allocator<float>; std::vector<_Tp, _Alloc>::const_reference = const float&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)

I’m still not sure what’s going on there.

Comment 10 Luya Tshimbalanga 2022-04-05 04:16:18 UTC
(In reply to Ben Beasley from comment #9)
> QSocketNotifier: Can only be used with threads started with QThread
> State file not found, a new one will be created.
> qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

It seems usdview is unable to run on Wayland.

Comment 11 Ben Cotton 2022-11-29 16:58:10 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 12 Ben Cotton 2022-12-13 15:24:14 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Ben Beasley 2022-12-14 14:52:57 UTC
In F37:


$ usdview /usr/lib64/usd/usdLux/resources/usdLux/schema.usda
QSocketNotifier: Can only be used with threads started with QThread
State file not found, a new one will be created.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Warning: in _ReportErrors at line 2873 of /builddir/build/BUILD/USD-22.05b/pxr/usd/usd/stage.cpp -- Could not load sublayer @usdGeom/schema.usda@ of layer @/usr/lib64/usd/usdLux/resources/usdLux/schema.usda@; skipping. (instantiating stage on stage @/usr/lib64/usd/usdLux/resources/usdLux/schema.usda@ <0x55e21a8c0d80>)
Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/pxr/Usdviewq/stageView.py", line 1686, in paintGL
    renderer = self._getRenderer()
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pxr/Usdviewq/stageView.py", line 957, in _getRenderer
    self._renderer = UsdImagingGL.Engine()
                     ^^^^^^^^^^^^^^^^^^^^^
pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_22__pxrReserved__::GlfContextCaps::_LoadCaps' at line 100 in file /builddir/build/BUILD/USD-22.05b/pxr/imaging/glf/contextCaps.cpp : 'Failed verification: ' GlfGLContext::GetCurrentGLContext()->IsValid() ''
	Error in 'pxrInternal_v0_22__pxrReserved__::{anonymous}::_IsHydraEnabled' at line 128 in file /builddir/build/BUILD/USD-22.05b/pxr/usdImaging/usdImagingGL/engine.cpp : 'OpenGL context required, using reference renderer'
/usr/include/c++/12/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = float; _Alloc = std::allocator<float>; const_reference = const float&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.


Backtrace from “usd”:


stageView.py:957:_getRenderer:pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_22__pxrReserved__::GlfContextCaps::_LoadCaps' at line 100 in file /builddir/build/BUILD/USD-22.05b/pxr/imaging/glf/contextCaps.cpp : 'Failed verification: ' GlfGLContext::GetCurrentGLContext()->IsValid() ''
	Error in 'pxrInternal_v0_22__pxrReserved__::{anonymous}::_IsHydraEnabled' at line 128 in file /builddir/build/BUILD/USD-22.05b/pxr/usdImaging/usdImagingGL/engine.cpp : 'OpenGL context required, using reference renderer'

Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/pxr/Usdviewq/stageView.py", line 1686, in paintGL
    renderer = self._getRenderer()
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pxr/Usdviewq/stageView.py", line 957, in _getRenderer
    self._renderer = UsdImagingGL.Engine()
                     ^^^^^^^^^^^^^^^^^^^^^
pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_22__pxrReserved__::GlfContextCaps::_LoadCaps' at line 100 in file /builddir/build/BUILD/USD-22.05b/pxr/imaging/glf/contextCaps.cpp : 'Failed verification: ' GlfGLContext::GetCurrentGLContext()->IsValid() ''
	Error in 'pxrInternal_v0_22__pxrReserved__::{anonymous}::_IsHydraEnabled' at line 128 in file /builddir/build/BUILD/USD-22.05b/pxr/usdImaging/usdImagingGL/engine.cpp : 'OpenGL context required, using reference renderer'

Local variables in innermost frame:
self: <pxr.Usdviewq.stageView.StageView(0x5575695b5ed0) at 0x7fb24377a700>


Core backtrace from “python3.11”: (to be attached)

Comment 14 Ben Beasley 2022-12-14 14:53:40 UTC
Created attachment 1932633 [details]
core_backtrace from python3.11 on F37

Comment 15 Fedora Update System 2023-05-07 07:53:27 UTC
FEDORA-EPEL-2023-4600d45ba0 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-4600d45ba0

Comment 16 Fedora Update System 2023-05-08 01:46:04 UTC
FEDORA-2023-a14d74950b has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a14d74950b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a14d74950b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2023-05-08 02:03:57 UTC
FEDORA-2023-02629d0afe has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-02629d0afe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-02629d0afe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2023-05-08 02:04:55 UTC
FEDORA-EPEL-2023-4600d45ba0 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-4600d45ba0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2023-05-08 02:18:00 UTC
FEDORA-2023-6c6904e44c has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-6c6904e44c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-6c6904e44c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2023-05-11 01:53:05 UTC
FEDORA-2023-a14d74950b has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2023-05-16 03:05:53 UTC
FEDORA-2023-02629d0afe has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2023-05-16 03:13:08 UTC
FEDORA-EPEL-2023-4600d45ba0 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.