[pypy-dev] Segfault with pypy-2.0, gevent, dnspython

Emil Kroymann emil.kroymann at isaco.de
Sun May 12 14:50:59 CEST 2013


Hi List,

I discovered a segementation fault with pypy-2.0 and gevent, while
playing with the dnspython library. I compiled pypy from the source
tarball downloaded from the pypy website with jit enabled and installed
gevent with pypy support as described in the pypycore repository.

Below is a log of the simple steps needed to reproduce the problem.
From the generated core file, it seems, the problem occurs in the
minimark gc. I also attached the core file to this mail.

Regards,
Emil


(pypy-gevent)emil at descartes:~/Play/pypy-gevent/test$ ulimit -c unlimited
(pypy-gevent)emil at descartes:~/Play/pypy-gevent/test$ python
Python 2.7.3 (b9c3566aa0170aaa736db0491d542c309ec7a5dc, May 12 2013, 11:22:30)
[PyPy 2.0.0 with GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``All problems in computer science
can be solved by another level of indirection. --Butler Lampson''
>>>> from gevent import monkey; monkey.patch_all()
>>>> from dns.resolver import query
>>>> a = query('www.google.de')
*** using ev loop
>>>> dir(a)
Speicherzugriffsfehler (Speicherabzug geschrieben)
(pypy-gevent)emil at descartes:~/Play/pypy-gevent/test$ gdb --core core --args python
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 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-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/emil/.virtualenvs/pypy-gevent/bin/python...(no debugging symbols found)...done.
[New LWP 3216]

warning: Can't read pathname for load map: Eingabe-/Ausgabefehler.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `python'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000110b2a4 in pypy_g_walk_to_parent_frame ()
(gdb) bt
#0  0x000000000110b2a4 in pypy_g_walk_to_parent_frame ()
#1  0x000000000110b75c in pypy_g_walk_stack_from ()
#2  0x000000000110b899 in pypy_g__asm_callback ()
#3  0x000000000130b725 in pypy_asm_stackwalk ()
#4  0x0000000001104f32 in pypy_g_MiniMarkGC_minor_collection.part.1 ()
#5  0x00000000011099f8 in pypy_g_MiniMarkGC_collect_and_reserve ()
#6  0x0000000000ee4482 in pypy_g_invalidate_loop ()
#7  0x000000000104f85f in pypy_g_QuasiImmut_invalidate ()
#8  0x0000000000cdbdc3 in pypy_g_ModuleDictStrategy_setitem_str ()
#9  0x0000000000419539 in pypy_g___mm_setitem_W_DictMultiObject_W_Root_W_Root ()
#10 0x0000000000c9a3ff in pypy_g_displayhook ()
#11 0x0000000000849ede in pypy_g_BuiltinCode1_fastcall_1 ()
#12 0x00000000008475b0 in pypy_g_funccall_valuestack__AccessDirect_None ()
#13 0x000000000086a86c in pypy_g_CALL_FUNCTION__AccessDirect_None ()
#14 0x000000000087357f in pypy_g_dispatch_bytecode__AccessDirect_None ()
#15 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#16 0x0000000000c827a2 in pypy_g_portal_4 ()
#17 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#18 0x000000000085e826 in pypy_g_PyFrame_run ()
#19 0x000000000080a67b in pypy_g_call_function__star_1 ()
#20 0x0000000000872295 in pypy_g_dispatch_bytecode__AccessDirect_None ()
#21 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#22 0x0000000000c827a2 in pypy_g_portal_4 ()
#23 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#24 0x000000000085e826 in pypy_g_PyFrame_run ()
#25 0x000000000086cff4 in pypy_g_EXEC_STMT__AccessDirect_None ()
#26 0x00000000008726aa in pypy_g_dispatch_bytecode__AccessDirect_None ()
#27 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#28 0x0000000000c827a2 in pypy_g_portal_4 ()
#29 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#30 0x000000000085e826 in pypy_g_PyFrame_run ()
#31 0x0000000000cda8ba in pypy_g_CALL_METHOD__AccessDirect_star_1 ()
#32 0x0000000000873867 in pypy_g_dispatch_bytecode__AccessDirect_None ()
#33 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#34 0x0000000000c827a2 in pypy_g_portal_4 ()
#35 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#36 0x000000000085e826 in pypy_g_PyFrame_run ()
#37 0x0000000000cda8ba in pypy_g_CALL_METHOD__AccessDirect_star_1 ()
---Type <return> to continue, or q <return> to quit---
#38 0x0000000000873867 in pypy_g_dispatch_bytecode__AccessDirect_None ()
#39 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#40 0x0000000000c827a2 in pypy_g_portal_4 ()
#41 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#42 0x000000000085e826 in pypy_g_PyFrame_run ()
#43 0x0000000000cda8ba in pypy_g_CALL_METHOD__AccessDirect_star_1 ()
#44 0x0000000000873867 in pypy_g_dispatch_bytecode__AccessDirect_None ()
#45 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#46 0x0000000000c827a2 in pypy_g_portal_4 ()
#47 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#48 0x000000000085e826 in pypy_g_PyFrame_run ()
#49 0x000000000086a86c in pypy_g_CALL_FUNCTION__AccessDirect_None ()
#50 0x000000000087357f in pypy_g_dispatch_bytecode__AccessDirect_None ()
#51 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#52 0x0000000000c827a2 in pypy_g_portal_4 ()
#53 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#54 0x000000000085e826 in pypy_g_PyFrame_run ()
#55 0x0000000000cb71fd in pypy_g_call_args ()
#56 0x000000000086a74e in pypy_g_call_function__AccessDirect_None ()
#57 0x000000000087375c in pypy_g_dispatch_bytecode__AccessDirect_None ()
#58 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#59 0x0000000000c827a2 in pypy_g_portal_4 ()
#60 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#61 0x000000000085e826 in pypy_g_PyFrame_run ()
#62 0x00000000008473d3 in pypy_g_funccall_valuestack__AccessDirect_None ()
#63 0x000000000086a86c in pypy_g_CALL_FUNCTION__AccessDirect_None ()
#64 0x000000000087357f in pypy_g_dispatch_bytecode__AccessDirect_None ()
#65 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#66 0x0000000000c827a2 in pypy_g_portal_4 ()
#67 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#68 0x000000000085e826 in pypy_g_PyFrame_run ()
#69 0x0000000000cb71fd in pypy_g_call_args ()
#70 0x000000000086a74e in pypy_g_call_function__AccessDirect_None ()
#71 0x000000000087370f in pypy_g_dispatch_bytecode__AccessDirect_None ()
#72 0x0000000000876583 in pypy_g_handle_bytecode__AccessDirect_None ()
#73 0x0000000000c827a2 in pypy_g_portal_4 ()
#74 0x0000000001067113 in pypy_g_ll_portal_runner__Unsigned_Bool_pypy_interpreter ()
#75 0x000000000085e826 in pypy_g_PyFrame_run ()
---Type <return> to continue, or q <return> to quit---
#76 0x000000000080a9ce in pypy_g_call_function__star_2 ()
#77 0x0000000000763aea in pypy_g_entry_point ()
#78 0x0000000001306234 in pypy_main_function ()
#79 0x00007f84c489476d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#80 0x0000000000411c91 in _start ()
(gdb) quit


-- 
Emil Kroymann
VoIP Services Engineer

Email: emil.kroymann at isaco.de
Tel: +49-30-203899885
Mobile: +49-151-62820588

ISACO GmbH
Kurfürstenstraße 79
10787 Berlin
Germany

Amtsgericht Charlottenburg, HRB 112464B
Geschäftsführer: Daniel Frommherz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.gz
Type: application/x-gzip
Size: 7176935 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130512/b89fac1c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130512/b89fac1c/attachment-0001.pgp>


More information about the pypy-dev mailing list