Bug 2458608 - pcs resource list produces traceback
Summary: pcs resource list produces traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcs
Version: 43
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michal Pospisil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-04-15 05:03 UTC by Luca Cavana
Modified: 2026-06-10 01:08 UTC (History)
8 users (show)

Fixed In Version: pcs-0.12.2-2.fc44 pcs-0.12.2-2.fc43
Clone Of:
Environment:
Last Closed: 2026-06-10 00:55:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Luca Cavana 2026-04-15 05:03:10 UTC
Hello,

the command "pcs resource list" produces a traceback after a few 10s of seconds of high CPU usage and no useful output appears.
A very similar traceback happens for "pcs stonith list" (but I think that's because they share the same code as stonith devices are primitives themselves),

Reproducible: Always

Steps to Reproduce:
1. Install the cluster components pcs pacemaker
2. Create a basic cluster
3. Run "pcs resource list" or "pcs stonith list"
4. If you manage the cluster via pcsd web ui or cockpit, you can list resource types
Actual Results:
For "pcs resource list":
Traceback (most recent call last):
  File "/usr/sbin/pcs", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.14/site-packages/pcs/app.py", line 271, in main
    routing.create_router(cmd_map, [])(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        utils.get_library_wrapper(), argv, utils.get_input_modifiers()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.14/site-packages/pcs/cli/common/routing.py", line 33, in _router
    return cmd_map[sub_cmd](lib, argv_next, modifiers)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pcs/cli/common/routing.py", line 33, in _router
    return cmd_map[sub_cmd](lib, argv_next, modifiers)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pcs/resource.py", line 511, in resource_list_available
    _format_desc(
    ~~~~~~~~~~~~^
        len(name + " - "), shortdesc.replace("\n", " ")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ),
    ^
  File "/usr/lib/python3.14/site-packages/pcs/resource.py", line 567, in _format_desc
    dummy_rows, columns = utils.getTerminalSize()
                          ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/pcs/utils.py", line 1800, in getTerminalSize
    str("hh"), fcntl.ioctl(fd, termios.TIOCGWINSZ, "1234")
               ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: buffer overflow


For "pcs stonith list":
Traceback (most recent call last):
  File "/usr/sbin/pcs", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.14/site-packages/pcs/app.py", line 271, in main
    routing.create_router(cmd_map, [])(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        utils.get_library_wrapper(), argv, utils.get_input_modifiers()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.14/site-packages/pcs/cli/common/routing.py", line 33, in _router
    return cmd_map[sub_cmd](lib, argv_next, modifiers)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pcs/cli/common/routing.py", line 33, in _router
    return cmd_map[sub_cmd](lib, argv_next, modifiers)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pcs/stonith.py", line 88, in stonith_list_available
    resource._format_desc(  # noqa: SLF001
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
        len(name + " - "), shortdesc.replace("\n", " ")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ),
    ^
  File "/usr/lib/python3.14/site-packages/pcs/resource.py", line 567, in _format_desc
    dummy_rows, columns = utils.getTerminalSize()
                          ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/pcs/utils.py", line 1800, in getTerminalSize
    str("hh"), fcntl.ioctl(fd, termios.TIOCGWINSZ, "1234")
               ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: buffer overflow


Expected Results:
You get the list.

Comment 2 Michal Pospisil 2026-04-29 11:15:19 UTC
Just to clarify, I'm waiting for the fix of bz2461143 to do a new build. It will also include a fixed pcs-web-ui for bz2454042.

Comment 3 Fedora Update System 2026-05-18 18:08:42 UTC
FEDORA-2026-c0f7d885ee (pcs-0.12.2-2.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-c0f7d885ee

Comment 4 Fedora Update System 2026-05-18 18:12:51 UTC
FEDORA-2026-d420bebe72 (pcs-0.12.2-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-d420bebe72

Comment 5 Fedora Update System 2026-05-18 18:18:18 UTC
FEDORA-2026-a5176717a9 (pcs-0.12.2-2.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-a5176717a9

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

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

Comment 7 Fedora Update System 2026-05-19 02:44:17 UTC
FEDORA-2026-c0f7d885ee has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-c0f7d885ee`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-c0f7d885ee

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

Comment 8 Fedora Update System 2026-06-10 00:55:10 UTC
FEDORA-2026-d420bebe72 (pcs-0.12.2-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2026-06-10 01:08:35 UTC
FEDORA-2026-c0f7d885ee (pcs-0.12.2-2.fc43) has been pushed to the Fedora 43 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.