Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Segfaults and "Corrupt data detected, please check connection to PPK. Error: Measurement range not detected", related? #41

Closed
jacobrosenthal opened this issue Jun 6, 2018 · 2 comments

Comments

@jacobrosenthal
Copy link

Im getting a lot of segfaults in like.. one out of three or five runs.

Im not using electron, just a custom little script automating some power profiling. In all modern version s of node (7, 8 and 9) on macos 10.13.4 (17E202)

Starting to try to track them down myself but thought Id post here as well

sometimes it manages to get an error out prior to segfaulting. Im guessing "Measurement range not detected" is from the ppk_nrfconnect.hex firmware. Is that source available somewhere?

  ..Corrupt data detected, please check connection to PPK. Error: Measurement range not detected
    at getAdcResult (/Users/jacobrosenthal/Downloads/node-ppk/lib/rtt.js:102:19)
    at handleTriggerDataSet (/Users/jacobrosenthal/Downloads/node-ppk/lib/rtt.js:153:27)
    at MODE_RECEIVE (/Users/jacobrosenthal/Downloads/node-ppk/lib/rtt.js:188:25)
    at rawbytes.forEach.byte (/Users/jacobrosenthal/Downloads/node-ppk/lib/rtt.js:221:30)
    at Array.forEach (<anonymous>)
    at parseMeasurementData (/Users/jacobrosenthal/Downloads/node-ppk/lib/rtt.js:221:14)
    at process._tickCallback (internal/process/next_tick.js:176:11)
PID 5722 received SIGSEGV for address: 0x0
0   segfault-handler.node               0x00000001022f3698 _ZL16segfault_handleriP9__siginfoPv + 312
1   libsystem_platform.dylib            0x00007fff5b368f5a _sigtramp + 26
2   ???                                 0x0000000000000000 0x0 + 0
3   libjlinkarm_nrf52_nrfjprogdll.dylib 0x0000000104c7b553 _ZThn8_N9LogBuffer4syncEv + 19
4   libc++.1.dylib                      0x00007fff58fbcf65 _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv + 65
5   libjlinkarm_nrf52_nrfjprogdll.dylib 0x0000000104c7a267 _Z10log_seggerPKc + 535
6   libjlinkarm.dylib                   0x0000000106254788 JLINKARM_SetFlashArea + 144984
7   libjlinkarm.dylib                   0x0000000106254d4a JLINKARM_SetFlashArea + 146458
8   libjlinkarm.dylib                   0x00000001061d5f6c JLINK_Configure + 44604
9   libjlinkarm.dylib                   0x000000010612d0c0 libjlinkarm.dylib + 184512
10  libjlinkarm.dylib                   0x000000010626ee89 JLINK_RTTERMINAL_Write + 281
11  libjlinkarm.dylib                   0x000000010626e1cb JLINKARM_SetFlashArea + 250011
12  libjlinkarm.dylib                   0x000000010626daea JLINKARM_SetFlashArea + 248250
13  libjlinkarm.dylib                   0x000000010612320e libjlinkarm.dylib + 143886
14  libjlinkarm.dylib                   0x00000001062a8b96 JLINK_RTTERMINAL_Write + 237094
15  libsystem_pthread.dylib             0x00007fff5b372661 _pthread_body + 340
16  libsystem_pthread.dylib             0x00007fff5b37250d _pthread_body + 0
17  libsystem_pthread.dylib             0x00007fff5b371bf9 thread_start + 13

other times not. Same crash maybe? or different.

  .PID 5768 received SIGSEGV for address: 0x0
0   segfault-handler.node               0x00000001022f3698 _ZL16segfault_handleriP9__siginfoPv + 312
1   libsystem_platform.dylib            0x00007fff5b368f5a _sigtramp + 26
2   ???                                 0x0000000000000000 0x0 + 0
3   libjlinkarm_nrf52_nrfjprogdll.dylib 0x0000000103a1c553 _ZThn8_N9LogBuffer4syncEv + 19
4   libc++.1.dylib                      0x00007fff58fbcf65 _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv + 65
5   libjlinkarm_nrf52_nrfjprogdll.dylib 0x0000000103a1b267 _Z10log_seggerPKc + 535
6   libjlinkarm.dylib                   0x0000000105154788 JLINKARM_SetFlashArea + 144984
7   libjlinkarm.dylib                   0x0000000105154d4a JLINKARM_SetFlashArea + 146458
8   libjlinkarm.dylib                   0x00000001050d5f6c JLINK_Configure + 44604
9   libjlinkarm.dylib                   0x000000010502d0c0 libjlinkarm.dylib + 184512
10  libjlinkarm.dylib                   0x000000010516ee89 JLINK_RTTERMINAL_Write + 281
11  libjlinkarm.dylib                   0x000000010516e1cb JLINKARM_SetFlashArea + 250011
12  libjlinkarm.dylib                   0x000000010516daea JLINKARM_SetFlashArea + 248250
13  libjlinkarm.dylib                   0x000000010502320e libjlinkarm.dylib + 143886
14  libjlinkarm.dylib                   0x00000001051a8b96 JLINK_RTTERMINAL_Write + 237094
15  libsystem_pthread.dylib             0x00007fff5b372661 _pthread_body + 340
16  libsystem_pthread.dylib             0x00007fff5b37250d _pthread_body + 0
17  libsystem_pthread.dylib             0x00007fff5b371bf9 thread_start + 13
@jacobrosenthal
Copy link
Author

@bencefr Thanks for jumping on this for me, but dont merge yet unless you like that code otherwise.. Ive been working on it for ages, but it turns out I wasnt returning promises from hapi's lab framework correctly.

Im sure ie seen a few other segfaults from before I switched to lab. Ill be happy to report the next one I see :)

Thanks!

@bencefr
Copy link
Contributor

bencefr commented Jun 6, 2018

Thanks @jacobrosenthal , I'm happy that you confirmed this is the same issue we have also hit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants