[pypy-issue] Issue #2004: 2.4.0 crash while running a SAX parser (pypy/pypy)

Jacek Wielemborek issues-reply at bitbucket.org
Thu Mar 19 20:01:43 CET 2015


New issue 2004: 2.4.0 crash while running a SAX parser
https://bitbucket.org/pypy/pypy/issue/2004/240-crash-while-running-a-sax-parser

Jacek Wielemborek:

While trying out my SAX parser of Wikipedia dumps, I came across a SIGABRT crash that produced the attached core dump. I also attach the script. I ran the following command:

```
7z x enwiki-20150112-pages-meta-history19.xml-p010818420p011015153.7z  -so 2>/dev/null | pv -cN in | pypy sax.py | pv -lcN out >/dev/null
```

Here's the backtrace:

```
$ gdb core.21562                                                         
GNU gdb (GDB) Fedora 7.8.2-38.fc21
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
[New LWP 21562]
Reading symbols from /usr/lib64/pypy-2.4.0/pypy...Reading symbols from /usr/lib/debug/usr/lib64/pypy-2.4.0/pypy.debug...done.
done.
Missing separate debuginfo for 
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/87/63004aa1bfc30b2999e47e1c66640a5ea919f5
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `pypy sax.py'.
Program terminated with signal SIGABRT, Aborted.
#0  0x0000003f3de348d7 in __GI_raise (sig=sig at entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:55
55        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Missing separate debuginfos, use: debuginfo-install expat-2.1.0-10.fc21.x86_64 libffi-3.1-7.fc21.x86_64 ncurses-libs-5.9-16.20140323.fc21.x86_64
(gdb) bt
#0  0x0000003f3de348d7 in __GI_raise (sig=sig at entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x0000003f3de3653a in __GI_abort () at abort.c:89
#2  0x0000003f3de2d47d in __assert_fail_base (fmt=0x3f3df86cb8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion at entry=0x14e2ace "(rpy_fastgil != 0)", 
    file=file at entry=0x14e2b10 "/builddir/build/BUILD/pypy-2.4.0-src/rpython/translator/c/src/thread_gil.c", line=line at entry=0x8a, 
    function=function at entry=0x14e2df0 <__PRETTY_FUNCTION__.4962> "RPyGilYieldThread") at assert.c:92
#3  0x0000003f3de2d532 in __GI___assert_fail (assertion=assertion at entry=0x14e2ace "(rpy_fastgil != 0)", 
    file=file at entry=0x14e2b10 "/builddir/build/BUILD/pypy-2.4.0-src/rpython/translator/c/src/thread_gil.c", line=line at entry=0x8a, 
    function=function at entry=0x14e2df0 <__PRETTY_FUNCTION__.4962> "RPyGilYieldThread") at assert.c:101
#4  0x000000000142f236 in RPyGilYieldThread () at /usr/src/debug/pypy-2.4.0-src/rpython/translator/c/src/thread_gil.c:138
#5  0x0000000000cc5619 in pypy_g_do_yield_thread () at pypy_module_thread_gil.c:63
#6  0x0000000000787205 in pypy_g_action_dispatcher__AccessDirect_None (l_ec_7=<optimized out>, l_frame_16=l_frame_16 at entry=0x7fda08898a30)
    at pypy_interpreter_executioncontext.c:4421
#7  0x00000000007c8909 in pypy_g_dispatch_bytecode__AccessDirect_None (l_self_13841=l_self_13841 at entry=0x7fda08898a30, l_co_code_3=0x7fda081bd610, 
    l_next_instr_4=<optimized out>, l_ec_18=<optimized out>) at pypy_interpreter_pyopcode.c:13030
#8  0x00000000007cef61 in pypy_g_handle_bytecode__AccessDirect_None (l_self_13840=l_self_13840 at entry=0x7fda08898a30, l_co_code_2=<optimized out>, 
    l_next_instr_53=<optimized out>, l_ec_17=<optimized out>) at pypy_interpreter_pyopcode.c:3504
