criu/test
Pavel Tikhomirov 90e175d52f zdtm/pthread_timers: make sure glibc allocated SIGEV_THREAD's stack
On Virtuozzo7 jenkins we see a fail of criu-dev zdtm:

  ===================== Run zdtm/static/pthread_timers in ns =====================
  Start test
  ./pthread_timers --pidfile=pthread_timers.pid --outfile=pthread_timers.out
  Run criu dump
  =[log]=> dump/zdtm/static/pthread_timers/112/1/dump.log
  ------------------------ grep Error ------------------------
  (00.004817) netlink: Collect netlink sock 0x1cad6e21
  (00.004821) netlink: Collect netlink sock 0x1cad6e22
  (00.004831) Collecting pidns 9/112
  (00.004886) No parent images directory provided
  (00.004903) Warn  (criu/lsm.c:328): don't know how to suspend LSM 0
  ------------------------ ERROR OVER ------------------------
  Run criu restore
  4: Old maps lost: set([])
  4: New maps appeared: set([u'7fe4c54ca000-7fe4c54cb000 ---p', u'7fe4c0000000-7fe4c0021000 rw-p', u'7fe4c0021000-7fe4c4000000 ---p', u'7fe4c54cb000-7fe4c5ccb000 rw-p'])
  ############# Test zdtm/static/pthread_timers FAIL at maps compare #############

https://ci.openvz.org/job/CRIU/job/CRIU-virtuozzo/job/criu-dev/8032/consoleFull

First thing to mention is that this is not related to criu. I can manage
to reproduce it with "--nocr", problem is that some mapping appears a
bit later when we do pre-cr get_visible_state().

By debugging SIGEV_THREAD thread with gdb I can see that addresses from
this unexpectedly appearing mapping are used by glibc here as "struct
pthread *pd":

 clone()
  start_thread()
   timer_helper_thread()
    __pthread_create_2_1()

So the mapping looks allocated by allocate_stack(), and it is only
gets done after first timer trigger (we have glibc-2.17 on vz7):

https://github.com/bminor/glibc/blob/release/2.17/master/nptl/sysdeps/unix/sysv/linux/timer_routines.c#L92

So let's wait at least 1 timer trigger so that memory outfit of the test
become permanent and our check_visible_state zdtm check would not be
false negative.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
2021-09-03 10:31:00 -07:00
..
compel Run 'make indent' on header files 2021-09-03 10:31:00 -07:00
exhaustive py: Reformat everything into pep8 style 2019-09-07 15:59:56 +03:00
inhfd vim: remove wrong 8-space tabs indent from python files 2021-09-03 10:31:00 -07:00
javaTests javaTests: Add --file-locks option 2021-09-03 10:31:00 -07:00
jenkins ci: fix 'crit.sh: 3: source: not found' 2021-09-03 10:31:00 -07:00
others Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
pki test: create new tls certificates 2021-09-03 10:31:00 -07:00
zdtm zdtm/pthread_timers: make sure glibc allocated SIGEV_THREAD's stack 2021-09-03 10:31:00 -07:00
.gitignore zdtm: Add javaTests output to .gitignore 2021-09-03 10:31:00 -07:00
abrt.sh test/abrt: skip core dumps from the seccomp_filter test 2019-04-20 20:25:26 -07:00
check_actions.py test/other: Resolve Py3 compatibility issues 2019-09-07 15:59:56 +03:00
crit-recode.py vim: remove wrong 8-space tabs indent from python files 2021-09-03 10:31:00 -07:00
empty-netns-prep.sh test: don't use nsenter in tests 2017-05-19 09:17:20 +03:00
groups.desc zdtm.py: Generator of groups of tests 2015-12-08 14:54:41 +03:00
inhfd.desc zdtm.py: Add inhfd tests for --inherit-fd option 2015-10-19 12:42:01 +03:00
Makefile Modify and add test for configuration file functionality 2018-10-30 19:27:52 +03:00
pycriu Adapt zdtm for python3 compatibility 2018-07-09 18:25:16 +03:00
show_action.sh test: Check action scripts to work as we expect 2016-05-06 14:39:25 +03:00
umount2.c zdtm: add a program to umount a test root 2016-09-26 15:42:40 +03:00
zdtm.desc test: Get rid of live directory 2016-02-20 13:40:52 +03:00
zdtm.py zdtm: make --sbs also stop on each pre-dump/snap iteration 2021-09-03 10:31:00 -07:00
zdtm_ct.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
zdtm_mount_cgroups tests: prevent zdtm_mount_cgroups from failing w/ EBUSY 2016-02-03 16:25:28 +03:00
zdtm_umount_cgroups zdtm: cleanup zdtmtst and zdtmtst.defaultroot cgroups after finishing test 2018-10-30 19:27:58 +03:00