[issue24228] Interpreter triggers segmentation fault at the starting

2015-06-09 Thread doz

doz added the comment:

The problem is only present with gcc optimization -Os . Not present with -O0 
,O1, O2, O3.

Do you have an idea of the gcc pass responsible to that ? 

(I have also a similar problem with openssl)

regards

--
resolution:  -> third party

___
Python tracker 
<http://bugs.python.org/issue24228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24228] Interpreter triggers segmentation fault at the starting

2015-05-18 Thread doz

New submission from doz:

Hello,

Python 3.4.2 triggers  a segmentation fault  at the starting on my ARM9 
platform. 
Crash occurs  also with 3.3.  The version 2.7 don't crash and seems to work 
correctly
System is built with buildroot-2015.02 and gcc  4.2.1.  
Fault is always reproducible.

Please find the following information about the crash and the conditions. 
Do you know restrictions with old kernel version and python ?

On target :
# uname -a
Linux buildroot 2.6.30.10 #mvl-avb-0.8 Mon May 18 16:02:40 CEST 2015 armv5tejl 
GNU/Linux  
# python --version
Python 3.4.2
 
# python
Segmentation fault (core dumped)

on host, I analyze core dump 

$ arm-none-linux-gnueabi-gdb -ex 'set sysroot .' -ex 'core-file ./core' 
usr/bin/python
GNU gdb (CodeSourcery Sourcery G++ Lite 2007q3-51) 6.6.50.20070821-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu 
--target=arm-none-linux-gnueabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>.
..
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/usr/lib/libpython3.4m.so.1.0...done.
Loaded symbols for ./usr/lib/libpython3.4m.so.1.0
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/lib/libpthread.so.0...done.
Loaded symbols for ./lib/libpthread.so.0
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/lib/libdl.so.2...done.
Loaded symbols for ./lib/libdl.so.2
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/lib/libutil.so.1...done.
Loaded symbols for ./lib/libutil.so.1
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/lib/libm.so.6...done.
Loaded symbols for ./lib/libm.so.6
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/lib/libc.so.6...done.
Loaded symbols for ./lib/libc.so.6
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/lib/libgcc_s.so.1...done.
Loaded symbols for ./lib/libgcc_s.so.1
Reading symbols from 
/home/xxx/projects/YYY/buildroot-2015.02/output/target/lib/ld-linux.so.3...done.
Loaded symbols for ./lib/ld-linux.so.3
Core was generated by `python'.
Program terminated with signal 11, Segmentation fault.
#0  insertdict (mp=0x4041e058, key=0x4041f020, hash=1075606564, 
value=0x4041d540) at Objects/dictobject.c:824
824 Py_DECREF(old_value); /* which **CAN** re-enter (see issue 
#22653) */
(gdb) bt
#0  insertdict (mp=0x4041e058, key=0x4041f020, hash=1075606564, 
value=0x4041d540) at Objects/dictobject.c:824
#1  0x400a3be0 in add_subclass (base=, type=0x401c7424) at 
Objects/typeobject.c:4789
#2  0x400abb18 in PyType_Ready (type=0x401c7424) at Objects/typeobject.c:4745
#3  0x40094534 in _Py_ReadyTypes () at Objects/object.c:1546
#4  0x40116aec in _Py_InitializeEx_Private (install_sigs=1, 
install_importlib=1) at Python/pythonrun.c:382
#5  0x401263a8 in Py_Main (argc=1076832428, argv=0x11008) at Modules/main.c:654
#6  0x88f4 in main (argc=1, argv=0x402fb844) at ./Modules/python.c:69

(gdb) info locals
old_value = (PyObject *) 0x1
value_addr = (PyObject **) 0x400a3be0
ep = (PyDictKeyEntry *) 0x11390

(gdb) list
819 MAINTAIN_TRACKING(mp, key, value);
820 old_value = *value_addr;
821 if (old_value != NULL) {
822 assert(ep->me_key != NULL && ep->me_key != dummy);
823 *value_addr = value;
824 Py_DECREF(old_value); /* which **CAN** re-enter (see issue 
#22653) */
825 }
826 else {
827 if (ep->me_key == NULL) {
828 Py_INCREF(key);

./arm-none-linux-gnueabi-gcc --version
arm-none-linux-gnueabi-gcc (CodeSourcery Sourcery G++ Lite 2007q3-51) 4.2.1
Copyright (C) 2007 Free Software Foundation, Inc.

Thank your for your help

--
components: Interpreter Core
messages: 243490
nosy: mdootb
priority: normal
severity: normal
status: open
title: Interpreter triggers  segmentation fault  at the starting
type: crash
versions: Python 3.3, Python 3.4

___
Python tracker 
<http://bugs.python.org/issue24228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24228] Interpreter triggers segmentation fault at the starting

2015-05-18 Thread doz

doz added the comment:

I already try to apply patches from http://bugs.python.org/issue22653 . It 
don't solve problem.

--

___
Python tracker 
<http://bugs.python.org/issue24228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24228] Interpreter triggers segmentation fault at the starting

2015-05-19 Thread doz

doz added the comment:

I manually disabled xxlimited (file xxlimited.c removed , and lines in setup.py 
 commented) because : 

In file included from ./Include/Python.h:68,
 from /build/python3-3.4.2/Modules/xxlimited.c:17:
./Include/object.h:65:2: error: #error Py_LIMITED_API is incompatible with 
Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

So python has been rebuilt with option  -with-pydebug 
Now, I don't have segfault thanks to assert of line 821

#python
python: Objects/dictobject.c:821: insertdict: Assertion `ep->me_key != ((void 
*)0) && ep->me_key != (&_dummy_struct)' failed.
Aborted

buildroot-2015.02 set the following configuration options :
./configure --target=arm-buildroot-linux-gnueabi 
--host=arm-buildroot-linux-gnueabi --build=x86_64-unknown-linux-gnu 
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var 
--program-prefix="" --enable-ipv6  --enable-shared  --disable-curses 
--with-libmpdec=none --with-expat=none --enable-old-stdlib-cache 
--disable-sqlite3 --disable-codecs-cjk --disable-ossaudiodev --with-pydebug 
--without-ensurepip --without-cxx-main --with-system-ffi --disable-pydoc 
--disable-test-modules --disable-lib2to3 --disable-tk --disable-nis 
--disable-idle3 –disable-pyo-build

--

___
Python tracker 
<http://bugs.python.org/issue24228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24228] Interpreter triggers segmentation fault at the starting

2015-05-19 Thread doz

doz added the comment:

value of ep->me_key equals 0

--

___
Python tracker 
<http://bugs.python.org/issue24228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24228] Interpreter triggers segmentation fault at the starting

2015-05-19 Thread doz

doz added the comment:

Problem also present with only configuration option :
 --enable-ipv6  --enable-shared  --disable-curses --with-libmpdec=none 
--with-expat=none --enable-old-stdlib-cache --disable-sqlite3 
--disable-codecs-cjk --disable-ossaudiodev --with-pydebug

--

___
Python tracker 
<http://bugs.python.org/issue24228>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com