Closed ndahlquist closed 7 years ago
hi
How are you using this pynrfjprog, meaning, what instructions are you using? When does it fail? Can you give a little bit more detail?
Thanks
Hi David,
We are using the script below, invoked as ./nrf_programmer.py ${SOFTDEVICE_HEX} ${PROJECT_NAME}.hex
. Most of the time this works, but occasionally it fails with this error. What additional details would it be helpful for us to provide?
#!/usr/bin/env python
# coding: utf-8
"""
A simple script to program Nordic's flash.
"""
import argparse
from pynrfjprog import API
from intelhex import *
def connect_to_nordic(nrf):
"""
Interfaces with all JLink's connected via USB, and attempts to connect to a Nordic.
On failure, prints all error messages and exits.
"""
emu_snrs = nrf.enum_emu_snr()
if not emu_snrs:
print 'No attached JLinks (check your USB connections).'
exit(-1)
# Iterate over all attached JLinks and attempt to connect.
error_log = ''
for emu_snr in emu_snrs:
try:
nrf.connect_to_emu_with_snr(emu_snr)
return
except Exception as e:
error_log += ' ' + e.message
error_log += '\n'
print 'Failed to connect to the Nordic:'
print error_log
exit(-1)
def program_hexfiles(nrf, hex_files):
"""
Opens hex files and programs them to the Nordic's flash.
:param hex_files: A list of filenames of hex files.
"""
# Merge our hex files.
h = IntelHex()
for hex_file in hex_files:
ih = IntelHex()
ih.loadhex(hex_file)
h.merge(ih)
nrf.erase_all()
for segment in h.segments():
print 'Programming flash range', segment
binarray = h.tobinarray(start=segment[0], size=segment[1]-segment[0])
nrf.write(segment[0], binarray, True)
print 'Programming complete.'
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Merges multiple hex files into one.')
parser.add_argument('hex_files', nargs='*', action='store')
args = parser.parse_args()
nrf = API.API('NRF52')
nrf.open()
connect_to_nordic(nrf)
nrf.halt()
program_hexfiles(nrf, args.hex_files)
nrf.sys_reset()
nrf.go()
nrf.close()
Based on the stacktrace, it appears that the crash occurs within the call to connect_to_emu_with_snr
.
It looks like the error occurs when calling JLINKARM_OpenEx in the Segger jlink DLL. We suspect that this might be because the dll is not yet closed.
Do you catch the exception in the try-exception block in connect_to_nordic, or does it leak out? Our guess is that this might happen if you try to run the script too often, if garbage collection does not pick up the dll before it is opened again, although this is unlikely. Or, this would happen if you tried running several instances of this script simultaneously. For this use case, you have to use multiapi.
Do you run this script multiple times within the same python environment?
If you run it multiple times, you should not open/close the dll every time, as we suspect there is a small memory leak in the segger dll. The solution is either: Do not open/close the dll on each iteration, rather, pass an instance to the script. This way the leak happens once, and is picked up at the end of your python script. or Use the multiapi, by importing the api as "from pynrfjprog import MultiAPI as API" No further edit of your code should be necessary, but this will slow down your script slightly. This will open the API in a separate thread that gets terminated when the multiapi is deleted. Any leaked memory is then collected from the thread by the OS.
Thank you for the detailed explanation!
As a test, I tried running our script in a loop (to see if it would crash after many iterations). Using this stress test, I can reproduce the error.
I switched out API for MultiAPI.
#!/usr/bin/env python
# coding: utf-8
"""
A simple script to program Nordic's flash.
"""
import argparse
from pynrfjprog import MultiAPI
from intelhex import *
def connect_to_nordic(nrf):
"""
Interfaces with all JLink's connected via USB, and attempts to connect to a Nordic.
On failure, prints all error messages and exits.
"""
emu_snrs = nrf.enum_emu_snr()
if not emu_snrs:
print 'No attached JLinks (check your USB connections).'
exit(-1)
# Iterate over all attached JLinks and attempt to connect.
error_log = ''
for emu_snr in emu_snrs:
try:
nrf.connect_to_emu_with_snr(emu_snr)
return
except Exception as e:
error_log += ' ' + e.message
error_log += '\n'
print 'Failed to connect to the Nordic:'
print error_log
exit(-1)
def program_hexfiles(nrf, hex_files):
"""
Opens hex files and programs them to the Nordic's flash.
:param hex_files: A list of filenames of hex files.
"""
# Merge our hex files.
h = IntelHex()
for hex_file in hex_files:
ih = IntelHex()
ih.loadhex(hex_file)
h.merge(ih)
nrf.erase_all()
for segment in h.segments():
print 'Programming flash range', segment
binarray = h.tobinarray(start=segment[0], size=segment[1]-segment[0])
nrf.write(segment[0], binarray, True)
print 'Programming complete.'
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Merges multiple hex files into one.')
parser.add_argument('hex_files', nargs='*', action='store')
args = parser.parse_args()
nrf = MultiAPI.MultiAPI('NRF52')
nrf.open()
connect_to_nordic(nrf)
#nrf.halt()
#program_hexfiles(nrf, args.hex_files)
#nrf.sys_reset()
#nrf.go()
nrf.close()
Unfortunately, I am still seeing the same crash:
Process: Python [11490]
Path: /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.12 (2.7.12)
Code Type: X86-64 (Native)
Parent Process: Python [11489]
Responsible: Python [11490]
User ID: 504
Date/Time: 2016-12-22 11:33:44.217 -0800
OS Version: Mac OS X 10.12.2 (16C67)
Report Version: 12
Anonymous UUID: 02C22CBB-2A78-DFBE-5EF9-44CD25C3F931
Sleep/Wake UUID: 16DEB095-FF87-43C8-8EE3-C356BD0A45EC
Time Awake Since Boot: 2900 seconds
Time Since Wake: 1700 seconds
System Integrity Protection: enabled
Crashed Thread: 3
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x000000000000000c, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]
Application Specific Information:
crashed on child side of fork pre-exec
Thread 0:: Dispatch queue: com.apple.main-thread
0 dyld 0x000000011701b9c1 ImageLoader::trieWalk(unsigned char const*, unsigned char const*, char const*) + 71
1 dyld 0x0000000117024aca ImageLoaderMachOCompressed::findShallowExportedSymbol(char const*, ImageLoader const**) const + 74
2 dyld 0x000000011701ea35 ImageLoaderMachO::findExportedSymbol(char const*, bool, char const*, ImageLoader const**) const + 39
3 dyld 0x00000001170195dc ImageLoader::findExportedSymbolAddress(ImageLoader::LinkContext const&, char const*, ImageLoader const*, int, bool, ImageLoader const**, unsigned long*) const + 50
4 dyld 0x000000011702246e ImageLoaderMachOClassic::resolveUndefined(ImageLoader::LinkContext const&, macho_nlist const*, bool, bool, bool, ImageLoader const**) + 692
5 dyld 0x0000000117022b27 ImageLoaderMachOClassic::doBindLazySymbol(unsigned long*, ImageLoader::LinkContext const&) + 295
6 dyld 0x000000011700e73c dyld::bindLazySymbol(mach_header const*, unsigned long*) + 105
7 dyld 0x0000000117020bf6 stub_binding_helper + 118
8 libjlinkarm.dylib 0x000000010818d000 0x10818d000 + 0
9 libjlinkarm.dylib 0x00000001082c9d27 0x10818d000 + 1297703
10 libjlinkarm.dylib 0x000000010825c61d 0x10818d000 + 849437
11 libjlinkarm.dylib 0x000000010825c4c5 0x10818d000 + 849093
12 libjlinkarm.dylib 0x00000001082a38d8 0x10818d000 + 1140952
13 libjlinkarm.dylib 0x00000001082a39e7 JLINKARM_OpenEx + 55
14 libjlinkarm_nrf52_nrfjprogdll.dylib 0x00000001081737a1 NRFJPROG_connect_to_emu_without_snr + 465
15 libjlinkarm_nrf52_nrfjprogdll.dylib 0x0000000108173572 NRFJPROG_connect_to_emu_with_snr + 354
16 _ctypes.so 0x00000001080827e7 ffi_call_unix64 + 79
17 _ctypes.so 0x0000000108083020 ffi_call + 836
18 _ctypes.so 0x000000010807e367 _ctypes_callproc + 592
19 _ctypes.so 0x00000001080786c3 PyCFuncPtr_call + 1087
20 org.python.python 0x0000000107705874 PyObject_Call + 100
21 org.python.python 0x00000001077888c6 PyEval_EvalFrameEx + 27928
22 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
23 org.python.python 0x00000001077245ba function_call + 350
24 org.python.python 0x0000000107705874 PyObject_Call + 100
25 org.python.python 0x00000001077891a2 PyEval_EvalFrameEx + 30196
26 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
27 org.python.python 0x00000001077245ba function_call + 350
28 org.python.python 0x0000000107705874 PyObject_Call + 100
29 org.python.python 0x00000001077891a2 PyEval_EvalFrameEx + 30196
30 org.python.python 0x000000010778cd50 fast_function + 265
31 org.python.python 0x0000000107788999 PyEval_EvalFrameEx + 28139
32 org.python.python 0x000000010778cd50 fast_function + 265
33 org.python.python 0x0000000107788999 PyEval_EvalFrameEx + 28139
34 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
35 org.python.python 0x00000001077245ba function_call + 350
36 org.python.python 0x0000000107705874 PyObject_Call + 100
37 org.python.python 0x00000001077108a6 instancemethod_call + 177
38 org.python.python 0x0000000107705874 PyObject_Call + 100
39 org.python.python 0x000000010774e816 slot_tp_init + 68
40 org.python.python 0x0000000107749e5a type_call + 182
41 org.python.python 0x0000000107705874 PyObject_Call + 100
42 org.python.python 0x00000001077888c6 PyEval_EvalFrameEx + 27928
43 org.python.python 0x000000010778cd50 fast_function + 265
44 org.python.python 0x0000000107788999 PyEval_EvalFrameEx + 28139
45 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
46 org.python.python 0x00000001077245ba function_call + 350
47 org.python.python 0x0000000107705874 PyObject_Call + 100
48 org.python.python 0x00000001077108a6 instancemethod_call + 177
49 org.python.python 0x0000000107705874 PyObject_Call + 100
50 org.python.python 0x000000010774e816 slot_tp_init + 68
51 org.python.python 0x0000000107749e5a type_call + 182
52 org.python.python 0x0000000107705874 PyObject_Call + 100
53 org.python.python 0x00000001077888c6 PyEval_EvalFrameEx + 27928
54 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
55 org.python.python 0x000000010778130f PyEval_EvalCode + 48
56 org.python.python 0x00000001077a6313 run_mod + 53
57 org.python.python 0x00000001077a63bd PyRun_FileExFlags + 133
58 org.python.python 0x00000001077a5eb4 PyRun_SimpleFileExFlags + 692
59 org.python.python 0x00000001077b78f0 Py_Main + 3120
60 libdyld.dylib 0x00007fffb59b3255 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fffb5ae1c86 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fffb5bcb96a _pthread_cond_wait + 712
2 libjlinkarm.dylib 0x00000001082f6adb 0x10818d000 + 1481435
3 libjlinkarm.dylib 0x00000001082ff416 0x10818d000 + 1516566
4 libjlinkarm.dylib 0x00000001082f6736 0x10818d000 + 1480502
5 libsystem_pthread.dylib 0x00007fffb5bcaaab _pthread_body + 180
6 libsystem_pthread.dylib 0x00007fffb5bca9f7 _pthread_start + 286
7 libsystem_pthread.dylib 0x00007fffb5bca1fd thread_start + 13
Thread 2:
0 libsystem_kernel.dylib 0x00007fffb5ae1c86 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fffb5bcb96a _pthread_cond_wait + 712
2 org.python.python 0x00000001077b5a51 PyThread_acquire_lock + 101
3 org.python.python 0x00000001077b9daf lock_PyThread_acquire_lock + 71
4 org.python.python 0x0000000107788a7f PyEval_EvalFrameEx + 28369
5 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
6 org.python.python 0x000000010778ccbc fast_function + 117
7 org.python.python 0x0000000107788999 PyEval_EvalFrameEx + 28139
8 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
9 org.python.python 0x00000001077245ba function_call + 350
10 org.python.python 0x0000000107705874 PyObject_Call + 100
11 org.python.python 0x00000001077891a2 PyEval_EvalFrameEx + 30196
12 org.python.python 0x000000010778cd50 fast_function + 265
13 org.python.python 0x0000000107788999 PyEval_EvalFrameEx + 28139
14 org.python.python 0x000000010778cd50 fast_function + 265
15 org.python.python 0x0000000107788999 PyEval_EvalFrameEx + 28139
16 org.python.python 0x00000001077819a1 PyEval_EvalCodeEx + 1676
17 org.python.python 0x00000001077245ba function_call + 350
18 org.python.python 0x0000000107705874 PyObject_Call + 100
19 org.python.python 0x00000001077108a6 instancemethod_call + 177
20 org.python.python 0x0000000107705874 PyObject_Call + 100
21 org.python.python 0x000000010778c67e PyEval_CallObjectWithKeywords + 175
22 org.python.python 0x00000001077b9beb t_bootstrap + 70
23 libsystem_pthread.dylib 0x00007fffb5bcaaab _pthread_body + 180
24 libsystem_pthread.dylib 0x00007fffb5bca9f7 _pthread_start + 286
25 libsystem_pthread.dylib 0x00007fffb5bca1fd thread_start + 13
Thread 3 Crashed:
0 libjlinkarm.dylib 0x00000001082f4cea 0x10818d000 + 1473770
1 libjlinkarm.dylib 0x00000001082ec282 0x10818d000 + 1438338
2 libjlinkarm.dylib 0x00000001082f6736 0x10818d000 + 1480502
3 libsystem_pthread.dylib 0x00007fffb5bcaaab _pthread_body + 180
4 libsystem_pthread.dylib 0x00007fffb5bca9f7 _pthread_start + 286
5 libsystem_pthread.dylib 0x00007fffb5bca1fd thread_start + 13
Thread 3 crashed with X86 Thread State (64-bit):
rax: 0x0000000080000000 rbx: 0x00000000ffffffff rcx: 0xffffffffffffffff rdx: 0x07ffffffffffffff
rdi: 0x00000000ffffffff rsi: 0x000000000000000a rbp: 0x000070000f366d70 rsp: 0x000070000f366cd0
r8: 0x000070000f2e6000 r9: 0x0000000000083000 r10: 0x0000000000000001 r11: 0x0000000000000202
r12: 0x00000001082f6730 r13: 0x0000000000000d77 r14: 0x000000000c0008ff r15: 0x00000001082ec250
rip: 0x00000001082f4cea rfl: 0x0000000000010a07 cr2: 0x00000001082ec250
Logical CPU: 3
Error Code: 0x00000000
Trap Number: 12
Binary Images:
0x1076f6000 - 0x1076f7fff +org.python.python (2.7.12 - 2.7.12) <5383D86E-6C3F-3581-9CD7-DF81FA0F2529> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
0x1076fb000 - 0x1077f5ff7 +org.python.python (2.7.12, [c] 2001-2016 Python Software Foundation. - 2.7.12) <0A176B7F-15AC-3D6B-8DD8-16D04635958F> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/Python
0x107a2a000 - 0x107a2cfff +_locale.so (0) <9C44439A-75D7-3D53-B914-8347E4F5E339> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
0x107a6f000 - 0x107a72ff7 +_collections.so (0) <340151E5-8EB6-3EA5-AE3D-6F1DDC0F82E4> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so
0x107a77000 - 0x107a7afff +operator.so (0) <5ABD4DF6-4AE6-34A8-9029-DC9528A2A460> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
0x107a80000 - 0x107a85fff +itertools.so (0) <4CAE100B-E895-3A9C-8934-F471A674CDD7> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
0x107a8e000 - 0x107a8ffff +_heapq.so (0) <F4EAC90B-CC7E-386C-B0B8-4BFF40AF30EB> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so
0x107ad3000 - 0x107ad6fff +strop.so (0) <B4BB0760-1E58-3CE2-9047-D7AEEC817AF5> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so
0x107b1a000 - 0x107b1bfff +_functools.so (0) <7A3C1375-600F-33F7-9708-068E46FBF879> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
0x107b1e000 - 0x107b21ffb +_struct.so (0) <DC43AB84-474D-321F-873F-DDF97A55DDFD> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
0x107c67000 - 0x107c68ffb +time.so (0) <C2D12187-4172-348C-87B5-78637B91BF53> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
0x107c6e000 - 0x107c70ffb +select.so (0) <853F024D-026E-31EA-B929-5F9EA44015A5> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
0x107c75000 - 0x107c76fff +fcntl.so (0) <13A5D03C-DAD5-3987-9510-721FCC325621> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so
0x107c79000 - 0x107c7cff3 +binascii.so (0) <63323838-7CAA-3228-867B-2C72C9A04BF1> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so
0x107c7f000 - 0x107c80fff +cStringIO.so (0) <F1F28242-C626-3A86-832E-6FFC1BB22E38> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so
0x107c85000 - 0x107c88fff +_multiprocessing.so (0) <AE3B184E-D3B0-31E6-ADDA-4EC383D2F4C3> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_multiprocessing.so
0x107c8c000 - 0x107c97fff +cPickle.so (0) <7F49AD71-7D4B-3FAE-B4B2-D99E0FCE46EB> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so
0x107d5d000 - 0x107d60ff7 +math.so (0) <39537599-2121-3706-9824-20C30239BEA6> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so
0x107d65000 - 0x107d6cff7 +_socket.so (0) <CD911ADB-8972-3FFD-8038-FDFE4D9A3D0F> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so
0x107d76000 - 0x107d81ffb +_ssl.so (0) <1B37E584-4079-3201-AB3F-81092F7D42B3> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so
0x107d8b000 - 0x107dcaff7 +libssl.1.0.0.dylib (0) <E53E5937-3FD6-3678-B8FC-7B00E4432765> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
0x107de7000 - 0x107f59af7 +libcrypto.1.0.0.dylib (0) <B456196C-5315-37C6-93FA-FF73E85AA50B> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
0x108011000 - 0x108020fff +_io.so (0) <790FFD82-D53E-358B-853A-70A3E05A3D60> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
0x108032000 - 0x108032fff +future_builtins.so (0) <F61AF10C-80AE-307D-82D9-7DDB83515671> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/future_builtins.so
0x108075000 - 0x108085fff +_ctypes.so (0) <1548EDC7-BA86-3207-8F12-690F40533B24> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so
0x1080d1000 - 0x1080d5fff +array.so (0) <DABD32C6-58B0-3810-9D5B-55B668851A25> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so
0x1080db000 - 0x1080dbfff +_bisect.so (0) <BDA9729E-BFE5-3449-849C-90FE8D8A409D> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so
0x10811e000 - 0x108120fff +_hashlib.so (0) <82BB51A6-C34F-36F1-927F-ABBC37415901> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so
0x108124000 - 0x108125ffb +_random.so (0) <AC583AE1-E2C8-330C-A604-5E9609D6C95C> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so
0x108168000 - 0x10816dfff +libnrfjprogdll.dylib (0) <132DE2D4-8F99-32E3-A28C-DC4D2E6CE011> /usr/local/lib/python2.7/site-packages/pynrfjprog/osx_dylib/libnrfjprogdll.dylib
0x108171000 - 0x108187fff +libjlinkarm_nrf52_nrfjprogdll.dylib (0) <A41058CD-EEB6-35FC-AA13-44F407FAA5E6> /usr/local/lib/python2.7/site-packages/pynrfjprog/osx_dylib/libjlinkarm_nrf52_nrfjprogdll.dylib
0x10818d000 - 0x1084fefff +libjlinkarm.dylib (6.10.9) <FD81BD33-9BE4-3FB1-884C-F7DA5703495C> /Applications/SEGGER/*/libjlinkarm.dylib
0x11700a000 - 0x117047267 dyld (421.2) <947FC440-80F9-32F7-A773-6FC418FE1AB7> /usr/lib/dyld
0x7fffa03d3000 - 0x7fffa086dfff com.apple.CoreFoundation (6.9 - 1348.28) <A40AA224-7A50-3989-95D0-5A228A0E2FAF> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fffa23b5000 - 0x7fffa244aff7 com.apple.framework.IOKit (2.0.2 - 1324.30.13) <163BE7FA-B29A-348F-8B5F-E301F2E8C964> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fffb41d1000 - 0x7fffb41d2ff3 libDiagnosticMessagesClient.dylib (102) <422911A4-E273-3E88-BFC4-DF6470E48242> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fffb4410000 - 0x7fffb4411ff3 libSystem.B.dylib (1238) <FF55E335-37C3-3567-9415-A3A1473775F5> /usr/lib/libSystem.B.dylib
0x7fffb4529000 - 0x7fffb4529ff3 libauto.dylib (187) <5BBF6A00-CC76-389D-84E7-CA88EDADE683> /usr/lib/libauto.dylib
0x7fffb452a000 - 0x7fffb453aff3 libbsm.0.dylib (34) <20084796-B04D-3B35-A003-EA11459557A9> /usr/lib/libbsm.0.dylib
0x7fffb454a000 - 0x7fffb45a0ff7 libc++.1.dylib (307.4) <BEE86868-F831-384C-919E-2B286ACFE87C> /usr/lib/libc++.1.dylib
0x7fffb45a1000 - 0x7fffb45cbfff libc++abi.dylib (307.2) <1CEF8ABB-7E6D-3C2F-8E0A-E7884478DD23> /usr/lib/libc++abi.dylib
0x7fffb49e1000 - 0x7fffb49ffff3 libedit.3.dylib (48) <2D3593DF-8DF9-3813-B0C2-6938BC77FC79> /usr/lib/libedit.3.dylib
0x7fffb4a00000 - 0x7fffb4a00fff libenergytrace.dylib (15) <A1B040A2-7977-3097-9ADF-34FF181EB970> /usr/lib/libenergytrace.dylib
0x7fffb4b09000 - 0x7fffb4d2effb libicucore.A.dylib (57149.0.1) <6B5FDA93-AA88-318F-9608-C2A33D602EC7> /usr/lib/libicucore.A.dylib
0x7fffb500f000 - 0x7fffb5040ffb libncurses.5.4.dylib (51.30.1) <A8C8F837-86A2-3EC2-B2D2-6E8A267847E4> /usr/lib/libncurses.5.4.dylib
0x7fffb50bb000 - 0x7fffb548bd97 libobjc.A.dylib (706) <F9AFE665-A3A2-3285-9495-19803A565861> /usr/lib/libobjc.A.dylib
0x7fffb58b5000 - 0x7fffb58c6ff3 libz.1.dylib (67) <46E3FFA2-4328-327A-8D34-A03E20BFFB8E> /usr/lib/libz.1.dylib
0x7fffb58d5000 - 0x7fffb58d9ff7 libcache.dylib (79) <0C8092D3-600F-3ADD-A036-F225B6CDCA43> /usr/lib/system/libcache.dylib
0x7fffb58da000 - 0x7fffb58e5ff7 libcommonCrypto.dylib (60092.30.2) <B16E29B6-EC8D-3A8F-9A89-DD9CF35F7C4B> /usr/lib/system/libcommonCrypto.dylib
0x7fffb58e6000 - 0x7fffb58edfff libcompiler_rt.dylib (62) <E992E8D9-037C-3454-A366-A25E4D31D6BB> /usr/lib/system/libcompiler_rt.dylib
0x7fffb58ee000 - 0x7fffb58f6fff libcopyfile.dylib (138) <64E285D9-5485-333B-AEE7-8B0C8FB9275F> /usr/lib/system/libcopyfile.dylib
0x7fffb58f7000 - 0x7fffb597afdf libcorecrypto.dylib (442.30.20) <2074B932-FD79-30A9-8E90-AF25C49F2AF1> /usr/lib/system/libcorecrypto.dylib
0x7fffb597b000 - 0x7fffb59adfff libdispatch.dylib (703.30.5) <EA0CC14E-D559-3802-B4B2-0E8C7579AAC4> /usr/lib/system/libdispatch.dylib
0x7fffb59ae000 - 0x7fffb59b3ff3 libdyld.dylib (421.2) <E5A2414F-2480-3BB2-BE94-176119A80876> /usr/lib/system/libdyld.dylib
0x7fffb59b4000 - 0x7fffb59b4ffb libkeymgr.dylib (28) <1A318923-1200-3B06-B432-5007D82F195D> /usr/lib/system/libkeymgr.dylib
0x7fffb59b5000 - 0x7fffb59c1ffb libkxld.dylib (3789.31.2) <524D7C3D-73EB-3F62-ADB1-9DFBACB95924> /usr/lib/system/libkxld.dylib
0x7fffb59c2000 - 0x7fffb59c2fff liblaunch.dylib (972.30.7) <15FACC21-079A-3BDF-9AFB-4253EFDEB587> /usr/lib/system/liblaunch.dylib
0x7fffb59c3000 - 0x7fffb59c8fff libmacho.dylib (894) <A2F38EC1-C37C-3B93-B0E4-36B07C177F8C> /usr/lib/system/libmacho.dylib
0x7fffb59c9000 - 0x7fffb59cbff3 libquarantine.dylib (85) <C1D7749F-5F5F-3BB9-BEFC-1F0B9DA941FD> /usr/lib/system/libquarantine.dylib
0x7fffb59cc000 - 0x7fffb59cdffb libremovefile.dylib (45) <CD42974E-BE0B-39FC-9BFC-8A7540A04DC6> /usr/lib/system/libremovefile.dylib
0x7fffb59ce000 - 0x7fffb59e6ff7 libsystem_asl.dylib (349.30.2) <EFAC72D7-CB13-3DF7-ADF3-EC6635C6F1EA> /usr/lib/system/libsystem_asl.dylib
0x7fffb59e7000 - 0x7fffb59e7ff7 libsystem_blocks.dylib (67) <B8C3701D-5A91-3D35-999D-2DC8D5393525> /usr/lib/system/libsystem_blocks.dylib
0x7fffb59e8000 - 0x7fffb5a75fef libsystem_c.dylib (1158.30.7) <2F881962-03CB-3B9D-A782-D98C1BBA4E3D> /usr/lib/system/libsystem_c.dylib
0x7fffb5a76000 - 0x7fffb5a79ffb libsystem_configuration.dylib (888.30.2) <4FE3983C-E4ED-3939-A578-03AD29C99788> /usr/lib/system/libsystem_configuration.dylib
0x7fffb5a7a000 - 0x7fffb5a7dfff libsystem_coreservices.dylib (41.4) <1A572B9E-0C47-320F-8C64-7990D0A5FB5A> /usr/lib/system/libsystem_coreservices.dylib
0x7fffb5a7e000 - 0x7fffb5a96ff3 libsystem_coretls.dylib (121.31.1) <4676F06D-274D-31BE-B61C-4D7A4AEF4858> /usr/lib/system/libsystem_coretls.dylib
0x7fffb5a97000 - 0x7fffb5a9dfff libsystem_dnssd.dylib (765.30.11) <DC708D84-ED7D-3936-B996-A67C66B8DDAA> /usr/lib/system/libsystem_dnssd.dylib
0x7fffb5a9e000 - 0x7fffb5ac7ff7 libsystem_info.dylib (503.30.1) <9ED9121C-F111-3FAD-BC2F-C95DEE1C9362> /usr/lib/system/libsystem_info.dylib
0x7fffb5ac8000 - 0x7fffb5aeaff7 libsystem_kernel.dylib (3789.31.2) <FCEEBBD4-DF66-34D8-A32F-4F8C8E814E40> /usr/lib/system/libsystem_kernel.dylib
0x7fffb5aeb000 - 0x7fffb5b32fe7 libsystem_m.dylib (3121.4) <266DB92B-A86F-3691-80FB-1B26AD73CFF3> /usr/lib/system/libsystem_m.dylib
0x7fffb5b33000 - 0x7fffb5b51ff7 libsystem_malloc.dylib (116.30.3) <F40DEE3B-386A-3529-A3F7-98117ED55BF4> /usr/lib/system/libsystem_malloc.dylib
0x7fffb5b52000 - 0x7fffb5ba9ffb libsystem_network.dylib (856.30.16) <4AE368E9-605D-379D-B04C-2AC7455B8250> /usr/lib/system/libsystem_network.dylib
0x7fffb5baa000 - 0x7fffb5bb3ff3 libsystem_networkextension.dylib (563.30.15) <EB020B0C-7DF0-3EEF-8E3C-15DA3C01D687> /usr/lib/system/libsystem_networkextension.dylib
0x7fffb5bb4000 - 0x7fffb5bbdff3 libsystem_notify.dylib (165.20.1) <E7FD3A7C-DD07-36E2-9FA4-7561F9F114DA> /usr/lib/system/libsystem_notify.dylib
0x7fffb5bbe000 - 0x7fffb5bc6fe7 libsystem_platform.dylib (126.1.2) <3CA06D4E-C00A-36DE-AA65-3A390097D1F6> /usr/lib/system/libsystem_platform.dylib
0x7fffb5bc7000 - 0x7fffb5bd1ff7 libsystem_pthread.dylib (218.30.1) <C869ED7C-BE29-3532-8E69-3A8DA1447EDC> /usr/lib/system/libsystem_pthread.dylib
0x7fffb5bd2000 - 0x7fffb5bd5ff7 libsystem_sandbox.dylib (592.31.1) <7BBFDF96-293F-3DD9-B3A4-7C168280B441> /usr/lib/system/libsystem_sandbox.dylib
0x7fffb5bd6000 - 0x7fffb5bd7fff libsystem_secinit.dylib (24) <5C1F1E47-0F7D-3E25-8DEB-D9DB1F902281> /usr/lib/system/libsystem_secinit.dylib
0x7fffb5bd8000 - 0x7fffb5bdffff libsystem_symptoms.dylib (532.30.6) <5D990CF5-B58F-39F7-B375-99B4EC62CFBD> /usr/lib/system/libsystem_symptoms.dylib
0x7fffb5be0000 - 0x7fffb5c00ff7 libsystem_trace.dylib (518.30.7) <5BD4ECD4-75CA-38EA-AF5C-B481C15955F8> /usr/lib/system/libsystem_trace.dylib
0x7fffb5c01000 - 0x7fffb5c06ffb libunwind.dylib (35.3) <9F7C2AD8-A9A7-3DE4-828D-B0F0F166AAA0> /usr/lib/system/libunwind.dylib
0x7fffb5c07000 - 0x7fffb5c30ff7 libxpc.dylib (972.30.7) <65E41BB6-EBD5-3D93-B0BE-B190CEE4DD93> /usr/lib/system/libxpc.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 13899
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=135.2M resident=0K(0%) swapped_out_or_unallocated=135.2M(100%)
Writable regions: Total=57.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=57.0M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 8K 2
MALLOC 37.1M 10
MALLOC guard page 16K 4
STACK GUARD 56.0M 5
Stack 13.0M 5
VM_ALLOCATE 4616K 16
__DATA 13.0M 88
__LINKEDIT 112.8M 35
__TEXT 22.5M 83
__UNICODE 556K 2
shared memory 12K 4
=========== ======= =======
TOTAL 259.5M 243
Model: MacBookPro12,1, BootROM MBP121.0167.B18, 2 processors, Intel Core i5, 2.7 GHz, 16 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445424533303445422D45474346202020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445424533303445422D45474346202020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.21.171.68.1a4)
Bluetooth: Version 5.0.2f4, 3 services, 27 devices, 1 incoming serial ports
Network Service: Thunderbolt Ethernet, Ethernet, en3
Network Service: Wi-Fi, AirPort, en0
PCI Card: Apple 57762-A0, Ethernet Controller, Thunderbolt@195,0,0
Serial ATA Device: APPLE SSD SM0256G, 251 GB
USB Device: USB 3.0 Bus
USB Device: USB3.0 Hub
USB Device: Bluetooth USB Host Controller
USB Device: J-Link
USB Device: USB3.0 Hub
USB Device: FT232R USB UART
USB Device: USB Laser Mouse
USB Device: Side print
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
Thunderbolt Device: Thunderbolt to Gigabit Ethernet Adapter, Apple Inc., 1, 5.5
Process: Python [11574]
Path: /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.12 (2.7.12)
Code Type: X86-64 (Native)
Parent Process: Python [11573]
Responsible: Python [11574]
User ID: 504
Date/Time: 2016-12-22 11:35:18.555 -0800
OS Version: Mac OS X 10.12.2 (16C67)
Report Version: 12
Anonymous UUID: 02C22CBB-2A78-DFBE-5EF9-44CD25C3F931
Sleep/Wake UUID: 16DEB095-FF87-43C8-8EE3-C356BD0A45EC
Time Awake Since Boot: 3000 seconds
Time Since Wake: 1800 seconds
System Integrity Protection: enabled
Crashed Thread: 3
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x000000000000000c, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]
Application Specific Information:
crashed on child side of fork pre-exec
Thread 0:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fffa03efdc0 CFEqual + 0
1 com.apple.CoreFoundation 0x00007fffa03de6ad CFBasicHashSetValue + 1261
2 com.apple.CoreFoundation 0x00007fffa03de13d CFDictionarySetValue + 221
3 libjlinkarm.dylib 0x00000001049b3671 0x104843000 + 1508977
4 libjlinkarm.dylib 0x000000010497fd27 0x104843000 + 1297703
5 libjlinkarm.dylib 0x000000010491261d 0x104843000 + 849437
6 libjlinkarm.dylib 0x00000001049124c5 0x104843000 + 849093
7 libjlinkarm.dylib 0x00000001049598d8 0x104843000 + 1140952
8 libjlinkarm.dylib 0x00000001049599e7 JLINKARM_OpenEx + 55
9 libjlinkarm_nrf52_nrfjprogdll.dylib 0x00000001048297a1 NRFJPROG_connect_to_emu_without_snr + 465
10 libjlinkarm_nrf52_nrfjprogdll.dylib 0x0000000104829572 NRFJPROG_connect_to_emu_with_snr + 354
11 _ctypes.so 0x00000001047387e7 ffi_call_unix64 + 79
12 _ctypes.so 0x0000000104739020 ffi_call + 836
13 _ctypes.so 0x0000000104734367 _ctypes_callproc + 592
14 _ctypes.so 0x000000010472e6c3 PyCFuncPtr_call + 1087
15 org.python.python 0x0000000103dbd874 PyObject_Call + 100
16 org.python.python 0x0000000103e408c6 PyEval_EvalFrameEx + 27928
17 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
18 org.python.python 0x0000000103ddc5ba function_call + 350
19 org.python.python 0x0000000103dbd874 PyObject_Call + 100
20 org.python.python 0x0000000103e411a2 PyEval_EvalFrameEx + 30196
21 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
22 org.python.python 0x0000000103ddc5ba function_call + 350
23 org.python.python 0x0000000103dbd874 PyObject_Call + 100
24 org.python.python 0x0000000103e411a2 PyEval_EvalFrameEx + 30196
25 org.python.python 0x0000000103e44d50 fast_function + 265
26 org.python.python 0x0000000103e40999 PyEval_EvalFrameEx + 28139
27 org.python.python 0x0000000103e44d50 fast_function + 265
28 org.python.python 0x0000000103e40999 PyEval_EvalFrameEx + 28139
29 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
30 org.python.python 0x0000000103ddc5ba function_call + 350
31 org.python.python 0x0000000103dbd874 PyObject_Call + 100
32 org.python.python 0x0000000103dc88a6 instancemethod_call + 177
33 org.python.python 0x0000000103dbd874 PyObject_Call + 100
34 org.python.python 0x0000000103e06816 slot_tp_init + 68
35 org.python.python 0x0000000103e01e5a type_call + 182
36 org.python.python 0x0000000103dbd874 PyObject_Call + 100
37 org.python.python 0x0000000103e408c6 PyEval_EvalFrameEx + 27928
38 org.python.python 0x0000000103e44d50 fast_function + 265
39 org.python.python 0x0000000103e40999 PyEval_EvalFrameEx + 28139
40 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
41 org.python.python 0x0000000103ddc5ba function_call + 350
42 org.python.python 0x0000000103dbd874 PyObject_Call + 100
43 org.python.python 0x0000000103dc88a6 instancemethod_call + 177
44 org.python.python 0x0000000103dbd874 PyObject_Call + 100
45 org.python.python 0x0000000103e06816 slot_tp_init + 68
46 org.python.python 0x0000000103e01e5a type_call + 182
47 org.python.python 0x0000000103dbd874 PyObject_Call + 100
48 org.python.python 0x0000000103e408c6 PyEval_EvalFrameEx + 27928
49 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
50 org.python.python 0x0000000103e3930f PyEval_EvalCode + 48
51 org.python.python 0x0000000103e5e313 run_mod + 53
52 org.python.python 0x0000000103e5e3bd PyRun_FileExFlags + 133
53 org.python.python 0x0000000103e5deb4 PyRun_SimpleFileExFlags + 692
54 org.python.python 0x0000000103e6f8f0 Py_Main + 3120
55 libdyld.dylib 0x00007fffb59b3255 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fffb5ae1c86 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fffb5bcb96a _pthread_cond_wait + 712
2 libjlinkarm.dylib 0x00000001049acadb 0x104843000 + 1481435
3 libjlinkarm.dylib 0x00000001049b5416 0x104843000 + 1516566
4 libjlinkarm.dylib 0x00000001049ac736 0x104843000 + 1480502
5 libsystem_pthread.dylib 0x00007fffb5bcaaab _pthread_body + 180
6 libsystem_pthread.dylib 0x00007fffb5bca9f7 _pthread_start + 286
7 libsystem_pthread.dylib 0x00007fffb5bca1fd thread_start + 13
Thread 2:
0 libsystem_kernel.dylib 0x00007fffb5ae1c86 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fffb5bcb96a _pthread_cond_wait + 712
2 org.python.python 0x0000000103e6da51 PyThread_acquire_lock + 101
3 org.python.python 0x0000000103e71daf lock_PyThread_acquire_lock + 71
4 org.python.python 0x0000000103e40a7f PyEval_EvalFrameEx + 28369
5 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
6 org.python.python 0x0000000103e44cbc fast_function + 117
7 org.python.python 0x0000000103e40999 PyEval_EvalFrameEx + 28139
8 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
9 org.python.python 0x0000000103ddc5ba function_call + 350
10 org.python.python 0x0000000103dbd874 PyObject_Call + 100
11 org.python.python 0x0000000103e411a2 PyEval_EvalFrameEx + 30196
12 org.python.python 0x0000000103e44d50 fast_function + 265
13 org.python.python 0x0000000103e40999 PyEval_EvalFrameEx + 28139
14 org.python.python 0x0000000103e44d50 fast_function + 265
15 org.python.python 0x0000000103e40999 PyEval_EvalFrameEx + 28139
16 org.python.python 0x0000000103e399a1 PyEval_EvalCodeEx + 1676
17 org.python.python 0x0000000103ddc5ba function_call + 350
18 org.python.python 0x0000000103dbd874 PyObject_Call + 100
19 org.python.python 0x0000000103dc88a6 instancemethod_call + 177
20 org.python.python 0x0000000103dbd874 PyObject_Call + 100
21 org.python.python 0x0000000103e4467e PyEval_CallObjectWithKeywords + 175
22 org.python.python 0x0000000103e71beb t_bootstrap + 70
23 libsystem_pthread.dylib 0x00007fffb5bcaaab _pthread_body + 180
24 libsystem_pthread.dylib 0x00007fffb5bca9f7 _pthread_start + 286
25 libsystem_pthread.dylib 0x00007fffb5bca1fd thread_start + 13
Thread 3 Crashed:
0 libjlinkarm.dylib 0x00000001049aacea 0x104843000 + 1473770
1 libjlinkarm.dylib 0x00000001049a2282 0x104843000 + 1438338
2 libjlinkarm.dylib 0x00000001049ac736 0x104843000 + 1480502
3 libsystem_pthread.dylib 0x00007fffb5bcaaab _pthread_body + 180
4 libsystem_pthread.dylib 0x00007fffb5bca9f7 _pthread_start + 286
5 libsystem_pthread.dylib 0x00007fffb5bca1fd thread_start + 13
Thread 3 crashed with X86 Thread State (64-bit):
rax: 0x0000000080000000 rbx: 0x00000000ffffffff rcx: 0xffffffffffffffff rdx: 0x07ffffffffffffff
rdi: 0x00000000ffffffff rsi: 0x000000000000000a rbp: 0x000070000e9d4d70 rsp: 0x000070000e9d4cd0
r8: 0x000070000e954000 r9: 0x0000000000083000 r10: 0x0000000000000001 r11: 0x0000000000000202
r12: 0x00000001049ac730 r13: 0x0000000000000d77 r14: 0x000000000c0008ff r15: 0x00000001049a2250
rip: 0x00000001049aacea rfl: 0x0000000000010a07 cr2: 0x00000001049a2250
Logical CPU: 1
Error Code: 0x00000000
Trap Number: 12
Binary Images:
0x103dac000 - 0x103dadfff +org.python.python (2.7.12 - 2.7.12) <5383D86E-6C3F-3581-9CD7-DF81FA0F2529> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
0x103db3000 - 0x103eadff7 +org.python.python (2.7.12, [c] 2001-2016 Python Software Foundation. - 2.7.12) <0A176B7F-15AC-3D6B-8DD8-16D04635958F> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/Python
0x1040e0000 - 0x1040e2fff +_locale.so (0) <9C44439A-75D7-3D53-B914-8347E4F5E339> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
0x104125000 - 0x104128ff7 +_collections.so (0) <340151E5-8EB6-3EA5-AE3D-6F1DDC0F82E4> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so
0x10412d000 - 0x104130fff +operator.so (0) <5ABD4DF6-4AE6-34A8-9029-DC9528A2A460> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
0x104136000 - 0x10413bfff +itertools.so (0) <4CAE100B-E895-3A9C-8934-F471A674CDD7> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
0x104144000 - 0x104145fff +_heapq.so (0) <F4EAC90B-CC7E-386C-B0B8-4BFF40AF30EB> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so
0x104189000 - 0x10418cfff +strop.so (0) <B4BB0760-1E58-3CE2-9047-D7AEEC817AF5> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so
0x1041d0000 - 0x1041d1fff +_functools.so (0) <7A3C1375-600F-33F7-9708-068E46FBF879> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
0x1041d4000 - 0x1041d7ffb +_struct.so (0) <DC43AB84-474D-321F-873F-DDF97A55DDFD> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
0x10431d000 - 0x10431effb +time.so (0) <C2D12187-4172-348C-87B5-78637B91BF53> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
0x104324000 - 0x104326ffb +select.so (0) <853F024D-026E-31EA-B929-5F9EA44015A5> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
0x10432b000 - 0x10432cfff +fcntl.so (0) <13A5D03C-DAD5-3987-9510-721FCC325621> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so
0x10432f000 - 0x104332ff3 +binascii.so (0) <63323838-7CAA-3228-867B-2C72C9A04BF1> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so
0x104335000 - 0x104336fff +cStringIO.so (0) <F1F28242-C626-3A86-832E-6FFC1BB22E38> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so
0x10433b000 - 0x10433efff +_multiprocessing.so (0) <AE3B184E-D3B0-31E6-ADDA-4EC383D2F4C3> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_multiprocessing.so
0x104342000 - 0x10434dfff +cPickle.so (0) <7F49AD71-7D4B-3FAE-B4B2-D99E0FCE46EB> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so
0x104413000 - 0x104416ff7 +math.so (0) <39537599-2121-3706-9824-20C30239BEA6> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so
0x10441b000 - 0x104422ff7 +_socket.so (0) <CD911ADB-8972-3FFD-8038-FDFE4D9A3D0F> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so
0x10442c000 - 0x104437ffb +_ssl.so (0) <1B37E584-4079-3201-AB3F-81092F7D42B3> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so
0x104441000 - 0x104480ff7 +libssl.1.0.0.dylib (0) <E53E5937-3FD6-3678-B8FC-7B00E4432765> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
0x10449d000 - 0x10460faf7 +libcrypto.1.0.0.dylib (0) <B456196C-5315-37C6-93FA-FF73E85AA50B> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
0x1046c7000 - 0x1046d6fff +_io.so (0) <790FFD82-D53E-358B-853A-70A3E05A3D60> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
0x1046e8000 - 0x1046e8fff +future_builtins.so (0) <F61AF10C-80AE-307D-82D9-7DDB83515671> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/future_builtins.so
0x10472b000 - 0x10473bfff +_ctypes.so (0) <1548EDC7-BA86-3207-8F12-690F40533B24> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so
0x104787000 - 0x10478bfff +array.so (0) <DABD32C6-58B0-3810-9D5B-55B668851A25> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so
0x104791000 - 0x104791fff +_bisect.so (0) <BDA9729E-BFE5-3449-849C-90FE8D8A409D> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so
0x1047d4000 - 0x1047d6fff +_hashlib.so (0) <82BB51A6-C34F-36F1-927F-ABBC37415901> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so
0x1047da000 - 0x1047dbffb +_random.so (0) <AC583AE1-E2C8-330C-A604-5E9609D6C95C> /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so
0x10481e000 - 0x104823fff +libnrfjprogdll.dylib (0) <132DE2D4-8F99-32E3-A28C-DC4D2E6CE011> /usr/local/lib/python2.7/site-packages/pynrfjprog/osx_dylib/libnrfjprogdll.dylib
0x104827000 - 0x10483dfff +libjlinkarm_nrf52_nrfjprogdll.dylib (0) <A41058CD-EEB6-35FC-AA13-44F407FAA5E6> /usr/local/lib/python2.7/site-packages/pynrfjprog/osx_dylib/libjlinkarm_nrf52_nrfjprogdll.dylib
0x104843000 - 0x104bb4fff +libjlinkarm.dylib (6.10.9) <FD81BD33-9BE4-3FB1-884C-F7DA5703495C> /Applications/SEGGER/*/libjlinkarm.dylib
0x108f08000 - 0x108f45267 dyld (421.2) <947FC440-80F9-32F7-A773-6FC418FE1AB7> /usr/lib/dyld
0x7fffa03d3000 - 0x7fffa086dfff com.apple.CoreFoundation (6.9 - 1348.28) <A40AA224-7A50-3989-95D0-5A228A0E2FAF> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fffa23b5000 - 0x7fffa244aff7 com.apple.framework.IOKit (2.0.2 - 1324.30.13) <163BE7FA-B29A-348F-8B5F-E301F2E8C964> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fffb41d1000 - 0x7fffb41d2ff3 libDiagnosticMessagesClient.dylib (102) <422911A4-E273-3E88-BFC4-DF6470E48242> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fffb4410000 - 0x7fffb4411ff3 libSystem.B.dylib (1238) <FF55E335-37C3-3567-9415-A3A1473775F5> /usr/lib/libSystem.B.dylib
0x7fffb4529000 - 0x7fffb4529ff3 libauto.dylib (187) <5BBF6A00-CC76-389D-84E7-CA88EDADE683> /usr/lib/libauto.dylib
0x7fffb452a000 - 0x7fffb453aff3 libbsm.0.dylib (34) <20084796-B04D-3B35-A003-EA11459557A9> /usr/lib/libbsm.0.dylib
0x7fffb454a000 - 0x7fffb45a0ff7 libc++.1.dylib (307.4) <BEE86868-F831-384C-919E-2B286ACFE87C> /usr/lib/libc++.1.dylib
0x7fffb45a1000 - 0x7fffb45cbfff libc++abi.dylib (307.2) <1CEF8ABB-7E6D-3C2F-8E0A-E7884478DD23> /usr/lib/libc++abi.dylib
0x7fffb49e1000 - 0x7fffb49ffff3 libedit.3.dylib (48) <2D3593DF-8DF9-3813-B0C2-6938BC77FC79> /usr/lib/libedit.3.dylib
0x7fffb4a00000 - 0x7fffb4a00fff libenergytrace.dylib (15) <A1B040A2-7977-3097-9ADF-34FF181EB970> /usr/lib/libenergytrace.dylib
0x7fffb4b09000 - 0x7fffb4d2effb libicucore.A.dylib (57149.0.1) <6B5FDA93-AA88-318F-9608-C2A33D602EC7> /usr/lib/libicucore.A.dylib
0x7fffb500f000 - 0x7fffb5040ffb libncurses.5.4.dylib (51.30.1) <A8C8F837-86A2-3EC2-B2D2-6E8A267847E4> /usr/lib/libncurses.5.4.dylib
0x7fffb50bb000 - 0x7fffb548bd97 libobjc.A.dylib (706) <F9AFE665-A3A2-3285-9495-19803A565861> /usr/lib/libobjc.A.dylib
0x7fffb58b5000 - 0x7fffb58c6ff3 libz.1.dylib (67) <46E3FFA2-4328-327A-8D34-A03E20BFFB8E> /usr/lib/libz.1.dylib
0x7fffb58d5000 - 0x7fffb58d9ff7 libcache.dylib (79) <0C8092D3-600F-3ADD-A036-F225B6CDCA43> /usr/lib/system/libcache.dylib
0x7fffb58da000 - 0x7fffb58e5ff7 libcommonCrypto.dylib (60092.30.2) <B16E29B6-EC8D-3A8F-9A89-DD9CF35F7C4B> /usr/lib/system/libcommonCrypto.dylib
0x7fffb58e6000 - 0x7fffb58edfff libcompiler_rt.dylib (62) <E992E8D9-037C-3454-A366-A25E4D31D6BB> /usr/lib/system/libcompiler_rt.dylib
0x7fffb58ee000 - 0x7fffb58f6fff libcopyfile.dylib (138) <64E285D9-5485-333B-AEE7-8B0C8FB9275F> /usr/lib/system/libcopyfile.dylib
0x7fffb58f7000 - 0x7fffb597afdf libcorecrypto.dylib (442.30.20) <2074B932-FD79-30A9-8E90-AF25C49F2AF1> /usr/lib/system/libcorecrypto.dylib
0x7fffb597b000 - 0x7fffb59adfff libdispatch.dylib (703.30.5) <EA0CC14E-D559-3802-B4B2-0E8C7579AAC4> /usr/lib/system/libdispatch.dylib
0x7fffb59ae000 - 0x7fffb59b3ff3 libdyld.dylib (421.2) <E5A2414F-2480-3BB2-BE94-176119A80876> /usr/lib/system/libdyld.dylib
0x7fffb59b4000 - 0x7fffb59b4ffb libkeymgr.dylib (28) <1A318923-1200-3B06-B432-5007D82F195D> /usr/lib/system/libkeymgr.dylib
0x7fffb59b5000 - 0x7fffb59c1ffb libkxld.dylib (3789.31.2) <524D7C3D-73EB-3F62-ADB1-9DFBACB95924> /usr/lib/system/libkxld.dylib
0x7fffb59c2000 - 0x7fffb59c2fff liblaunch.dylib (972.30.7) <15FACC21-079A-3BDF-9AFB-4253EFDEB587> /usr/lib/system/liblaunch.dylib
0x7fffb59c3000 - 0x7fffb59c8fff libmacho.dylib (894) <A2F38EC1-C37C-3B93-B0E4-36B07C177F8C> /usr/lib/system/libmacho.dylib
0x7fffb59c9000 - 0x7fffb59cbff3 libquarantine.dylib (85) <C1D7749F-5F5F-3BB9-BEFC-1F0B9DA941FD> /usr/lib/system/libquarantine.dylib
0x7fffb59cc000 - 0x7fffb59cdffb libremovefile.dylib (45) <CD42974E-BE0B-39FC-9BFC-8A7540A04DC6> /usr/lib/system/libremovefile.dylib
0x7fffb59ce000 - 0x7fffb59e6ff7 libsystem_asl.dylib (349.30.2) <EFAC72D7-CB13-3DF7-ADF3-EC6635C6F1EA> /usr/lib/system/libsystem_asl.dylib
0x7fffb59e7000 - 0x7fffb59e7ff7 libsystem_blocks.dylib (67) <B8C3701D-5A91-3D35-999D-2DC8D5393525> /usr/lib/system/libsystem_blocks.dylib
0x7fffb59e8000 - 0x7fffb5a75fef libsystem_c.dylib (1158.30.7) <2F881962-03CB-3B9D-A782-D98C1BBA4E3D> /usr/lib/system/libsystem_c.dylib
0x7fffb5a76000 - 0x7fffb5a79ffb libsystem_configuration.dylib (888.30.2) <4FE3983C-E4ED-3939-A578-03AD29C99788> /usr/lib/system/libsystem_configuration.dylib
0x7fffb5a7a000 - 0x7fffb5a7dfff libsystem_coreservices.dylib (41.4) <1A572B9E-0C47-320F-8C64-7990D0A5FB5A> /usr/lib/system/libsystem_coreservices.dylib
0x7fffb5a7e000 - 0x7fffb5a96ff3 libsystem_coretls.dylib (121.31.1) <4676F06D-274D-31BE-B61C-4D7A4AEF4858> /usr/lib/system/libsystem_coretls.dylib
0x7fffb5a97000 - 0x7fffb5a9dfff libsystem_dnssd.dylib (765.30.11) <DC708D84-ED7D-3936-B996-A67C66B8DDAA> /usr/lib/system/libsystem_dnssd.dylib
0x7fffb5a9e000 - 0x7fffb5ac7ff7 libsystem_info.dylib (503.30.1) <9ED9121C-F111-3FAD-BC2F-C95DEE1C9362> /usr/lib/system/libsystem_info.dylib
0x7fffb5ac8000 - 0x7fffb5aeaff7 libsystem_kernel.dylib (3789.31.2) <FCEEBBD4-DF66-34D8-A32F-4F8C8E814E40> /usr/lib/system/libsystem_kernel.dylib
0x7fffb5aeb000 - 0x7fffb5b32fe7 libsystem_m.dylib (3121.4) <266DB92B-A86F-3691-80FB-1B26AD73CFF3> /usr/lib/system/libsystem_m.dylib
0x7fffb5b33000 - 0x7fffb5b51ff7 libsystem_malloc.dylib (116.30.3) <F40DEE3B-386A-3529-A3F7-98117ED55BF4> /usr/lib/system/libsystem_malloc.dylib
0x7fffb5b52000 - 0x7fffb5ba9ffb libsystem_network.dylib (856.30.16) <4AE368E9-605D-379D-B04C-2AC7455B8250> /usr/lib/system/libsystem_network.dylib
0x7fffb5baa000 - 0x7fffb5bb3ff3 libsystem_networkextension.dylib (563.30.15) <EB020B0C-7DF0-3EEF-8E3C-15DA3C01D687> /usr/lib/system/libsystem_networkextension.dylib
0x7fffb5bb4000 - 0x7fffb5bbdff3 libsystem_notify.dylib (165.20.1) <E7FD3A7C-DD07-36E2-9FA4-7561F9F114DA> /usr/lib/system/libsystem_notify.dylib
0x7fffb5bbe000 - 0x7fffb5bc6fe7 libsystem_platform.dylib (126.1.2) <3CA06D4E-C00A-36DE-AA65-3A390097D1F6> /usr/lib/system/libsystem_platform.dylib
0x7fffb5bc7000 - 0x7fffb5bd1ff7 libsystem_pthread.dylib (218.30.1) <C869ED7C-BE29-3532-8E69-3A8DA1447EDC> /usr/lib/system/libsystem_pthread.dylib
0x7fffb5bd2000 - 0x7fffb5bd5ff7 libsystem_sandbox.dylib (592.31.1) <7BBFDF96-293F-3DD9-B3A4-7C168280B441> /usr/lib/system/libsystem_sandbox.dylib
0x7fffb5bd6000 - 0x7fffb5bd7fff libsystem_secinit.dylib (24) <5C1F1E47-0F7D-3E25-8DEB-D9DB1F902281> /usr/lib/system/libsystem_secinit.dylib
0x7fffb5bd8000 - 0x7fffb5bdffff libsystem_symptoms.dylib (532.30.6) <5D990CF5-B58F-39F7-B375-99B4EC62CFBD> /usr/lib/system/libsystem_symptoms.dylib
0x7fffb5be0000 - 0x7fffb5c00ff7 libsystem_trace.dylib (518.30.7) <5BD4ECD4-75CA-38EA-AF5C-B481C15955F8> /usr/lib/system/libsystem_trace.dylib
0x7fffb5c01000 - 0x7fffb5c06ffb libunwind.dylib (35.3) <9F7C2AD8-A9A7-3DE4-828D-B0F0F166AAA0> /usr/lib/system/libunwind.dylib
0x7fffb5c07000 - 0x7fffb5c30ff7 libxpc.dylib (972.30.7) <65E41BB6-EBD5-3D93-B0BE-B190CEE4DD93> /usr/lib/system/libxpc.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 14264
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=135.2M resident=0K(0%) swapped_out_or_unallocated=135.2M(100%)
Writable regions: Total=57.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=57.0M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 8K 2
MALLOC 37.1M 10
MALLOC guard page 16K 4
STACK GUARD 56.0M 5
Stack 13.0M 5
VM_ALLOCATE 4616K 16
__DATA 13.0M 88
__LINKEDIT 112.8M 35
__TEXT 22.5M 83
__UNICODE 556K 2
shared memory 12K 4
=========== ======= =======
TOTAL 259.5M 243
Model: MacBookPro12,1, BootROM MBP121.0167.B18, 2 processors, Intel Core i5, 2.7 GHz, 16 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445424533303445422D45474346202020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445424533303445422D45474346202020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.21.171.68.1a4)
Bluetooth: Version 5.0.2f4, 3 services, 27 devices, 1 incoming serial ports
Network Service: Thunderbolt Ethernet, Ethernet, en3
Network Service: Wi-Fi, AirPort, en0
PCI Card: Apple 57762-A0, Ethernet Controller, Thunderbolt@195,0,0
Serial ATA Device: APPLE SSD SM0256G, 251 GB
USB Device: USB 3.0 Bus
USB Device: USB3.0 Hub
USB Device: Bluetooth USB Host Controller
USB Device: J-Link
USB Device: USB3.0 Hub
USB Device: FT232R USB UART
USB Device: USB Laser Mouse
USB Device: Side print
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
Thunderbolt Device: Thunderbolt to Gigabit Ethernet Adapter, Apple Inc., 1, 5.5
I've came up with the following minimal test case that consistently reproduces the issue:
#!/usr/bin/env python
from pynrfjprog import API
for i in xrange(1000):
print i
nrf = API.API('NRF52')
nrf.open()
nrf.connect_to_emu_without_snr()
nrf.close()
I've also tried this test case with MultiAPI. Sometimes I get the same EXC_BAD_INSTRUCTION
error, but more often I get the unrelated error:
Traceback (most recent call last):
File "/Users/nic/workspace/spectacles2/nordic/utils/nrf_programmer", line 9, in <module>
File "/usr/local/lib/python2.7/site-packages/pynrfjprog/MultiAPI.py", line 50, in __init__
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/__init__.py", line 218, in Queue
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/queues.py", line 68, in __init__
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
OSError: [Errno 24] Too many open files
Exception AttributeError: "'MultiAPI' object has no attribute 'runner'" in <bound method MultiAPI.__del__ of <pynrfjprog.MultiAPI.MultiAPI object at 0x10ac7e110>> ignored
We will test and come back with more info as asoon as possible,
I have reproduced the issue. I have isolated the issue in Seggers JLinkARM library, and therefore reported the issue to them. It is most likely a resource freeing issue. If a 100ms delay is added after nrf.close() call (in your reproduction script) the issue seems to disappear.
I will inform of the response from Segger as soon as I receive it.
Thank you David!
Segger has released on Friday V6.12e that according to them fixes the issue. I have had no time to test it, but you could try yourself. Please close the issue if the new Segger release solves your problem.
Confirmed that this fixed the issue. Thank you very much for your help!
Versions: pynrfjprog==9.0.0, 9.2.1
Occasionally, when flashing our board, pynrfjprog crashes with the error below. We're not really sure how to debug this issue, and may have to consider switching back to JLinkExe :( Do you have any suggestions on how to proceed here? Thank you for your help!