Depending on the operation requested futex(2) might return the number of woken threads or an error. That means the following...
mpv CALL futex(0xa58935899b0,0x82<FUTEX_WAKE|FUTEX_PRIVATE_FLAG>,1,0,0) mpv RET futex -1 errno 1 Operation not permitted ...is not an error but it indicates that 1 thread has been awoken. Diff below would have saved me quite some time looking in the wrong direction. ok? Index: kdump.c =================================================================== RCS file: /cvs/src/usr.bin/kdump/kdump.c,v retrieving revision 1.141 diff -u -p -r1.141 kdump.c --- kdump.c 18 Jan 2020 23:56:31 -0000 1.141 +++ kdump.c 3 Apr 2020 17:27:36 -0000 @@ -1147,7 +1147,9 @@ doerr: (void)printf("RESTART"); else if (error == EJUSTRETURN) (void)printf("JUSTRETURN"); - else { + else if (code == SYS_futex) { + (void)printf("%d", error); + } else { (void)printf("-1 errno %d", error); if (fancy) (void)printf(" %s", strerror(error));