[pypy-issue] Issue #1955: Segfault on running program (pypy/pypy)

Stuart Axon issues-reply at bitbucket.org
Wed Jan 7 16:51:21 CET 2015


New issue 1955: Segfault on running program
https://bitbucket.org/pypy/pypy/issue/1955/segfault-on-running-program

Stuart Axon:

I'm running pypy 2.4.0 on Ubuntu Utopic.

Running the pypy works OK (though it outputs 'trusty' weirdly):

 $ pypy
Python 2.7.8 (2.4.0+dfsg-1~ppa2+trusty, Sep 25 2014, 04:35:04)
[PyPy 2.4.0 with GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>>

Running my program in it gives a segfault:

$ sbot
Segmentation fault


If I run in CPython then things are OK

$ sbot
usage: usage: sbot [options] inputfile.bot [args] [-h] [-o FILE] [-w] [-f]
                                                  [-t TITLE] [-s] [-dv]
                                                  [-p SERVERPORT] [-r REPEAT]
                                                  [-g GRAMMAR] [-c] [-v VARS]
                                                  script [script_args]
usage: sbot [options] inputfile.bot [args]: error: too few arguments



I got this out of gdb:

gdb -ex r --args `which pypy` `which sbot` 
GNU gdb (Ubuntu 7.8-1ubuntu4) 7.8.0.20141001-cvs
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-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"...
Reading symbols from /mnt/data/home/stu/.virtualenvs/shoebot-pgi-pypy/bin/pypy...(no debugging symbols found)...done.
Starting program: /mnt/data/home/stu/.virtualenvs/shoebot-pgi-pypy/bin/pypy /mnt/data/home/stu/.virtualenvs/shoebot-pgi-pypy/bin/sbot
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007fffecdb686e in std::_Rb_tree<std::string, std::pair<std::string const, std::pair<void const*, int> >, std::_Select1st<std::pair<std::string const, std::pair<void const*, int> > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::pair<void const*, int> > > >::_M_get_insert_unique_pos(std::string const&) ()
   from /usr/lib/x86_64-linux-gnu/libprotobuf.so.8
(gdb) 




Running bt to get the full stacktrace:

#0  0x00007fffecdb686e in std::_Rb_tree<std::string, std::pair<std::string const, std::pair<void const*, int> >, std::_Select1st<std::pair<std::string const, std::pair<void const*, int> > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::pair<void const*, int> > > >::_M_get_insert_unique_pos(std::string const&) ()
   from /usr/lib/x86_64-linux-gnu/libprotobuf.so.8
#1  0x00007fffecdb6ad1 in std::_Rb_tree<std::string, std::pair<std::string const, std::pair<void const*, int> >, std::_Select1st<std::pair<std::string const, std::pair<void const*, int> > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::pair<void const*, int> > > >::_M_insert_unique(std::pair<std::string const, std::pair<void const*, int> > const&) () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.8
#2  0x00007fffecdb7864 in google::protobuf::SimpleDescriptorDatabase::DescriptorIndex<std::pair<void const*, int> >::AddFile(google::protobuf::FileDescriptorProto const&, std::pair<void const*, int>) () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.8
#3  0x00007fffecdb410b in google::protobuf::EncodedDescriptorDatabase::Add(void const*, int) () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.8
#4  0x00007fffecd7b40a in google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int) () from /usr/lib/x86_64-linux-gnu/libprotobuf.so.8
#5  0x00007fffed24da62 in mir::protobuf::wire::protobuf_AddDesc_mir_5fprotobuf_5fwire_2eproto() () from /usr/lib/x86_64-linux-gnu/libmircommon.so.2
#6  0x00007ffff7dea13a in call_init (l=<optimised out>, argc=argc at entry=2, 
    argv=argv at entry=0x7fffffffdbf8, env=env at entry=0x7fffffffdc10) at dl-init.c:78
#7  0x00007ffff7dea223 in call_init (env=<optimised out>, argv=<optimised out>, 
    argc=<optimised out>, l=<optimised out>) at dl-init.c:36
#8  _dl_init (main_map=main_map at entry=0x307cf20, argc=2, argv=0x7fffffffdbf8, 
    env=0x7fffffffdc10) at dl-init.c:126
