opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
78.98k stars 55.8k forks source link

OpenCV 4.1.2: Segmentation Fault when using cv2.warpAffine in Python #16030

Closed adriancaruana closed 4 years ago

adriancaruana commented 4 years ago
Detailed description

Segmentation Fault is encountered when using cv2.warpAffine in a Python with version 4.1.2. I have tried using the conda-forge build, and the pip build of 4.1.2 with the same result. Note that the issue is not encountered when using 4.1.1.

Steps to reproduce

In an interactive python shell:

$ python3
Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 21:52:21)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2; import numpy as np
>>> cv2.warpAffine(np.ones((221, 221, 34)).astype(np.float32), dsize=(881, 881), M=np.asarray([[4, 0, 0], [0, 4, 0]]).astype(np.float32))
Segmentation fault (core dumped)
adriancaruana commented 4 years ago

Update: This seems to help, but is obviously far from ideal:

$ python3
Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 21:52:21)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2; import numpy as np
>>> cv2.setNumThreads(1)
>>> o = cv2.warpAffine(np.ones((221, 221, 34)).astype(np.float32), dsize=(881, 881), M=np.asarray([[4, 0, 0], [0, 4, 0]]).astype(np.float32))
>>>

Also, the problem is potentially isolated to linux, as it seems to be absent on:

Python 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
alalek commented 4 years ago

core dumped

Provide stacktrace through GDB:

$ gdb -ex r --args python3
...
(gdb) bt
... stacktrace is here ...
(gdb) info threads
... useful info too  ...

Dump build information too:

cv2.getBuildInformation()
cv2.__file__
adriancaruana commented 4 years ago

@alalek so.py:

import cv2
import numpy as np
M = np.asarray([[4, 0, 0], [0, 4, 0]])
i = np.ones((221, 221, 34)).astype(np.float32)
cv2.warpAffine(i, dsize=(881, 881), M=M.astype(np.float32))

Stacktrace through GDB:

