[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-08-19 Thread STINNER Victor


STINNER Victor  added the comment:

Bennet Fauber:
> It would appear that jshelly was correct and this is resolved by fixing the 
> problem isolated in issue 21131, which was closed and a patch was committed.

Great! I close this issue as a duplicate of bpo-21131.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_faulthandler.test_register_chain fails on 64bit ppc/arm 
with kernel >= 3.10

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-08-17 Thread Bennet Fauber


Bennet Fauber  added the comment:

It would appear that jshelly was correct and this is resolved by fixing the 
problem isolated in issue 21131, which was closed and a patch was committed.

https://github.com/python/cpython/pull/15276

--
nosy: +justbennet

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-07-16 Thread Michelle Johnson


Michelle Johnson  added the comment:

Is the problem I'm seeing possibly related to this issue:

https://bugs.python.org/issue21131

It seems to share a lot of similarities.

--

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-07-15 Thread Michelle Johnson


Michelle Johnson  added the comment:

Oh, ok.  So, it doesn't seem like trying to get the contents of op was 
successful:

(gdb) print *op
$1 = {ob_refcnt = 0, ob_type = 0x0}
(gdb) print *op->ob_type
Cannot access memory at address 0x0
(gdb)


I then followed your instructions to recompile in debug mode and retried the 
script.  Here are the results:

[jshelly@gl-build Python-3.7.4]$ ./python ~/script.py
Current thread 0x2ab43fe0d400 (most recent call first):
  File "/home/jshelly/script.py", line 12 in 
called True
[jshelly@gl-build Python-3.7.4]$

Does that help at all?

--

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-07-15 Thread STINNER Victor


STINNER Victor  added the comment:

Oh. So Py_FinalizeEx() does get a SIGSEGV when triggering a garbage collection: 
the test doesn't crash, it's Python which crash at exit.

> Program received signal SIGSEGV, Segmentation fault.
> 0x2ae88924 in visit_decref (op=0x2acd3468, data=0x0) at 
> Modules/gcmodule.c:271
> 271   if (PyObject_IS_GC(op)) {

You can try to dump the content of op? For example:

(gdb) print *op
(gdb) print *op->ob_type


Can you try to rebuild Python from source in debug mode, and then retry the 
script? Something like:
---
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
tar -xf Python-3.7.4.tar.xz 
cd Python-3.7.4/
./configure --with-pydebug --prefix /opt/py37
make
./python script.py
# no need to install Python
---

If it works, maybe retry without --with-pydebug.

--

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-07-15 Thread STINNER Victor


STINNER Victor  added the comment:

My notes to debug a crash on a GC collection:
https://pythondev.readthedocs.io/debug_tools.html#debug-crash-in-garbage-collection-visit-decref

--

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-07-15 Thread Michelle Johnson


Michelle Johnson  added the comment:

1.  Here is the output of the signal.getsignal test:

[jshelly@gl-build bin]$ ./python3
Python 3.7.4 (default, Jul 15 2019, 10:08:37)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import signal
>>> signal.getsignal(signal.SIGUSR1)


2.  Here is the output after running the provided script in gdb:

[jshelly@gl-build bin]$ gdb -args ./python3 ~/script.py
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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".
For bug reporting instructions, please see:
...
Reading symbols from /sw/arcts/centos7/python/3.7.4/bin/python3.7...done.
(gdb) handle SIGUSR1 nostop
SignalStop  Print   Pass to program Description
SIGUSR1   NoYes Yes User defined signal 1
(gdb) run
Starting program: /sw/arcts/centos7/python/3.7.4/bin/./python3 
/home/jshelly/script.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGUSR1, User defined signal 1.
Current thread 0x2aaf59c0 (most recent call first):
  File "/home/jshelly/script.py", line 12 in 

Program received signal SIGUSR1, User defined signal 1.
called True

Program received signal SIGSEGV, Segmentation fault.
0x2ae88924 in visit_decref (op=0x2acd3468, data=0x0) at 
Modules/gcmodule.c:271
271 if (PyObject_IS_GC(op)) {
Missing separate debuginfos, use: debuginfo-install 
glibc-2.17-260.el7_6.3.x86_64 nss-softokn-freebl-3.36.0-5.el7_5.x86_64
(gdb) where
#0  0x2ae88924 in visit_decref (op=0x2acd3468, data=0x0) at 
Modules/gcmodule.c:271
#1  0x2ad92d8d in dict_traverse (op=, 
visit=0x2ae88920 , arg=0x0) at Objects/dictobject.c:2987
#2  0x2ae87b3d in subtract_refs (containers=) at 
Modules/gcmodule.c:296
#3  collect (generation=generation@entry=2, 
n_collected=n_collected@entry=0x7fffce20,
n_uncollectable=n_uncollectable@entry=0x7fffce28, 
nofail=nofail@entry=0) at Modules/gcmodule.c:853
#4  0x2ae891c9 in collect_with_callback (generation=2) at 
Modules/gcmodule.c:1028
#5  PyGC_Collect () at Modules/gcmodule.c:1573
#6  0x2ae5e62a in Py_FinalizeEx () at Python/pylifecycle.c:1185
#7  0x2ae86d58 in pymain_main (pymain=pymain@entry=0x7fffcf60) at 
Modules/main.c:3030
#8  0x2ae874e9 in _Py_UnixMain (argc=, argv=) at Modules/main.c:3063
#9  0x2bd843d5 in __libc_start_main () from /lib64/libc.so.6
#10 0x0040067e in _start ()
(gdb)

--

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-07-15 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_faulthandler: test_register_chain() crash on Skylake chipset -> 
test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on 
Skylake chipset

___
Python tracker 

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