140178 open("/proc/self/exe", ...); doesn't quite work
140939 --track-fds reports leakage of stdout/in/err and doesn't respect -q
217695 malloc/calloc/realloc/memalign failure doesn't set errno to ENOMEM
+338633 gdbserver_tests/nlcontrolc.vgtest hangs on arm64
345077 linux syscall execveat support (linux 3.19)
361770 Missing F_ADD_SEALS
369029 handle linux syscalls sched_getattr and sched_setattr
432672 vg_regtest: test-specific environment variables not reset between tests
432809 VEX should support REX.W + POPF
432861 PPC modsw and modsd give incorrect results for 1 mod 12
+432870 gdbserver_tests:nlcontrolc hangs with newest glibc2.33 x86-64
432215 Add debuginfod functionality
433323 Use pkglibexecdir as vglibdir
433500 DRD regtest faulures when libstdc++ and libgcc debuginfo are installed
(action at startup) vgdb me ...
-loops/sleep_ms/burn/threads_spec/affinity: 1000000000 1000000000 1000000000 BSBSBSBS 1
+loops/sleep_ms/burn/threads_spec/affinity: 1000000000 0 100000 BSBSBSBS 1
Brussels ready to sleep and/or burn
London ready to sleep and/or burn
Petaouchnok ready to sleep and/or burn
main ready to sleep and/or burn
-
+Gdb request to kill this process
#
continue
#
-# Here, all tasks should be blocked in a loooonnnng select, all in WaitSys
-info threads
-# We will unblock them by changing their timeout argument
-# To avoid going into the frame where the timeval arg is,
-# it has been defined as global variables, as the nr
-# of calls on the stack differs between 32bits and 64bits,
-# and/or between OS.
-# ensure select finishes in a few milliseconds max:
-p t[0].tv_sec = 0
-p t[1].tv_sec = 0
-p t[2].tv_sec = 0
-p t[3].tv_sec = 0
-#
-# We will change the burning parameters in a few seconds
+# Threads are burning cpu now
+# We would like to fully test info threads here, but which thread are Runnable
+# or Yielding is unpredictable. With a recent enough gdb, check the nr of
+# threads by state using pipe commands and grep/wc.
+init-if-undefined $_gdb_major = 0
+init-if-undefined $_gdb_minor = 0
+if $_gdb_major >= 9
+ | info threads | grep VgTs_Runnable | wc -l
+ | info threads | grep VgTs_Yielding | wc -l
+else
+ echo 1\n
+ echo 3\n
+end
+# We change the variables so that all the threads are blocked in a syscall
+p burn = 0
+p sleepms = 1000000
+#
+#
shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep changed nlcontrolc.stdoutB.out
#
-echo changed burning parameters\n
+echo changed burning parameters to sleeping parameters\n
continue
+# Here, all tasks should be blocked in a loooonnnng select, all in WaitSys
+info threads
+# We reset the sleepms to 0. The threads should still be blocked in the syscall
+p sleepms = 0
+shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep reset nlcontrolc.stdoutB.out
#
-# Threads are burning cpu now
-# We would like to test info threads here, but which thread are Runnable or Yielding
-# is unpredictable.
-# info threads
-p burn = 0
-p loops = 0
-p report_finished = 0
+echo reset to sleeping parameters\n
continue
-# and the process should stop very quickly now
+# threads should still be blocked in a loooonnnng select, all in WaitSys
+info threads
+if $_gdb_major >= 9
+ | info threads | grep VgTs_WaitSys | wc -l
+else
+ echo 4\n
+end
+# Make the process die.
+kill
quit
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
+do_burn () at sleepers.c:41
+41 for (i = 0; i < burn; i++) loopnr++;
+ > > > > > >1
+3
+$1 = 0
+$2 = 1000000
+changed burning parameters to sleeping parameters
+Continuing.
+Program received signal SIGTRAP, Trace/breakpoint trap.
0x........ in syscall ...
* 1 Thread .... (tid 1 VgTs_WaitSys) 0x........ in syscall ...
-$1 = 0
-$2 = 0
$3 = 0
-$4 = 0
-changed burning parameters
+reset to sleeping parameters
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
-do_burn () at sleepers.c:41
-41 for (i = 0; i < burn; i++) loopnr++;
-$5 = 0
-$6 = 0
-$7 = 0
-Continuing.
-Program exited normally.
+0x........ in syscall ...
+* 1 Thread .... (tid 1 VgTs_WaitSys) 0x........ in syscall ...
+ > > > >4
+Kill the program being debugged? (y or n) [answered Y; input not from terminal]
# and modify some variables
# the user can control-c an process with all threads in Running/Yielding
# and modify some variables
-# sleepers is started with argument so that it will compute during ages.
-# The variable modifications means it will exit in a reasonable time.
-# This test is disabled on Solaris because modifying select/poll/ppoll timeout
-# has no effect if a thread is already blocked in that syscall.
+# sleepers is started so that it burns CPU.
+# We then interrupt the process.
+# We modify variables so that instead of burning cpu, sleepers blocks
+# all threads in a select syscall.
prog: sleepers
-args: 1000000000 1000000000 1000000000 BSBSBSBS 1
+args: 1000000000 0 100000 BSBSBSBS 1
vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlcontrolc
stderr_filter: filter_stderr
# Bug 338633 nlcontrol hangs on arm64 currently.
-prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/arch_test arm64 && ! ../tests/os_test solaris
+prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/os_test solaris
progB: gdb
argsB: --quiet -l 60 --nx ./sleepers
stdinB: nlcontrolc.stdinB.gdb