$ gdb -ex r --args python3 so.py
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 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 python3...done.
Starting program: /opt/conda/bin/python3 so.py
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7feaeb9ce700 (LWP 32299)]
[New Thread 0x7feaeb1cd700 (LWP 32300)]
[New Thread 0x7feae89cc700 (LWP 32301)]
[New Thread 0x7feae61cb700 (LWP 32302)]
[New Thread 0x7feae39ca700 (LWP 32303)]
[New Thread 0x7feae11c9700 (LWP 32304)]
[New Thread 0x7feade9c8700 (LWP 32305)]
[New Thread 0x7feadc1c7700 (LWP 32306)]
[New Thread 0x7fead99c6700 (LWP 32307)]
[New Thread 0x7fead71c5700 (LWP 32308)]
[New Thread 0x7fead49c4700 (LWP 32309)]
[New Thread 0x7fead21c3700 (LWP 32310)]
[New Thread 0x7feacf9c2700 (LWP 32311)]
[New Thread 0x7feacd1c1700 (LWP 32312)]
[New Thread 0x7feaca9c0700 (LWP 32313)]
[New Thread 0x7feac81bf700 (LWP 32314)]
[New Thread 0x7feac59be700 (LWP 32315)]
[New Thread 0x7feac31bd700 (LWP 32316)]
[New Thread 0x7feac09bc700 (LWP 32317)]
[New Thread 0x7feabe1bb700 (LWP 32318)]
[New Thread 0x7feabb9ba700 (LWP 32319)]
[New Thread 0x7feab91b9700 (LWP 32320)]
[New Thread 0x7feab49b8700 (LWP 32321)]
[New Thread 0x7feab21b7700 (LWP 32322)]
[New Thread 0x7feab19b6700 (LWP 32323)]
[New Thread 0x7feaad1b5700 (LWP 32324)]
[New Thread 0x7feaac9b4700 (LWP 32325)]
[New Thread 0x7feaa81b3700 (LWP 32326)]
[New Thread 0x7feaa79b2700 (LWP 32327)]
[New Thread 0x7feaa51b1700 (LWP 32328)]
[New Thread 0x7feaa29b0700 (LWP 32329)]
[New Thread 0x7feaa01af700 (LWP 32330)]
[New Thread 0x7fea9d9ae700 (LWP 32331)]
[New Thread 0x7fea9b1ad700 (LWP 32332)]
[New Thread 0x7fea969ac700 (LWP 32333)]
[New Thread 0x7fea941ab700 (LWP 32334)]
[New Thread 0x7fea939aa700 (LWP 32335)]
[New Thread 0x7fea911a9700 (LWP 32336)]
[New Thread 0x7fea8e9a8700 (LWP 32337)]
[New Thread 0x7fea8a1a7700 (LWP 32338)]
[New Thread 0x7fea879a6700 (LWP 32339)]
[New Thread 0x7fea871a5700 (LWP 32340)]
[New Thread 0x7fea829a4700 (LWP 32341)]
[New Thread 0x7fea821a3700 (LWP 32342)]
[New Thread 0x7fea7f9a2700 (LWP 32343)]
[New Thread 0x7fea7b1a1700 (LWP 32344)]
[New Thread 0x7fea789a0700 (LWP 32345)]
[New Thread 0x7fea7619f700 (LWP 32346)]
[New Thread 0x7fea7399e700 (LWP 32347)]
[New Thread 0x7fea7119d700 (LWP 32348)]
[New Thread 0x7fea7099c700 (LWP 32349)]
[New Thread 0x7fea6c19b700 (LWP 32350)]
[New Thread 0x7fea6999a700 (LWP 32351)]
[New Thread 0x7fea67199700 (LWP 32352)]
[New Thread 0x7fea64998700 (LWP 32353)]
[New Thread 0x7fea62197700 (LWP 32354)]
[New Thread 0x7fea5f996700 (LWP 32355)]
[New Thread 0x7fea5d195700 (LWP 32356)]
[New Thread 0x7fea5a994700 (LWP 32357)]
[New Thread 0x7fea58193700 (LWP 32358)]
[New Thread 0x7fea55992700 (LWP 32359)]
[New Thread 0x7fea53191700 (LWP 32360)]
[New Thread 0x7fea50990700 (LWP 32361)]
[New Thread 0x7fea4b906700 (LWP 32362)]
[New Thread 0x7fea3ffff700 (LWP 32363)]
[New Thread 0x7fea3f7fe700 (LWP 32364)]
[New Thread 0x7fea3effd700 (LWP 32365)]
[New Thread 0x7fea3e7fc700 (LWP 32366)]
[New Thread 0x7fea3dffb700 (LWP 32367)]
[New Thread 0x7fea3d7fa700 (LWP 32368)]
[New Thread 0x7fea3cff9700 (LWP 32369)]
[New Thread 0x7fea1ffff700 (LWP 32370)]
[New Thread 0x7fea17fff700 (LWP 32371)]
[New Thread 0x7fea1f7fe700 (LWP 32372)]
[New Thread 0x7fea1effd700 (LWP 32373)]
[New Thread 0x7fea1e7fc700 (LWP 32374)]
[New Thread 0x7fea1dffb700 (LWP 32375)]
[New Thread 0x7fea1d7fa700 (LWP 32376)]
[New Thread 0x7fea1cff9700 (LWP 32377)]
[New Thread 0x7fea177fe700 (LWP 32378)]
[New Thread 0x7fea16ffd700 (LWP 32379)]
[New Thread 0x7fea167fc700 (LWP 32380)]
[New Thread 0x7fea15ffb700 (LWP 32381)]
[New Thread 0x7fea157fa700 (LWP 32382)]
[New Thread 0x7fea14ff9700 (LWP 32383)]
[New Thread 0x7fe9dffff700 (LWP 32384)]
[New Thread 0x7fe9df7fe700 (LWP 32385)]
[New Thread 0x7fe9deffd700 (LWP 32386)]
[New Thread 0x7fe9de7fc700 (LWP 32387)]
[New Thread 0x7fe9ddffb700 (LWP 32388)]
[New Thread 0x7fe9dd7fa700 (LWP 32389)]
[New Thread 0x7fe9dcff9700 (LWP 32390)]
[New Thread 0x7fe9bffff700 (LWP 32391)]
[New Thread 0x7fe9b77fe700 (LWP 32392)]
[New Thread 0x7fe9bf7fe700 (LWP 32393)]
[New Thread 0x7fe9beffd700 (LWP 32394)]
[New Thread 0x7fe9be7fc700 (LWP 32395)]
[New Thread 0x7fe9bdffb700 (LWP 32396)]
[New Thread 0x7fe9bd7fa700 (LWP 32397)]
[New Thread 0x7fe9bcff9700 (LWP 32398)]
[New Thread 0x7fe9b7fff700 (LWP 32399)]
[New Thread 0x7fe9b6ffd700 (LWP 32400)]
[New Thread 0x7fe9b67fc700 (LWP 32401)]
[New Thread 0x7fe9b5ffb700 (LWP 32402)]
[New Thread 0x7fe9b57fa700 (LWP 32403)]
[New Thread 0x7fe9b4ff9700 (LWP 32404)]
[New Thread 0x7fe97ffff700 (LWP 32405)]
[New Thread 0x7fe977fff700 (LWP 32406)]
[New Thread 0x7fe97f7fe700 (LWP 32407)]
[New Thread 0x7fe97effd700 (LWP 32408)]
[New Thread 0x7fe97e7fc700 (LWP 32409)]
[New Thread 0x7fe97dffb700 (LWP 32410)]
[New Thread 0x7fe97d7fa700 (LWP 32411)]
[New Thread 0x7fe97cff9700 (LWP 32412)]
[New Thread 0x7fe9777fe700 (LWP 32413)]
[New Thread 0x7fe976ffd700 (LWP 32414)]
[New Thread 0x7fe9767fc700 (LWP 32415)]
[New Thread 0x7fe975ffb700 (LWP 32416)]
[New Thread 0x7fe9757fa700 (LWP 32417)]
[New Thread 0x7fe974ff9700 (LWP 32418)]
[New Thread 0x7fe93ffff700 (LWP 32419)]
[New Thread 0x7fe937fff700 (LWP 32420)]
[New Thread 0x7fe93f7fe700 (LWP 32421)]
[New Thread 0x7fe93effd700 (LWP 32422)]
[New Thread 0x7fe93e7fc700 (LWP 32423)]
[New Thread 0x7fe93dffb700 (LWP 32424)]
[New Thread 0x7fe93d7fa700 (LWP 32425)]
[New Thread 0x7fe93cff9700 (LWP 32426)]
[New Thread 0x7fe9377fe700 (LWP 32427)]
[New Thread 0x7fe936ffd700 (LWP 32428)]
[New Thread 0x7fe9367fc700 (LWP 32429)]
[New Thread 0x7fe935ffb700 (LWP 32430)]
[New Thread 0x7fe9357fa700 (LWP 32431)]
[New Thread 0x7fe934ff9700 (LWP 32432)]
[New Thread 0x7fe8fffff700 (LWP 32433)]
[New Thread 0x7fe8ff7fe700 (LWP 32434)]
[New Thread 0x7fe8feffd700 (LWP 32435)]
[New Thread 0x7fe8fe7fc700 (LWP 32436)]
[New Thread 0x7fe8fdffb700 (LWP 32437)]
[New Thread 0x7fe8fd7fa700 (LWP 32438)]
[New Thread 0x7fe8fcff9700 (LWP 32439)]
[New Thread 0x7fe8dffff700 (LWP 32440)]
[New Thread 0x7fe8df7fe700 (LWP 32441)]
[New Thread 0x7fe8deffd700 (LWP 32442)]
[New Thread 0x7fe8de7fc700 (LWP 32443)]
[New Thread 0x7fe8ddffb700 (LWP 32444)]
[New Thread 0x7fe8dd7fa700 (LWP 32445)]
[New Thread 0x7fe8dcff9700 (LWP 32446)]
[New Thread 0x7fe8bffff700 (LWP 32447)]
[New Thread 0x7fe8b7fff700 (LWP 32448)]
[New Thread 0x7fe8bf7fe700 (LWP 32449)]
[New Thread 0x7fe8beffd700 (LWP 32450)]
[New Thread 0x7fe8be7fc700 (LWP 32451)]
[New Thread 0x7fe8bdffb700 (LWP 32452)]
[New Thread 0x7fe8bd7fa700 (LWP 32453)]
[New Thread 0x7fe8bcff9700 (LWP 32454)]
[New Thread 0x7fe8b77fe700 (LWP 32455)]
[New Thread 0x7fe8b6ffd700 (LWP 32456)]

