[Bug 2017853] Re: LXML dependency needs to be updated to fix segmentation fault

Sergio Durigan Junior 2017853 at bugs.launchpad.net
Tue May 9 23:57:46 UTC 2023


Thanks for the followup.

I read lxml's code and commits from 4.8.0 (the version we have in Jammy)
to 4.9.1 (the version you confirmed to be working).  There is really
nothing that stands out.  There are some minor things that caught my
attention, but I'm not convinced that any of them is related to this
issue.

The best scenario here would be to have a reproducer for this bug.  I
understand that this may not be possible/feasible, so I would like to
request more data from you:

- Could you provide more details about the stack trace?  For example,
were you able to obtain a stack trace for lxml as well, since the bug
happens there?

- Can you check if the segfault happens with version 4.9.0 from pip,
please?  And while you're at it, can you double check that you can still
reproduce the problem with version 4.8.0 *from pip*?

- I know that lxml needs C bindings to work, and it probably compiles
them when you install the package using pip.  I'm wondering if there's
some compiler flag that's affecting the bindings.  My first guess would
be LTO, but I noticed that it's not enabled for the build.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lxml in Ubuntu.
https://bugs.launchpad.net/bugs/2017853

Title:
  LXML dependency needs to be updated to fix segmentation fault

Status in crmsh package in Ubuntu:
  Incomplete
Status in lxml package in Ubuntu:
  Incomplete

Bug description:
  After upgrading our pacemaker/corosync cluster to Ubuntu 22.04 we had
  segmentation faults when running "crm configure". Using faulthandler
  to generate a python stacktrace yielded:

  Fatal Python error: Segmentation fault

  Current thread 0x00007efe7677a1c0 (most recent call first):
    File "/usr/lib/python3/dist-packages/crmsh/cibconfig.py", line 58 in show_unrecognized_elems
    File "/usr/lib/python3/dist-packages/crmsh/cibconfig.py", line 2779 in initialize
    File "/usr/lib/python3/dist-packages/crmsh/ui_configure.py", line 492 in requires
    File "/usr/lib/python3/dist-packages/crmsh/ui_context.py", line 265 in enter_level
    File "/usr/lib/python3/dist-packages/crmsh/ui_context.py", line 84 in run
    File "/usr/lib/python3/dist-packages/crmsh/main.py", line 196 in handle_noninteractive_use
    File "/usr/lib/python3/dist-packages/crmsh/main.py", line 249 in main_input_loop
    File "/usr/lib/python3/dist-packages/crmsh/main.py", line 370 in run
    File "/usr/sbin/crm", line 46 in <module>

  Extension modules: lxml._elementpath, lxml.etree (total: 2)
  Segmentation fault

  At that point, the code was using the findall method of lxml._Element
  to search through our (valid) cib configuration.

  Using pip3 install --upgrade lxml to update lxml to version 4.9.2
  solved this problem.

  I'm not really sure what specific bug was fixed, but I assume that it
  was this one in 4.9.1: https://lxml.de/4.9/changes-4.9.1.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/crmsh/+bug/2017853/+subscriptions




More information about the foundations-bugs mailing list