-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
Milestone
Description
The features/qutil
test segfaults in the MUSL ARM CI right now. There appears to have been some kind of upstream update that's causing this since the CI was working fine a few days ago and nothing has changed in the main repo since them. I can't reproduce the crash locally, but in CI the associated traceback is:
* thread #2, name = 'qutil', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0xfffe975feed0)
* frame #0: 0x0000fffe98958b10 ld-musl-aarch64.so.1`fmt_fp(f=0x0000fffe989c12b0, y=0.0617809295654296875, w=0, p=-1, fl=0, t=102) at vfprintf.c:181:1
frame #1: 0x0000fffe9895a7dc ld-musl-aarch64.so.1`printf_core(f=0x0000fffe989c12b0, fmt="[qutil] aligned_t sorting %lu numbers took: %f seconds\n", ap=0x0000fffe97600de8, nl_arg=0x0000fffe97600e80, nl_type=0x0000fffe97600e08) at vfprintf.c:627:8
frame #2: 0x0000fffe9895ab80 ld-musl-aarch64.so.1`vfprintf(f=0x0000fffe989c12b0, fmt="[qutil] aligned_t sorting %lu numbers took: %f seconds\n", ap=<unavailable>) at vfprintf.c:690:13
frame #3: 0x0000fffe9895d654 ld-musl-aarch64.so.1`vprintf(fmt=<unavailable>, ap=<unavailable>) at vprintf.c:5:9
frame #4: 0x0000ab3a7b0b1464 qutil`iprintf(format=<unavailable>) at argparsing.h:121:5
frame #5: 0x0000ab3a7b0b1700 qutil`qmain(junk=<unavailable>) at qutil.c:85:3
frame #6: 0x0000fffe988d8d7c libqthread.so`qthread_wrapper(ptr=0x0000fffe98874180) at qthread.c:0
frame #7: 0x0000fffe988d8cc0 libqthread.so`qthread_exec(t=<unavailable>, c=<unavailable>) at qthread.c:1721:5
The program's output seems to indicate that it's segfaulting somewhere around here:
qthreads/test/features/qutil.c
Lines 66 to 88 in 0b412c2
for (i = 0; i < ui_len - 1; i++) { | |
if (ui_array[i] > ui_array[i + 1]) { | |
/* | |
* size_t j; | |
* | |
* for (j = i-20; j < i+20; j++) { | |
* if (j % 8 == 0) | |
* printf("\n"); | |
* printf("[%6u]=%2.5f ", j, d_array[j]); | |
* } | |
* printf("\n"); | |
*/ | |
printf("out of order at %lu: %lu > %lu\n", | |
(unsigned long)i, | |
(unsigned long)ui_array[i], | |
(unsigned long)ui_array[i + 1]); | |
abort(); | |
} | |
} | |
iprintf("[qutil] aligned_t sorting %lu numbers took: %f seconds\n", | |
(unsigned long)d_len, | |
(stop.tv_sec + (stop.tv_usec * 1.0e-6)) - | |
(start.tv_sec + (start.tv_usec * 1.0e-6))); |
I haven't been able to reproduce this error locally yet. I'm currently debugging it in #356.