Thread 68 "python3" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fea3effd700 (LWP 32365)]
__GI___libc_free (mem=0x4035) at malloc.c:3103
3103    malloc.c: No such file or directory.
(gdb) bt
#0  __GI___libc_free (mem=0x4035) at malloc.c:3103
#1  0x00007feaf35f7fd9 in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#2  0x00007feaf326f495 in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#3  0x00007feaf396fc65 in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#4  0x00007feaf36b7d89 in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#5  0x00007feaf39751d1 in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#6  0x00007feaf3979224 in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#7  0x00007feaf36b7bde in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#8  0x00007feaf36b85ea in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#9  0x00007feaf36b92bd in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#10 0x00007feaf36b9429 in ?? () from /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
#11 0x00007feaf5e3f6db in start_thread (arg=0x7fea3effd700) at pthread_create.c:463
#12 0x00007feaf5b6888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) info threads
  Id   Target Id         Frame
  1    Thread 0x7feaf626a740 (LWP 32295) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8cddc30) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  2    Thread 0x7feaeb9ce700 (LWP 32299) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dab60 <thread_status+96>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  3    Thread 0x7feaeb1cd700 (LWP 32300) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dabe0 <thread_status+224>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  4    Thread 0x7feae89cc700 (LWP 32301) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dac60 <thread_status+352>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  5    Thread 0x7feae61cb700 (LWP 32302) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dace0 <thread_status+480>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  6    Thread 0x7feae39ca700 (LWP 32303) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dad60 <thread_status+608>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  7    Thread 0x7feae11c9700 (LWP 32304) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dade0 <thread_status+736>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  8    Thread 0x7feade9c8700 (LWP 32305) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dae60 <thread_status+864>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  9    Thread 0x7feadc1c7700 (LWP 32306) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9daee0 <thread_status+992>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  10   Thread 0x7fead99c6700 (LWP 32307) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9daf60 <thread_status+1120>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  11   Thread 0x7fead71c5700 (LWP 32308) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dafe0 <thread_status+1248>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  12   Thread 0x7fead49c4700 (LWP 32309) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db060 <thread_status+1376>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  13   Thread 0x7fead21c3700 (LWP 32310) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db0e0 <thread_status+1504>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  14   Thread 0x7feacf9c2700 (LWP 32311) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db160 <thread_status+1632>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  15   Thread 0x7feacd1c1700 (LWP 32312) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db1e0 <thread_status+1760>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  16   Thread 0x7feaca9c0700 (LWP 32313) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db260 <thread_status+1888>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  17   Thread 0x7feac81bf700 (LWP 32314) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db2e0 <thread_status+2016>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  18   Thread 0x7feac59be700 (LWP 32315) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db360 <thread_status+2144>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  19   Thread 0x7feac31bd700 (LWP 32316) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db3e0 <thread_status+2272>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  20   Thread 0x7feac09bc700 (LWP 32317) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db460 <thread_status+2400>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  21   Thread 0x7feabe1bb700 (LWP 32318) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db4e0 <thread_status+2528>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  22   Thread 0x7feabb9ba700 (LWP 32319) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db560 <thread_status+2656>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  23   Thread 0x7feab91b9700 (LWP 32320) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db5e0 <thread_status+2784>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  24   Thread 0x7feab49b8700 (LWP 32321) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db660 <thread_status+2912>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  25   Thread 0x7feab21b7700 (LWP 32322) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db6e0 <thread_status+3040>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  26   Thread 0x7feab19b6700 (LWP 32323) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db760 <thread_status+3168>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  27   Thread 0x7feaad1b5700 (LWP 32324) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db7e0 <thread_status+3296>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  28   Thread 0x7feaac9b4700 (LWP 32325) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db860 <thread_status+3424>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  29   Thread 0x7feaa81b3700 (LWP 32326) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db8e0 <thread_status+3552>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  30   Thread 0x7feaa79b2700 (LWP 32327) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db960 <thread_status+3680>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  31   Thread 0x7feaa51b1700 (LWP 32328) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9db9e0 <thread_status+3808>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  32   Thread 0x7feaa29b0700 (LWP 32329) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dba60 <thread_status+3936>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  33   Thread 0x7feaa01af700 (LWP 32330) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbae0 <thread_status+4064>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  34   Thread 0x7fea9d9ae700 (LWP 32331) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbb60 <thread_status+4192>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  35   Thread 0x7fea9b1ad700 (LWP 32332) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbbe0 <thread_status+4320>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  36   Thread 0x7fea969ac700 (LWP 32333) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbc60 <thread_status+4448>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  37   Thread 0x7fea941ab700 (LWP 32334) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbce0 <thread_status+4576>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  38   Thread 0x7fea939aa700 (LWP 32335) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbd60 <thread_status+4704>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  39   Thread 0x7fea911a9700 (LWP 32336) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbde0 <thread_status+4832>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  40   Thread 0x7fea8e9a8700 (LWP 32337) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbe60 <thread_status+4960>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  41   Thread 0x7fea8a1a7700 (LWP 32338) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbee0 <thread_status+5088>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  42   Thread 0x7fea879a6700 (LWP 32339) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbf60 <thread_status+5216>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  43   Thread 0x7fea871a5700 (LWP 32340) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dbfe0 <thread_status+5344>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  44   Thread 0x7fea829a4700 (LWP 32341) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc060 <thread_status+5472>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  45   Thread 0x7fea821a3700 (LWP 32342) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc0e0 <thread_status+5600>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  46   Thread 0x7fea7f9a2700 (LWP 32343) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc160 <thread_status+5728>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  47   Thread 0x7fea7b1a1700 (LWP 32344) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc1e0 <thread_status+5856>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  48   Thread 0x7fea789a0700 (LWP 32345) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc260 <thread_status+5984>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  49   Thread 0x7fea7619f700 (LWP 32346) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc2e0 <thread_status+6112>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  50   Thread 0x7fea7399e700 (LWP 32347) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc360 <thread_status+6240>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  51   Thread 0x7fea7119d700 (LWP 32348) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc3e0 <thread_status+6368>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  52   Thread 0x7fea7099c700 (LWP 32349) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc460 <thread_status+6496>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  53   Thread 0x7fea6c19b700 (LWP 32350) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc4e0 <thread_status+6624>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  54   Thread 0x7fea6999a700 (LWP 32351) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc560 <thread_status+6752>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  55   Thread 0x7fea67199700 (LWP 32352) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc5e0 <thread_status+6880>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  56   Thread 0x7fea64998700 (LWP 32353) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc660 <thread_status+7008>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  57   Thread 0x7fea62197700 (LWP 32354) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc6e0 <thread_status+7136>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  58   Thread 0x7fea5f996700 (LWP 32355) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc760 <thread_status+7264>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  59   Thread 0x7fea5d195700 (LWP 32356) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc7e0 <thread_status+7392>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  60   Thread 0x7fea5a994700 (LWP 32357) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc860 <thread_status+7520>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  61   Thread 0x7fea58193700 (LWP 32358) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc8e0 <thread_status+7648>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  62   Thread 0x7fea55992700 (LWP 32359) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc960 <thread_status+7776>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  63   Thread 0x7fea53191700 (LWP 32360) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dc9e0 <thread_status+7904>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  64   Thread 0x7fea50990700 (LWP 32361) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7feaed9dca60 <thread_status+8032>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  65   Thread 0x7fea4b906700 (LWP 32362) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8c198ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  66   Thread 0x7fea3ffff700 (LWP 32363) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8af6c4c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  67   Thread 0x7fea3f7fe700 (LWP 32364) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8a2c22c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