#9  0x00007ffff7deec6e in dl_open_worker (a=a at entry=0x7fffffff9938) at dl-open.c:577
#10 0x00007ffff7de9ff4 in _dl_catch_error (objname=objname at entry=0x7fffffff9928, 
    errstring=errstring at entry=0x7fffffff9930, 
    mallocedp=mallocedp at entry=0x7fffffff9920, 
    operate=operate at entry=0x7ffff7dee990 <dl_open_worker>, 
    args=args at entry=0x7fffffff9938) at dl-error.c:187
#11 0x00007ffff7dee3ab in _dl_open (file=0x40db880 "libgtk-3.so.0", mode=-2147483391, 
    caller_dlopen=<optimised out>, nsid=-2, argc=2, argv=0x7fffffffdbf8, 
    env=0x7fffffffdc10) at dl-open.c:661
#12 0x00007ffff7bd702b in dlopen_doit (a=a at entry=0x7fffffff9b50) at dlopen.c:66
#13 0x00007ffff7de9ff4 in _dl_catch_error (objname=0x335eec0, errstring=0x335eec8, 
    mallocedp=0x335eeb8, operate=0x7ffff7bd6fd0 <dlopen_doit>, args=0x7fffffff9b50)
    at dl-error.c:187
#14 0x00007ffff7bd762d in _dlerror_run (
    operate=operate at entry=0x7ffff7bd6fd0 <dlopen_doit>, 
    args=args at entry=0x7fffffff9b50) at dlerror.c:163
#15 0x00007ffff7bd70c1 in __dlopen (file=<optimised out>, mode=<optimised out>)
    at dlopen.c:87
#16 0x00007ffff25d2942 in g_module_open ()
   from /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
#17 0x00007ffff27e8775 in g_typelib_symbol () from /usr/lib/libgirepository-1.0.so.1
#18 0x00007ffff27e2af7 in g_registered_type_info_get_g_type ()
   from /usr/lib/libgirepository-1.0.so.1
#19 0x00007ffff6e72afe in ffi_call_unix64 ()
   from /usr/lib/x86_64-linux-gnu/libffi.so.6