#9  0x0000000000c9fdb6 in pypy_g_portal_5 (l_next_instr_1=<optimized out>, l_next_instr_1 at entry=0x52, l_v4896=l_v4896 at entry=0x0, l_pycode_12=<optimized out>, 
    l_self_15238=0x7fda08898a30, l_ec_9=<optimized out>) at pypy_module_pypyjit_interp_jit.c:300
#10 0x000000000114fd6a in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter (l_stararg0_3080=<error reading variable: value has been optimized out>, 
    l_stararg1_2854=<error reading variable: value has been optimized out>, l_stararg2_1378=<optimized out>, 
    l_stararg2_1378 at entry=<error reading variable: value has been optimized out>, l_stararg3_834=<optimized out>, 
    l_stararg3_834 at entry=<error reading variable: value has been optimized out>, l_stararg4_608=<optimized out>, 
    l_stararg4_608 at entry=<error reading variable: value has been optimized out>) at rpython_jit_metainterp_warmspot.c:1853
#11 0x0000000000546834 in pypy_g_call_stub_4 (l_func_127=<optimized out>, l_args_i_7=<optimized out>, l_args_r_7=<optimized out>, l_args_f_7=<optimized out>)
    at implement_8.c:58580
#12 0x0000000000fc0243 in pypy_g_bhimpl_jit_merge_point__star_6 (l_self_17131=0x543a, l_jdindex_7=0x543a, l_v2097422=0x6, l_stararg1_1471=0xffffffffffffffff, 
    l_v2097425=0x3bb6c90, l_stararg3_518=0xfefefefefefefeff, l_stararg4_369=0x7fda08898c10, l_v2097423=0x7fda08898c30) at rpython_jit_metainterp_blackhole.c:43588
#13 0x0000000000fc0b3a in pypy_g_handler_jit_merge_point_1 (l_self_17043=0x543a, l_self_17043 at entry=0x7fda0846ff20, l_code_302=0x543a, 
    l_code_302 at entry=0x1c60a00 <pypy_g_rpy_string_9052>, l_position_241=0x13) at rpython_jit_metainterp_blackhole.c:8645
#14 0x0000000000fc0fab in pypy_g_dispatch_loop (l_self_17042=l_self_17042 at entry=0x7fda0846ff20, l_code_301=0x1c60a00 <pypy_g_rpy_string_9052>, l_position_237=<optimized out>)
    at rpython_jit_metainterp_blackhole.c:4125
#15 0x0000000000fc5182 in pypy_g_BlackholeInterpreter_run (l_self_17039=l_self_17039 at entry=0x7fda0846ff20) at rpython_jit_metainterp_blackhole.c:2477
#16 0x0000000000fc5387 in pypy_g_BlackholeInterpreter__resume_mainloop (l_v2079143=0x7fda0846ff20, l_v2079152=l_v2079152 at entry=0x0) at rpython_jit_metainterp_blackhole.c:1548
#17 0x0000000000fc5738 in pypy_g__run_forever (l_blackholeinterp_0=l_blackholeinterp_0 at entry=0x7fda070942a0, l_current_exc_0=<optimized out>)
    at rpython_jit_metainterp_blackhole.c:800
#18 0x0000000000fc5e63 in pypy_g_resume_in_blackhole (l_jitdriver_sd_686=l_jitdriver_sd_686 at entry=0x1c5bec0 <pypy_g_pbc_345>, l_resumedescr_4=<optimized out>, 
    l_deadframe_121=<optimized out>, l_all_virtuals_1=l_all_virtuals_1 at entry=0x0) at rpython_jit_metainterp_blackhole.c:47894
#19 0x0000000000fd3b34 in pypy_g_ResumeGuardDescr_handle_fail (l_self_12635=<optimized out>, l_deadframe_128=<optimized out>, l_jitdriver_sd_696=0x1c5bec0 <pypy_g_pbc_345>)
    at rpython_jit_metainterp_compile.c:26215
