08-06-2019 10:22 AM - edited 08-06-2019 10:23 AM
Hello,
I am developing an application for Python 3.7.3 (built from source with gcc-7.3.1) that incorporates nidaqmx for data acquisition. From the main thread, the application spawns a separate thread to start the task of data collection. A small number of other threads are also spawned to perform non-DAQ related monitoring and some of those threads are using Python's subprocess.Popen.
Recently on a CentOS 7 machine with a PCIe-6353, I started seeing issues where my application would terminate with a segmentation fault. I have developed a few small scripts that I believe reproduce the issue. These are attached.
Using gdb to dig into the core dumps for the multi_thread.py and multi_process.py scripts, respectively, this is what I observe:
Program terminated with signal 11, Segmentation fault. #0 __malloc_fork_unlock_child () at arena.c:303 303 mutex_init(&ar_ptr->mutex);
Program terminated with signal 11, Segmentation fault. #0 0x00007f14ae2e4a8b in ?? () from /usr/lib/x86_64-linux-gnu/libnipalu.so.1
I am wondering if anyone has observed issues like this before and if and how you were able to resolve them, if at all. Perhaps I've misunderstood how nidaqmx can be integrated using concurrency.
Much appreciated,
--Brent
09-06-2019 11:44 AM
Have you been able to reproduce this with other hardware & python versions?
09-06-2019 12:08 PM
On other hardware? No, we (the team to which I belong) have not tried. But on other versions of Python? Yes, all of them that we have tried. I should have noted in my original post that we do not experience these issues running this same application on a Windows host.
I am currently engaged with NI Technical Support on this issue. I will update when something concrete comes from that.