PyPy 5.0.0 dumps core with LXML 3.6.0

Issue #2260 resolved
Pim van der Eijk
created an issue

Running the attached script crashes PyPy. The exact crash differs.
One time I got:

Checking new party new_party_1 against new party new_party_100
Exception AssertionError: u'Tried to unregister unknown proxy' in 'lxml.etree._Element.dealloc' ignored
Exception AssertionError: u'Tried to unregister unknown proxy' in 'lxml.etree._Element.dealloc' ignored
Exception AssertionError: u'Tried to unregister unknown proxy' in 'lxml.etree._Element.dealloc' ignored
Exception AssertionError: u'Tried to unregister unknown proxy' in 'lxml.etree._Element.dealloc' ignored
Segmentation fault (core dumped)

A later time I got:

Checking new party new_party_0 against new party new_party_131
Exception AssertionError: u'Tried to unregister unknown proxy' in 'lxml.etree._Element.dealloc' ignored
Error in `python': corrupted double-linked list: 0x0000000004d84b30
Aborted (core dumped)

Comments (13)

  1. CharlieC

    I think I have something similar with openpyxl + lxml + PyPy

    The following will trigger a segfault on OS X

    import openpyxl # tested with 2.3.4
    from time import clock
    
    def time_openpyxl_optimised():
        " Run OpenPyXL in optimised mode. "
        start_time = clock()
    
        workbook = openpyxl.workbook.Workbook(write_only=True)
        worksheet = workbook.create_sheet()
    
        for row in range(1000 // 2):
            string_data = ("Row: %d Col: %d" % (row, col) for col in range(col_max))
            worksheet.append(string_data)
    
            num_data = (row + col for col in range(50))
            worksheet.append(num_data)
    
        workbook.save('openpyxl_opt.xlsx')
    
        elapsed = clock() - start_time
        print_elapsed_time('openpyxl   (optimised)', elapsed)
    
  2. Tristan Seligmann

    I've had lxml 3.6.0 and PyPy 5.0.1 (now 5.1) in production for quite a while now without seeing any crashes, as well as no crashes in my test suite, so I'm pretty sure we're all good here.

  3. Log in to comment