* 68   Thread 0x7fea3effd700 (LWP 32365) "python3" __GI___libc_free (mem=0x4035) at malloc.c:3103
  69   Thread 0x7fea3e7fc700 (LWP 32366) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d89729ec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  70   Thread 0x7fea3dffb700 (LWP 32367) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8acb12c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  71   Thread 0x7fea3d7fa700 (LWP 32368) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8a0b82c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
---Type <return> to continue, or q <return> to quit---
  72   Thread 0x7fea3cff9700 (LWP 32369) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d7184c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  73   Thread 0x7fea1ffff700 (LWP 32370) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d9ef4c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  74   Thread 0x7fea17fff700 (LWP 32371) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d0771c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  75   Thread 0x7fea1f7fe700 (LWP 32372) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d0e38c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  76   Thread 0x7fea1effd700 (LWP 32373) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d5c8bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  77   Thread 0x7fea1e7fc700 (LWP 32374) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d89c4cdc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  78   Thread 0x7fea1dffb700 (LWP 32375) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d5fb9c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  79   Thread 0x7fea1d7fa700 (LWP 32376) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d7c15c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  80   Thread 0x7fea1cff9700 (LWP 32377) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d8684c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  81   Thread 0x7fea177fe700 (LWP 32378) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d89d0c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  82   Thread 0x7fea16ffd700 (LWP 32379) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d8b17c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  83   Thread 0x7fea167fc700 (LWP 32380) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d898ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  84   Thread 0x7fea15ffb700 (LWP 32381) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dafcbc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  85   Thread 0x7fea157fa700 (LWP 32382) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dafefc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  86   Thread 0x7fea14ff9700 (LWP 32383) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8db013c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  87   Thread 0x7fe9dffff700 (LWP 32384) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8db037c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  88   Thread 0x7fe9df7fe700 (LWP 32385) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8db05bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  89   Thread 0x7fe9deffd700 (LWP 32386) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8db07fc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  90   Thread 0x7fe9de7fc700 (LWP 32387) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd4acc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  91   Thread 0x7fe9ddffb700 (LWP 32388) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd4d0c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  92   Thread 0x7fe9dd7fa700 (LWP 32389) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd4f4c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  93   Thread 0x7fe9dcff9700 (LWP 32390) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd518c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  94   Thread 0x7fe9bffff700 (LWP 32391) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd53cc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  95   Thread 0x7fe9b77fe700 (LWP 32392) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd560c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  96   Thread 0x7fe9bf7fe700 (LWP 32393) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd584c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  97   Thread 0x7fe9beffd700 (LWP 32394) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd5a8c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  98   Thread 0x7fe9be7fc700 (LWP 32395) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d0bb5c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  99   Thread 0x7fe9bdffb700 (LWP 32396) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd627c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  100  Thread 0x7fe9bd7fa700 (LWP 32397) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd64bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  101  Thread 0x7fe9bcff9700 (LWP 32398) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd66fc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  102  Thread 0x7fe9b7fff700 (LWP 32399) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd693c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  103  Thread 0x7fe9b6ffd700 (LWP 32400) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd6b7c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  104  Thread 0x7fe9b67fc700 (LWP 32401) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd6dbc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  105  Thread 0x7fe9b5ffb700 (LWP 32402) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd6ffc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  106  Thread 0x7fe9b57fa700 (LWP 32403) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd723c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  107  Thread 0x7fe9b4ff9700 (LWP 32404) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd747c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  108  Thread 0x7fe97ffff700 (LWP 32405) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd76bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  109  Thread 0x7fe977fff700 (LWP 32406) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd78fc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  110  Thread 0x7fe97f7fe700 (LWP 32407) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd7b3c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  111  Thread 0x7fe97effd700 (LWP 32408) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd7d7c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  112  Thread 0x7fe97e7fc700 (LWP 32409) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd7fbc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  113  Thread 0x7fe97dffb700 (LWP 32410) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd81fc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  114  Thread 0x7fe97d7fa700 (LWP 32411) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd843c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  115  Thread 0x7fe97cff9700 (LWP 32412) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd867c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  116  Thread 0x7fe9777fe700 (LWP 32413) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd88bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  117  Thread 0x7fe976ffd700 (LWP 32414) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd8afc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  118  Thread 0x7fe9767fc700 (LWP 32415) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd8d3c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  119  Thread 0x7fe975ffb700 (LWP 32416) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd8f7c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  120  Thread 0x7fe9757fa700 (LWP 32417) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd91bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  121  Thread 0x7fe974ff9700 (LWP 32418) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd93fc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  122  Thread 0x7fe93ffff700 (LWP 32419) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd963c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  123  Thread 0x7fe937fff700 (LWP 32420) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd987c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  124  Thread 0x7fe93f7fe700 (LWP 32421) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd9abc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  125  Thread 0x7fe93effd700 (LWP 32422) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd9cfc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  126  Thread 0x7fe93e7fc700 (LWP 32423) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dd9f3c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  127  Thread 0x7fe93dffb700 (LWP 32424) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dda17c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  128  Thread 0x7fe93d7fa700 (LWP 32425) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dda3bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  129  Thread 0x7fe93cff9700 (LWP 32426) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dda5fc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  130  Thread 0x7fe9377fe700 (LWP 32427) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8d341ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  131  Thread 0x7fe936ffd700 (LWP 32428) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddb1ec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  132  Thread 0x7fe9367fc700 (LWP 32429) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddb42c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  133  Thread 0x7fe935ffb700 (LWP 32430) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddb66c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  134  Thread 0x7fe9357fa700 (LWP 32431) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddb8ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  135  Thread 0x7fe934ff9700 (LWP 32432) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddbaec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  136  Thread 0x7fe8fffff700 (LWP 32433) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddbd2c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  137  Thread 0x7fe8ff7fe700 (LWP 32434) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddbf6c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  138  Thread 0x7fe8feffd700 (LWP 32435) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddc1ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  139  Thread 0x7fe8fe7fc700 (LWP 32436) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddc3ec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  140  Thread 0x7fe8fdffb700 (LWP 32437) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddc62c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  141  Thread 0x7fe8fd7fa700 (LWP 32438) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddc86c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  142  Thread 0x7fe8fcff9700 (LWP 32439) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddcaac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  143  Thread 0x7fe8dffff700 (LWP 32440) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddccec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
