|
From: Maran P. <ma...@li...> - 2014-02-19 03:19:36
Attachments:
diffs.txt
|
valgrind revision: 13815 VEX revision: 2820 C compiler: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) GDB: GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6) Assembler: GNU assembler version 2.20.51.0.2-5.36.el6 20100205 C library: GNU C Library stable release version 2.12 uname -mrs: Linux 2.6.32-358.el6.s390x s390x Vendor version: Red Hat Enterprise Linux Server release 6.4 (Santiago) Nightly build on rhels390 ( RHEL 6.4 with gcc 4.4.7 on zEC12 (s390x) ) Started at 2014-02-19 03:45:25 CET Ended at 2014-02-19 04:19:47 CET Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 641 tests, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) helgrind/tests/pth_barrier3 (stderr) helgrind/tests/pth_cond_destroy_busy (stderr) drd/tests/pth_barrier3 (stderr) drd/tests/pth_create_chain (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 641 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) helgrind/tests/pth_barrier3 (stderr) helgrind/tests/pth_cond_destroy_busy (stderr) drd/tests/pth_barrier3 (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short 2014-02-19 03:56:08.000000000 +0100 --- new.short 2014-02-19 04:06:54.000000000 +0100 *************** *** 8,10 **** ! == 641 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) --- 8,10 ---- ! == 641 tests, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) *************** *** 13,14 **** --- 13,15 ---- drd/tests/pth_barrier3 (stderr) + drd/tests/pth_create_chain (stderr) --tools=none,memcheck --reps=5 --vg=../valgrind-new --vg=../valgrind-old -- Running tests in perf ---------------------------------------------- -- bigcode1 -- bigcode1 valgrind-new:0.16s no: 1.7s (10.6x, -----) me: 3.1s (19.6x, -----) bigcode1 valgrind-old:0.16s no: 1.7s (10.6x, 0.0%) me: 3.1s (19.6x, 0.0%) -- bigcode2 -- bigcode2 valgrind-new:0.17s no: 3.6s (21.4x, -----) me: 7.6s (44.5x, -----) bigcode2 valgrind-old:0.17s no: 3.6s (21.4x, 0.0%) me: 7.6s (44.5x, 0.1%) -- bz2 -- bz2 valgrind-new:0.70s no: 2.5s ( 3.6x, -----) me:10.1s (14.4x, -----) bz2 valgrind-old:0.70s no: 2.5s ( 3.6x, 0.0%) me:10.1s (14.4x, 0.0%) -- fbench -- fbench valgrind-new:0.36s no: 1.4s ( 3.8x, -----) me: 3.6s (10.0x, -----) fbench valgrind-old:0.36s no: 1.4s ( 3.8x, -0.0%) me: 3.6s ( 9.9x, 0.3%) -- ffbench -- ffbench valgrind-new:0.18s no: 0.8s ( 4.3x, -----) me: 3.0s (16.5x, -----) ffbench valgrind-old:0.18s no: 0.8s ( 4.3x, 0.0%) me: 3.0s (16.4x, 0.3%) -- heap -- heap valgrind-new:0.11s no: 0.7s ( 6.6x, -----) me: 6.0s (54.8x, -----) heap valgrind-old:0.11s no: 0.7s ( 6.6x, 0.0%) me: 6.0s (54.8x, 0.0%) -- heap_pdb4 -- heap_pdb4 valgrind-new:0.13s no: 0.8s ( 6.5x, -----) me: 9.0s (69.2x, -----) heap_pdb4 valgrind-old:0.13s no: 0.8s ( 6.5x, 0.0%) me: 9.0s (69.3x, -0.1%) -- many-loss-records -- many-loss-records valgrind-new:0.01s no: 0.2s (24.0x, -----) me: 1.5s (149.0x, -----) many-loss-records valgrind-old:0.01s no: 0.2s (24.0x, 0.0%) me: 1.5s (149.0x, 0.0%) -- many-xpts -- many-xpts valgrind-new:0.04s no: 0.3s ( 7.5x, -----) me: 2.2s (55.2x, -----) many-xpts valgrind-old:0.04s no: 0.3s ( 7.5x, 0.0%) me: 2.2s (56.0x, -1.4%) -- sarp -- sarp valgrind-new:0.02s no: 0.2s (12.5x, -----) me: 2.5s (122.5x, -----) sarp valgrind-old:0.02s no: 0.2s (12.5x, 0.0%) me: 2.5s (124.5x, -1.6%) -- tinycc -- tinycc valgrind-new:0.17s no: 1.6s ( 9.6x, -----) me:12.1s (71.2x, -----) tinycc valgrind-old:0.17s no: 1.6s ( 9.6x, 0.0%) me:12.1s (71.1x, 0.2%) -- Finished tests in perf ---------------------------------------------- == 11 programs, 44 timings ================= real 12m53.095s user 12m40.116s sys 0m10.983s |
|
From: Bart V. A. <bva...@ac...> - 2014-02-19 07:58:14
|
On 02/19/14 04:19, Maran Pakkirisamy wrote: > valgrind revision: 13815 > VEX revision: 2820 > C compiler: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) > GDB: GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6) > Assembler: GNU assembler version 2.20.51.0.2-5.36.el6 20100205 > C library: GNU C Library stable release version 2.12 > uname -mrs: Linux 2.6.32-358.el6.s390x s390x > Vendor version: Red Hat Enterprise Linux Server release 6.4 (Santiago) > > Nightly build on rhels390 ( RHEL 6.4 with gcc 4.4.7 on zEC12 (s390x) ) > Started at 2014-02-19 03:45:25 CET > Ended at 2014-02-19 04:19:47 CET > Results differ from 24 hours ago > > ================================================= > ./valgrind-new/drd/tests/pth_create_chain.stderr.diff ================================================= > --- pth_create_chain.stderr.exp 2014-02-19 03:56:26.000000000 +0100 > +++ pth_create_chain.stderr.out 2014-02-19 04:05:32.000000000 +0100 > @@ -1,3 +1,259 @@ > > > -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) > +valgrind: m_threadstate.c:95 (vgPlain_get_ThreadState): Assertion 'VG_(threads)[tid].tid == tid' failed. > + at 0x........: report_and_quit (m_libcassert.c:?) > + by 0x........: vgPlain_assert_fail (m_libcassert.c:?) > + by 0x........: vgPlain_get_ThreadState (m_threadstate.c:?) > + by 0x........: vgSysWrap_s390x_linux_sys_clone_before (syswrap-s390x-linux.c:217) > + by 0x........: vgPlain_client_syscall (syswrap-main.c:1585) > + by 0x........: handle_syscall (scheduler.c:?) Hello Maran, Can you have a closer look at this ? This failure occurs on s390 only. There might be an issue with thread handling in the core s390 Valgrind code. Thanks, Bart. |
|
From: Maran P. <ma...@li...> - 2014-02-19 16:25:51
|
On 02/19/2014 01:28 PM, Bart Van Assche wrote: > On 02/19/14 04:19, Maran Pakkirisamy wrote: > > > -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) > +valgrind: m_threadstate.c:95 (vgPlain_get_ThreadState): Assertion > 'VG_(threads)[tid].tid == tid' failed. >> + at 0x........: report_and_quit (m_libcassert.c:?) >> + by 0x........: vgPlain_assert_fail (m_libcassert.c:?) >> + by 0x........: vgPlain_get_ThreadState (m_threadstate.c:?) >> + by 0x........: vgSysWrap_s390x_linux_sys_clone_before > (syswrap-s390x-linux.c:217) >> + by 0x........: vgPlain_client_syscall (syswrap-main.c:1585) >> + by 0x........: handle_syscall (scheduler.c:?) > Hello Maran, > > Can you have a closer look at this ? This failure occurs on s390 only. > There might be an issue with thread handling in the core s390 Valgrind code. > Hi Bart, The test case fails from VEX r2818. Also the failure is not happening always. Sometimes the testcase passes. If I revert the changes in trunk/pub/libvex_guest_s390x.h, the testcase passes all the time. I am not sure if the alignment of guest state is not consistent at all the places and it causes the issue. --Maran |
|
From: Florian K. <fl...@ei...> - 2014-02-19 16:38:28
|
On 02/19/2014 12:11 PM, Maran Pakkirisamy wrote: > The test case fails from VEX r2818. Also the failure is not happening > always. Sometimes the testcase passes. > If I revert the changes in trunk/pub/libvex_guest_s390x.h, the testcase > passes all the time. Reverting r2818 is not exactly what we want as the problem is s390x specific. Can you add this assert somewhere vassert(sizeof(VexGuestS390XState) == 432); and see whether it fires? 432 is the expected size of the guest state but there is some trickery with a [0] array at the end of the guest state. This *should* work according to my reading of the docs but who knows. Florian |
|
From: Christian B. <bor...@de...> - 2014-02-24 20:54:10
|
On 19/02/14 17:38, Florian Krohm wrote:
> On 02/19/2014 12:11 PM, Maran Pakkirisamy wrote:
>
>> The test case fails from VEX r2818. Also the failure is not happening
>> always. Sometimes the testcase passes.
>> If I revert the changes in trunk/pub/libvex_guest_s390x.h, the testcase
>> passes all the time.
>
> Reverting r2818 is not exactly what we want as the problem is s390x
> specific. Can you add this assert somewhere
>
> vassert(sizeof(VexGuestS390XState) == 432);
>
> and see whether it fires? 432 is the expected size of the guest state
> but there is some trickery with a [0] array at the end of the guest
> state. This *should* work according to my reading of the docs but who knows.
The problem is fixed by the following code.
===================================================================
--- coregrind/m_initimg/initimg-linux.c (revision 13837)
+++ coregrind/m_initimg/initimg-linux.c (working copy)
@@ -1078,9 +1078,9 @@
VG_(memset)(&arch->vex_shadow1, 0xFF, sizeof(VexGuestS390XState));
VG_(memset)(&arch->vex_shadow2, 0x00, sizeof(VexGuestS390XState));
/* ... except SP, FPC, and IA */
- VG_(memset)(&arch->vex_shadow1 + VG_O_STACK_PTR, 0x00, 8);
- VG_(memset)(&arch->vex_shadow1 + VG_O_FPC_REG, 0x00, 4);
- VG_(memset)(&arch->vex_shadow1 + VG_O_INSTR_PTR, 0x00, 8);
+ arch->vex_shadow1.guest_SP = 0;
+ arch->vex_shadow1.guest_fpc = 0;
+ arch->vex_shadow1.guest_IA = 0;
/* Put essential stuff into the new state. */
arch->vex.guest_SP = iifii.initial_client_SP;
My current understanding is:
The pointer arithmetic is wrong. So we zeroed out 20 bytes somewhere else
in the VG_(threads) array. With the last changes we hit the tid field, causing
the assert to trigger.
Christian
|