[CRIU] criu build failures with glibc-2.25.90 (fedora rawhide)

Dmitry Safonov dsafonov at virtuozzo.com
Thu Jun 29 14:19:33 MSK 2017


On 06/29/2017 01:21 PM, Pavel Emelyanov wrote:
> On 06/29/2017 10:13 AM, Adrian Reber wrote:
>> Trying to upgrade the criu package on Fedora I ran into a build failure
>> on Fedora rawhide (development branch).
>>
>> https://kojipkgs.fedoraproject.org//work/tasks/3909/20233909/build.log
>>
>> The next pre-release of glibc (2.25.90) is part of that Fedora branch
>> and glibc removed SIGUNUSED from bits/signum.h:
>>
>> criu/cr-restore.c: In function 'sig_fatal':
>> criu/cr-restore.c:900:9: error: 'SIGUNUSED' undeclared (first use in this function); did you mean 'SI_USER'?
>>     (1 << SIGUNUSED)|\
>>           ^
>> criu/cr-restore.c:907:41: note: in expansion of macro 'SIG_FATAL_MASK'
>>    return (sig > 0) && (sig < SIGMAX) && (SIG_FATAL_MASK & (1UL << sig));
>>                                           ^~~~~~~~~~~~~~
>> criu/cr-restore.c:900:9: note: each undeclared identifier is reported only once for each function it appears in
>>     (1 << SIGUNUSED)|\
>>           ^
>> criu/cr-restore.c:907:41: note: in expansion of macro 'SIG_FATAL_MASK'
>>    return (sig > 0) && (sig < SIGMAX) && (SIG_FATAL_MASK & (1UL << sig));
>>                                           ^~~~~~~~~~~~~~
>> criu/cr-restore.c:908:1: warning: control reaches end of non-void function [-Wreturn-type]
>>   }
>>   ^
>> make[2]: *** [/builddir/build/BUILD/criu-3.2.1/scripts/nmk/scripts/build.mk:111: criu/cr-restore.o] Error 1
>> make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2
>> make: *** [Makefile:218: criu] Error 2
>>
>> According to a glibc developer SIGSYS returns the same value as
>> SIGUNUSED. Not sure if that is the right fix for criu
> 
> Cc-ing Dima.

Looks good to me,
SIGUNUSED is the same to SIGSYS, so we can easily remove it.

Reviewed-by: Dmitry Safonov <dsafonov at virtuozzo.com>

> 
>> https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8082d91e1c449e0cb137468b731004a5e605c8c6
>>
>>
>> diff --git a/criu/cr-restore.c b/criu/cr-restore.c
>> index cfc8f504..7e11c8c5 100644
>> --- a/criu/cr-restore.c
>> +++ b/criu/cr-restore.c
>> @@ -897,7 +897,6 @@ static void zombie_prepare_signals(void)
>>                  (1 << SIGPOLL)  |\
>>                  (1 << SIGIO)    |\
>>                  (1 << SIGSYS)   |\
>> -               (1 << SIGUNUSED)|\
>>                  (1 << SIGSTKFLT)|\
>>                  (1 << SIGPWR)    \
>>          )
>> diff --git a/test/zdtm/static/pthread01.c b/test/zdtm/static/pthread01.c
>> index 52f849c0..2520fcfe 100644
>> --- a/test/zdtm/static/pthread01.c
>> +++ b/test/zdtm/static/pthread01.c
>> @@ -43,7 +43,7 @@ static char *decode_signal(const sigset_t *s, char *buf)
>>          COLLECT(SIGTERM); COLLECT(SIGSTKFLT); COLLECT(SIGCHLD); COLLECT(SIGCONT); COLLECT(SIGSTOP);
>>          COLLECT(SIGTSTP); COLLECT(SIGTTIN); COLLECT(SIGTTOU); COLLECT(SIGURG); COLLECT(SIGXCPU);
>>          COLLECT(SIGXFSZ); COLLECT(SIGVTALRM); COLLECT(SIGPROF); COLLECT(SIGWINCH); COLLECT(SIGIO);
>> -       COLLECT(SIGPOLL); COLLECT(SIGPWR); COLLECT(SIGSYS); COLLECT(SIGUNUSED);
>> +       COLLECT(SIGPOLL); COLLECT(SIGPWR); COLLECT(SIGSYS);
>>   #undef COLLECT
>>   
>>          return buf;
>>
>>
>> I can submit a real patch if this is the right approach.
>>
>> With this patch I get following zdtm result:
>>
>> ################### 10 TEST(S) FAILED (TOTAL 294/SKIPPED 26) ###################
>>   * zdtm/static/del_standalone_un(h)
>>   * zdtm/static/cgroup_stray(h)
>>   * zdtm/static/cgroup02(h)
>>   * zdtm/static/cgroupns(h)
>>   * zdtm/static/cgroup01(h)
>>   * zdtm/static/cgroup00(h)
>>   * zdtm/static/socket-tcp-syn-sent(h)
>>   * zdtm/static/cgroup04(h)
>>   * zdtm/static/deleted_unix_sock(h)
>>   * zdtm/static/cgroup03(h)
>> ##################################### FAIL #####################################
>>
>> All cgroup related tests are hanging and I had to kill criu
>> manually.
> 
> This must have been issue with unified hier.
> Would you try the patch "[PATCH] cgroup: Skip unified hier controllers"?
> 
> -- Pavel
> 


-- 
              Dmitry


More information about the CRIU mailing list