---Type <return> to continue, or q <return> to quit---
  144  Thread 0x7fe8df7fe700 (LWP 32441) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddcf2c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  145  Thread 0x7fe8deffd700 (LWP 32442) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddd16c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  146  Thread 0x7fe8de7fc700 (LWP 32443) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddd3ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  147  Thread 0x7fe8ddffb700 (LWP 32444) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddd5ec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  148  Thread 0x7fe8dd7fa700 (LWP 32445) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddd82c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  149  Thread 0x7fe8dcff9700 (LWP 32446) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddda6c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  150  Thread 0x7fe8bffff700 (LWP 32447) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dddcac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  151  Thread 0x7fe8b7fff700 (LWP 32448) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dddeec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  152  Thread 0x7fe8bf7fe700 (LWP 32449) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dde12c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  153  Thread 0x7fe8beffd700 (LWP 32450) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dde36c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  154  Thread 0x7fe8be7fc700 (LWP 32451) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dde5ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  155  Thread 0x7fe8bdffb700 (LWP 32452) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8dde7ec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  156  Thread 0x7fe8bd7fa700 (LWP 32453) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddea2c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  157  Thread 0x7fe8bcff9700 (LWP 32454) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddec6c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  158  Thread 0x7fe8b77fe700 (LWP 32455) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddeeac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  159  Thread 0x7fe8b6ffd700 (LWP 32456) "python3" 0x00007feaf5e459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5597d8ddf0e8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