#20 0x00007ffff6e72568 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#21 0x000000000050bc97 in ?? ()
#22 0x000000000129dee2 in ?? ()
#23 0x00000000010e2b3c in ?? ()
#24 0x00000000010e4f48 in ?? ()
#25 0x0000000000844886 in ?? ()
#26 0x0000000000841d8b in ?? ()
#27 0x0000000000711ae6 in ?? ()
#28 0x0000000000bd6cbe in ?? ()
#29 0x00000000007325db in ?? ()
#30 0x000000000073ca98 in ?? ()
#31 0x000000000073f275 in ?? ()
#32 0x0000000000b98bce in ?? ()
#33 0x0000000000fd88a1 in ?? ()
#34 0x0000000000517354 in ?? ()
#35 0x0000000000e851b0 in ?? ()
#36 0x0000000000e858b4 in ?? ()
#37 0x0000000000e85dc0 in ?? ()
#38 0x0000000000e8b97d in ?? ()
#39 0x0000000000e8bcc8 in ?? ()
#40 0x0000000000e8c081 in ?? ()
#41 0x0000000000e8c9f3 in ?? ()
#42 0x0000000000e97ac8 in ?? ()
#43 0x00000000010267c4 in ?? ()
#44 0x0000000001026b51 in ?? ()
#45 0x0000000000fd87de in ?? ()
#46 0x000000000072605f in ?? ()
#47 0x000000000072647d in ?? ()
#48 0x0000000000bd6cbe in ?? ()
#49 0x00000000006ec6f5 in ?? ()
#50 0x000000000073295e in ?? ()
#51 0x000000000073c835 in ?? ()
#52 0x000000000073f275 in ?? ()
#53 0x0000000000b98bce in ?? ()
#54 0x0000000000fd88a1 in ?? ()
#55 0x000000000072605f in ?? ()
#56 0x000000000072647d in ?? ()
#57 0x0000000000bd8721 in ?? ()
#58 0x0000000000d0833b in ?? ()
#59 0x000000000073c1ad in ?? ()
#60 0x000000000073f275 in ?? ()
#61 0x0000000000b98bce in ?? ()
#62 0x0000000000fd88a1 in ?? ()
#63 0x000000000072605f in ?? ()
#64 0x000000000072647d in ?? ()
#65 0x000000000073295e in ?? ()
#66 0x000000000073c835 in ?? ()
#67 0x000000000073f275 in ?? ()
#68 0x0000000000b98bce in ?? ()
#69 0x0000000000fd88a1 in ?? ()
#70 0x000000000072605f in ?? ()
#71 0x000000000072647d in ?? ()
#72 0x0000000000bd80c6 in ?? ()
#73 0x0000000000a4bc99 in ?? ()
#74 0x0000000000a4d5fe in ?? ()
#75 0x0000000000a4ee68 in ?? ()
#76 0x0000000000711ae6 in ?? ()
#77 0x00000000007325db in ?? ()
#78 0x000000000073c835 in ?? ()
#79 0x000000000073f275 in ?? ()
#80 0x0000000000b98bce in ?? ()
#81 0x0000000000fd88a1 in ?? ()
#82 0x000000000072605f in ?? ()
#83 0x000000000072647d in ?? ()
#84 0x000000000073295e in ?? ()
#85 0x000000000073c835 in ?? ()
#86 0x000000000073f275 in ?? ()
#87 0x0000000000b98bce in ?? ()
#88 0x0000000000fd88a1 in ?? ()
#89 0x000000000072605f in ?? ()
#90 0x000000000072647d in ?? ()
#91 0x000000000073295e in ?? ()
#92 0x000000000073c835 in ?? ()
#93 0x000000000073f275 in ?? ()
#94 0x0000000000b98bce in ?? ()
#95 0x0000000000fd88a1 in ?? ()
#96 0x000000000072605f in ?? ()
#97 0x000000000072647d in ?? ()
#98 0x0000000000bd80c6 in ?? ()
#99 0x000000000078e74b in ?? ()
#100 0x00000000004696b9 in ?? ()
#101 0x0000000000711ae6 in ?? ()
#102 0x000000000073295e in ?? ()
#103 0x000000000073c835 in ?? ()
#104 0x000000000073f275 in ?? ()
#105 0x0000000000b98bce in ?? ()
#106 0x0000000000fd88a1 in ?? ()
#107 0x000000000072605f in ?? ()
#108 0x000000000072647d in ?? ()
#109 0x0000000000bd80c6 in ?? ()
#110 0x000000000073c1ad in ?? ()
#111 0x000000000073f275 in ?? ()
#112 0x0000000000b98bce in ?? ()
#113 0x0000000000fd88a1 in ?? ()
#114 0x000000000072605f in ?? ()
#115 0x000000000072647d in ?? ()
#116 0x0000000000a48f0b in ?? ()
#117 0x0000000000a49a83 in ?? ()
#118 0x0000000000a4c8e2 in ?? ()
#119 0x0000000000a4ceab in ?? ()
#120 0x0000000000a4d633 in ?? ()
#121 0x0000000000a4ee68 in ?? ()
#122 0x0000000000711ae6 in ?? ()
#123 0x00000000007325db in ?? ()
#124 0x000000000073c835 in ?? ()
#125 0x000000000073f275 in ?? ()
#126 0x0000000000b98bce in ?? ()
#127 0x0000000000fd88a1 in ?? ()
#128 0x000000000072605f in ?? ()
#129 0x000000000072647d in ?? ()
#130 0x0000000000bfda9e in ?? ()
#131 0x000000000073cdbe in ?? ()
#132 0x000000000073f275 in ?? ()
#133 0x0000000000b98bce in ?? ()
#134 0x0000000000fd88a1 in ?? ()
#135 0x000000000072605f in ?? ()
#136 0x000000000072647d in ?? ()
#137 0x00000000006dc0de in ?? ()
#138 0x0000000000bfce3c in ?? ()
#139 0x0000000000a4c8ff in ?? ()
#140 0x0000000000a4d236 in ?? ()
#141 0x0000000000a4d633 in ?? ()
#142 0x0000000000a4ee68 in ?? ()
#143 0x0000000000711ae6 in ?? ()
#144 0x00000000006e26b4 in ?? ()
#145 0x0000000000734085 in ?? ()
#146 0x000000000073c246 in ?? ()
#147 0x000000000073f275 in ?? ()
#148 0x0000000000b98bce in ?? ()
#149 0x0000000000fd88a1 in ?? ()
#150 0x000000000072605f in ?? ()
#151 0x000000000072647d in ?? ()
#152 0x0000000000a48f0b in ?? ()
#153 0x0000000000a49a83 in ?? ()
#154 0x0000000000a4c8e2 in ?? ()
#155 0x0000000000a4ceab in ?? ()
#156 0x0000000000a4d633 in ?? ()
#157 0x0000000000a4f274 in ?? ()
#158 0x0000000000711ae6 in ?? ()
#159 0x00000000006e26b4 in ?? ()
#160 0x0000000000734085 in ?? ()
#161 0x000000000073c246 in ?? ()
#162 0x000000000073f275 in ?? ()
#163 0x0000000000b98bce in ?? ()
#164 0x0000000000fd88a1 in ?? ()
#165 0x000000000072605f in ?? ()
#166 0x000000000072647d in ?? ()
#167 0x0000000000a48f0b in ?? ()
#168 0x0000000000a49a83 in ?? ()
#169 0x0000000000a49c08 in ?? ()
#170 0x0000000000a4c8e2 in ?? ()
#171 0x0000000000a4ceab in ?? ()
#172 0x0000000000a4d633 in ?? ()
#173 0x0000000000a4f274 in ?? ()
#174 0x0000000000711ae6 in ?? ()
#175 0x00000000006e26b4 in ?? ()
#176 0x0000000000734085 in ?? ()
#177 0x000000000073c246 in ?? ()
#178 0x000000000073f275 in ?? ()
#179 0x0000000000b98bce in ?? ()
---Type <return> to continue, or q <return> to quit---
#180 0x0000000000fd88a1 in ?? ()
#181 0x000000000072605f in ?? ()
#182 0x000000000072647d in ?? ()
#183 0x0000000000a48f0b in ?? ()
#184 0x0000000000a49a83 in ?? ()
#185 0x0000000000a49c08 in ?? ()
#186 0x0000000000a4c8e2 in ?? ()
#187 0x0000000000a4ceab in ?? ()
#188 0x0000000000a4d633 in ?? ()
#189 0x0000000000a4f274 in ?? ()
#190 0x0000000000711ae6 in ?? ()
#191 0x00000000006e26b4 in ?? ()
#192 0x0000000000734085 in ?? ()
#193 0x000000000073c246 in ?? ()
#194 0x000000000073f275 in ?? ()
#195 0x0000000000b98bce in ?? ()
#196 0x0000000000fd88a1 in ?? ()
#197 0x000000000072605f in ?? ()
#198 0x000000000072647d in ?? ()
#199 0x0000000000733604 in ?? ()
#200 0x000000000073b7f6 in ?? ()
#201 0x000000000073f275 in ?? ()
#202 0x0000000000b98bce in ?? ()
#203 0x0000000000fd88a1 in ?? ()
#204 0x000000000072605f in ?? ()
#205 0x000000000072647d in ?? ()
#206 0x00000000007325db in ?? ()
#207 0x000000000073cb9c in ?? ()
#208 0x000000000073f275 in ?? ()
#209 0x0000000000b98bce in ?? ()
#210 0x0000000000fd88a1 in ?? ()
#211 0x000000000072605f in ?? ()
#212 0x000000000072647d in ?? ()
#213 0x00000000007325db in ?? ()
#214 0x000000000073ca98 in ?? ()
#215 0x000000000073f275 in ?? ()
#216 0x0000000000b98bce in ?? ()
#217 0x0000000000fd88a1 in ?? ()
#218 0x000000000072605f in ?? ()
#219 0x000000000072647d in ?? ()
#220 0x00000000007325db in ?? ()
#221 0x000000000073cb15 in ?? ()
---Type <return> to continue, or q <return> to quit---
#222 0x000000000073f275 in ?? ()
#223 0x0000000000b98bce in ?? ()
#224 0x0000000000fd88a1 in ?? ()
#225 0x000000000072605f in ?? ()
#226 0x000000000072647d in ?? ()
#227 0x00000000006dc0de in ?? ()
#228 0x00000000006505e5 in ?? ()
#229 0x0000000001297aa5 in ?? ()
#230 0x00007ffff5c05ec5 in __libc_start_main (main=0x413710, argc=2, 
    argv=0x7fffffffdbf8, init=<optimised out>, fini=<optimised out>, 
    rtld_fini=<optimised out>, stack_end=0x7fffffffdbe8) at libc-start.c:287
#231 0x000000000041373e in ?? ()




More information about the pypy-issue mailing list