[CRIU] zdtm/static/fd failure on aarch64

Dmitry Safonov 0x7f454c46 at gmail.com
Tue Jun 12 18:13:05 MSK 2018


2018-06-12 7:48 GMT+01:00 Adrian Reber <adrian at lisas.de>:
> Output is always like this:
>
> 02:20:50.173: 11691: ERR: ../lib/lock.h:149: futex *0xffff86100000 = 0, c = 2249195520 (errno = 11 (Resource temporarily unavailable))
>
> 11691 mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xffff86100000
> 11691 futex(0xffff86100000, FUTEX_WAIT, 2249195521, NULL) = -1 EAGAIN (Resource temporarily unavailable)
> 11691 brk(NULL)                         = 0x149f0000
> 11691 brk(0x14a20000)                   = 0x14a20000
> 11691 brk(NULL)                         = 0x14a20000
> 11691 openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
> 11691 fstat(4, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
> 11691 fstat(4, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
> 11691 mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff860f0000
> 11691 read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 8192) = 3519
> 11691 lseek(4, -2252, SEEK_CUR)         = 1267
> 11691 read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 8192) = 2252
> 11691 close(4)                          = 0
> 11691 munmap(0xffff860f0000, 65536)     = 0
> 11691 write(2, "02:20:50.173: 11691: ERR: ../lib"..., 135) = 135
> 11691 futex(0xffff86100000, FUTEX_WAIT, 2249195521, NULL) = -1 EAGAIN (Resource temporarily unavailable)
> 11691 newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}, 0) = 0
> 11691 write(2, "02:20:50.175: 11691: ERR: ../lib"..., 135) = 135
>
> How I understand it is that atomic_inc() should return the new value but the returned value
> is completely different from what atomic_get() returns, right?

Well, atomic_inc() should return the old value, AFAICS from code.
atomic_inc_return() should return the new value.

I think it's not due cast we've some garbage value, it looks as if
we're doing 16-bit operations on 32-bit values.. But we aren't as far
as I can catch from arm64 asm.

Could you try with this to see, if atomic ops work?
Probably also worth to try to zero-init `tmp'/`result' inside ops to check
if the result is garbage from the stack in ops function.

-- 
             Dmitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zdtm-lock.diff
Type: text/x-patch
Size: 579 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20180612/43badf92/attachment-0001.bin>


More information about the CRIU mailing list