(gdb)

Dump build info:


General configuration for OpenCV 4.1.2 =====================================
  Version control:               4.1.2

  Platform:
    Timestamp:                   2019-11-21T23:50:25Z
    Host:                        Linux 4.15.0-1028-gcp x86_64
    CMake:                       3.9.0
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/gmake
    Configuration:               Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (14 files):         + SSSE3 SSE4_1
      SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (4 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX

  C/C++:
    Built as dynamic libs?:      NO
    C++ Compiler:                /usr/lib/ccache/compilers/c++  (ver 4.8.2)
    C++ flags (Release):         -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/lib/ccache/compilers/cc
    C flags (Release):           -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -Wl,-strip-all   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -L/root/ffmpeg_build/lib  -Wl,--gc-sections  
    Linker flags (Debug):        -L/root/ffmpeg_build/lib  -Wl,--gc-sections  
    ccache:                      YES
    Precompiled headers:         NO
    Extra dependencies:          ade /opt/Qt4.8.7/lib/libQtGui.so /opt/Qt4.8.7/lib/libQtTest.so /opt/Qt4.8.7/lib/libQtCore.so /lib64/libz.so dl m pthread rt
    3rdparty dependencies:       ittnotify libprotobuf libjpeg-turbo libwebp libpng libtiff libjasper IlmImf quirc

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java js python2 ts
    Applications:                -
    Documentation:               NO
    Non-free algorithms:         NO

  GUI: 
    QT:                          YES (ver 4.8.7 EDITION = OpenSource)
      QT OpenGL support:         NO
    GTK+:                        NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        /lib64/libz.so (ver 1.2.3)
    JPEG:                        libjpeg-turbo (ver 2.0.2-62)
    WEBP:                        build (ver encoder: 0x020e)
    PNG:                         build (ver 1.6.37)
    TIFF:                        build (ver 42 - 4.0.10)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES
      avcodec:                   YES (58.62.100)
      avformat:                  YES (58.35.100)
      avutil:                    YES (56.36.100)
      swscale:                   YES (5.6.100)
      avresample:                NO
    GStreamer:                   NO
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  OpenCL:                        YES (no extra features)
    Include path:                /io/opencv/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /opt/python/cp37-cp37m/bin/python (ver 3.7.5)
    Libraries:                   libpython3.7m.a (ver 3.7.5)
    numpy:                       /opt/python/cp37-cp37m/lib/python3.7/site-packages/numpy/core/include (ver 1.14.5)
    install path:                python

  Python (for build):            /opt/python/cp37-cp37m/bin/python

  Java:                          
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    /io/_skbuild/linux-x86_64-3.7/cmake-install
-----------------------------------------------------------------
/opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so
alalek commented 4 years ago

Some conflicting mess with OpenCV binaries / cv2 packages:

You need to remove/isolate one of them.

Check also GDB's info sharedlibraries output:

adriancaruana commented 4 years ago

Hi @alalek , thanks for your help so far. Could you please clarify what you mean by the conflict between: /opt/conda/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-linux-gnu.so and /io/_skbuild/linux-x86_64-3.7? My understanding is that the latter (/io/_skbuild/linux-x86_64-3.7) is simply the build output directory. However, I have not built opencv from source, I've only installed from conda.

Additionally, on a fresh ubuntu 18.04 install, I have repeated the test, having installed opencv with python3 -m pip install opencv-python==4.1.2.30 and reached the same Segmentation Fault as before. This environment was absent of any potential conda-induced conflicts.

mshabunin commented 4 years ago

Can not reproduce with conda-forge...

conda create -n opencv-test -c conda-forge opencv
conda activate opencv-test
python

Can reproduce with pip package with ~25% rate:

# in empty Ubuntu 18.04 docker container
apt update && apt install -y python3-pip libxext6 libxrender1 libsm6
python3 -m pip install opencv-python
python3 -c 'import cv2; import numpy as np; cv2.warpAffine(np.ones((221, 221, 34)).astype(np.float32), dsize=(881, 881), M=np.asarray([[4, 0, 0], [0, 4, 0]]).astype(np.float32))'
python3 -c 'import cv2; import numpy as np; cv2.warpAffine(np.ones((221, 221, 34)).astype(np.float32), dsize=(881, 881), M=np.asarray([[4, 0, 0], [0, 4, 0]]).astype(np.float32))'
python3 -c 'import cv2; import numpy as np; cv2.warpAffine(np.ones((221, 221, 34)).astype(np.float32), dsize=(881, 881), M=np.asarray([[4, 0, 0], [0, 4, 0]]).astype(np.float32))'
Segmentation fault (core dumped)
mshabunin commented 4 years ago

I've been able to reproduce the issue with 4.1.2 build, but not with master branch. Perhaps it has been fixed.

adriancaruana commented 4 years ago

Hi @mshabunin, are you sure you were using 4.1.2 with your conda test? I followed your conda environment steps only pinning 4.1.2 as follows:

$ conda create -n opencv-test -c conda-forge opencv=4.1.2
$ conda activate opencv-test
(opencv-test) $ python3
Python 3.8.0 | packaged by conda-forge | (default, Nov 22 2019, 19:11:38)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2; import numpy as np
>>> print(cv2.__version__)
4.1.2
>>> cv2.warpAffine(np.ones((221, 221, 34)).astype(np.float32), dsize=(881, 881), M=np.asarray([[4, 0, 0], [0, 4, 0]]).astype(np.float32))
Segmentation fault (core dumped)
mshabunin commented 4 years ago

Check cv2. getBuildInformation() output, package from conda-forge will have your local path in the Install to: line, package from pip will have /io/_skbuild/....

adriancaruana commented 4 years ago

@mshabunin in the same shell as above:

>>> print(cv2.getBuildInformation())

General configuration for OpenCV 4.1.2 =====================================
  Version control:               0abd2c9-dirty

  Extra modules:
    Location (extra):            /home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/work/opencv_contrib/modules
    Version control (extra):     0abd2c9-dirty

  Platform:
    Timestamp:                   2019-11-22T21:01:34Z
    Host:                        Linux 4.15.0-1061-azure x86_64
    CMake:                       3.15.5
    CMake generator:             Ninja
    CMake build tool:            /home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/_build_env/bin/ninja
    Configuration:               Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (14 files):         + SSSE3 SSE4_1
      SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (4 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (27 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
      AVX512_SKX (3 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                /home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/_build_env/bin/x86_64-conda_cos6-linux-gnu-c++  (ver 7.3.0)
    C++ flags (Release):         -fvisibility-inlines-hidden -std=c++11 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/envs/opencv-test/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/work=/usr/local/src/conda/libopencv-4.1.2 -fdebug-prefix-map=/opt/conda/envs/opencv-test=/usr/local/src/conda-prefix -D__STDC_CONSTANT_MACROS   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fopenmp -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fvisibility-inlines-hidden -std=c++11 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/envs/opencv-test/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/work=/usr/local/src/conda/libopencv-4.1.2 -fdebug-prefix-map=/opt/conda/envs/opencv-test=/usr/local/src/conda-prefix -D__STDC_CONSTANT_MACROS   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fopenmp -g  -DDEBUG -D_DEBUG
    C Compiler:                  /home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc
    C flags (Release):           -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/envs/opencv-test/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/work=/usr/local/src/conda/libopencv-4.1.2 -fdebug-prefix-map=/opt/conda/envs/opencv-test=/usr/local/src/conda-prefix   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fopenmp -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/envs/opencv-test/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/work=/usr/local/src/conda/libopencv-4.1.2 -fdebug-prefix-map=/opt/conda/envs/opencv-test=/usr/local/src/conda-prefix   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fopenmp -g  -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/opt/conda/envs/opencv-test/lib -Wl,-rpath-link,/opt/conda/envs/opencv-test/lib -L/opt/conda/envs/opencv-test/lib -Wl,-rpath-link,/opt/conda/envs/opencv-test/lib  -Wl,--gc-sections
    Linker flags (Debug):        -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/opt/conda/envs/opencv-test/lib -Wl,-rpath-link,/opt/conda/envs/opencv-test/lib -L/opt/conda/envs/opencv-test/lib -Wl,-rpath-link,/opt/conda/envs/opencv-test/lib  -Wl,--gc-sections
    ccache:                      NO
    Precompiled headers:         NO
    Extra dependencies:          dl m pthread rt
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 aruco bgsegm bioinspired calib3d ccalib core cvv datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 quality reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java js matlab ovis python2 sfm ts viz
    Applications:                apps
    Documentation:               NO
    Non-free algorithms:         NO

  GUI:
    QT:                          YES (ver 5.12.1)
      QT OpenGL support:         NO

  Media I/O:
    ZLib:                        /opt/conda/envs/opencv-test/lib/libz.so (ver 1.2.11)
    JPEG:                        /opt/conda/envs/opencv-test/lib/libjpeg.so (ver 90)
    WEBP:                        /opt/conda/envs/opencv-test/lib/libwebp.so (ver encoder: 0x020e)
    PNG:                         /opt/conda/envs/opencv-test/lib/libpng.so (ver 1.6.37)
    TIFF:                        /opt/conda/envs/opencv-test/lib/libtiff.so (ver 42 / 4.1.0)
    JPEG 2000:                   /opt/conda/envs/opencv-test/lib/libjasper.so (ver 1.900.1)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    FFMPEG:                      YES
      avcodec:                   YES (58.35.100)
      avformat:                  YES (58.20.100)
      avutil:                    YES (56.22.100)
      swscale:                   YES (5.3.100)
      avresample:                YES (4.0.0)
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            OpenMP

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2019.0.0 Gold [2019.0.0]
           at:                   /home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/work/build/3rdparty/ippicv/ippicv_lnx/icv
    Intel IPP IW:                sources (2019.0.0)
              at:                /home/conda/feedstock_root/build_artifacts/libopencv_1574456146158/work/build/3rdparty/ippicv/ippicv_lnx/iw
    Lapack:                      YES (lapack cblas)
    Eigen:                       YES (ver 3.3.7)
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  Python 3:
    Interpreter:                 /opt/conda/envs/opencv-test/bin/python (ver 3.8)
    Libraries:                   /opt/conda/envs/opencv-test/lib/libpython3.8.so (ver 3.8.0)
    numpy:                       /opt/conda/envs/opencv-test/lib/python3.8/site-packages/numpy/core/include (ver 1.14.6)
    install path:                /opt/conda/envs/opencv-test/lib/python3.8/site-packages

  Python (for build):            /opt/conda/envs/opencv-test/bin/python

  Java:
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    /opt/conda/envs/opencv-test
-----------------------------------------------------------------
mshabunin commented 4 years ago

Yes, I have the same output.

I've checked again and reproduced the issue with conda-forge package but with lower rate of ~1-2%. It can be explained by difference in parallel framework backends used in pip (pthreads) and conda-forge (OpenMP) packages. Failure rate grows to 30-40% under heavy system load though.

Again, the master branch version seem to have no this issue, I've checked with pthreads and OpenMP backends with high system load.

My test:

# imitate load
stress-ng -c 8 -s 2
# run the test
for i in $(seq 1 100) ; do 
python3 -c 'import cv2; import numpy as np; cv2.warpAffine(np.ones((221, 221, 34)).astype(np.float32), dsize=(881, 881), M=np.asarray([[4, 0, 0], [0, 4, 0]]).astype(np.float32))'
done
adriancaruana commented 4 years ago

Closing, as this seems to be fixed in 4.2.0.

flavienbwk commented 4 years ago

Problem is still present : Ubuntu 18.04 LTS, Python3.6, OpenCV 4.2.0.34, Nvidia-Docker with Cuda 10.2, Cudnn 7 devel.

Segfaulting on function cv2.VideoCapture