#20 0x00000000012139ff in pypy_g_execute_assembler__star_3_15 (l_loop_token_126=<optimized out>, l_stararg0_1229=l_stararg0_1229 at entry=0x1, 
    l_stararg1_857=l_stararg1_857 at entry=0x3dac4d6, l_stararg2_551=l_stararg2_551 at entry=0x26) at rpython_jit_metainterp_warmstate_2.c:46649
#21 0x00000000011d3520 in pypy_g_maybe_compile_and_run__star_3_15 (l_increment_threshold_154=<optimized out>, l_v2498716=l_v2498716 at entry=0x1, 
    l_v2498715=l_v2498715 at entry=0x3dac4d6 "2602:306:3B6E:16B0:8DB1:DAFD:D4A1:A711</ip>\n      </contributor>\n      <comment>minor grammar edit.</comment>\n      <model>wikitext</model>\n      <format>text/x-wiki</format>\n      <text xml:space=\"pr"..., l_v2498717=l_v2498717 at entry=0x26) at rpython_jit_metainterp_warmstate_1.c:20114
#22 0x00000000011660f7 in pypy_g_ll_portal_runner__arrayPtr_arrayPtr_INT_star_3_1 (l_stararg0_3133=l_stararg0_3133 at entry=0x1, 
    l_stararg1_2906=l_stararg1_2906 at entry=0x3dac4d6 "2602:306:3B6E:16B0:8DB1:DAFD:D4A1:A711</ip>\n      </contributor>\n      <comment>minor grammar edit.</comment>\n      <model>wikitext</model>\n      <format>text/x-wiki</format>\n      <text xml:space=\"pr"..., l_stararg2_1430=l_stararg2_1430 at entry=0x26) at rpython_jit_metainterp_warmspot.c:39772
#23 0x0000000000640d35 in pypy_g_callback_with_jitdriver_45 (l_a0_254=l_a0_254 at entry=0x1, 
    l_a1_165=l_a1_165 at entry=0x3dac4d6 "2602:306:3B6E:16B0:8DB1:DAFD:D4A1:A711</ip>\n      </contributor>\n      <comment>minor grammar edit.</comment>\n      <model>wikitext</mo---Type <return> to continue, or q <return> to quit---
del>\n      <format>text/x-wiki</format>\n      <text xml:space=\"pr"..., l_a2_89=l_a2_89 at entry=0x26) at implement_15.c:48673
#24 0x00000000005ee39b in pypy_g_wrapper_23 (l_a0_157=0x1, 
    l_a1_316=0x3dac4d6 "2602:306:3B6E:16B0:8DB1:DAFD:D4A1:A711</ip>\n      </contributor>\n      <comment>minor grammar edit.</comment>\n      <model>wikitext</model>\n      <format>text/x-wiki</format>\n      <text xml:space=\"pr"..., l_a2_54=0x26) at implement_13.c:35090
#25 0x0000003f4260b1e6 in doContent () from /lib64/libexpat.so.1
#26 0x0000003f4260b90c in contentProcessor () from /lib64/libexpat.so.1
#27 0x0000003f4260d970 in XML_ParseBuffer () from /lib64/libexpat.so.1
#28 0x00007fda082fad11 in ?? ()
#29 0x00007fda082fa298 in ?? ()
#30 0x00007fda08209ec0 in ?? ()
#31 0x0000000000000002 in ?? ()
#32 0x0000000001c6f3c0 in ?? ()
#33 0x0000000000000001 in ?? ()
#34 0x0000000001c6f3c0 in ?? ()
#35 0x0000000000000001 in ?? ()
#36 0x000000000146c314 in ?? ()
#37 0x0000000000000002 in ?? ()
#38 0x0000000001c6f3c0 in ?? ()
#39 0x0000000000000001 in ?? ()
#40 0x000000000079563e in pypy_g_funccall_valuestack__AccessDirect_None (l_self_13759=0x543a, l_nargs_20=0x543a, l_frame_57=0x6) at pypy_interpreter_function.c:22035
#41 0x0000000000000049 in ?? ()
#42 0x0000000000000000 in ?? ()
(gdb) 
```

When the issue gets closed, please remove the core file as I guess it might leak private information.




More information about the pypy-issue mailing list