Bug 24438 - new regressions with dwz -m
Summary: new regressions with dwz -m
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-10 12:24 UTC by Tom de Vries
Modified: 2019-04-29 12:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2019-04-10 12:24:28 UTC
[ Filing new version of 2013's PR15028 - regressions with dwz -m]

Using "--target_board=cc-with-tweaks" and CC_WITH_TWEAKS_FLAGS='-m' I see these regressions (compared to a CC_WITH_TWEAKS_FLAGS='-z' run):

...
< PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats
---
> FAIL: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats
...

...
< PASS: gdb.base/jit-so.exp: test jit-reader-load filename completion
---
> FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
...

...
< PASS: gdb.dwarf2/gdb-index.exp: index used
< PASS: gdb.dwarf2/gdb-index.exp: index used after symbol reloading
---
> FAIL: gdb.dwarf2/gdb-index.exp: index used
> FAIL: gdb.dwarf2/gdb-index.exp: index used after symbol reloading
....

Summary:
...
< # of expected passes          69818
< # of unexpected failures      50
< # of expected failures                199
---
> # of expected passes          69814
> # of unexpected failures      54
> # of expected failures                199
...
Comment 1 Tom de Vries 2019-04-10 12:27:25 UTC
(In reply to Tom de Vries from comment #0)
> ...
> < PASS: gdb.base/jit-so.exp: test jit-reader-load filename completion
> ---
> > FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
> ...

In the passing case, we have:
...
(gdb) PASS: gdb.base/jit-so.exp: one_jit_test-2: info function jit_function
complete jit-reader-load /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-solib.s^M
jit-reader-load /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-solib.so^M
(gdb) PASS: gdb.base/jit-so.exp: test jit-reader-load filename completion
...

And in the failing case we have:
...
(gdb) PASS: gdb.base/jit-so.exp: one_jit_test-2: info function jit_function
complete jit-reader-load /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-solib.s^M
jit-reader-load /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-solib.so^M
jit-reader-load /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-solib.so.alt^M
(gdb) FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
...

The failure is caused by the fact that the test-case does not expect the .alt file.
Comment 2 Tom de Vries 2019-04-10 12:31:08 UTC
(In reply to Tom de Vries from comment #0)
> < PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache
> stats
> ---
> > FAIL: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats

In the passing case, we have:
...
PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: no files were created
show index-cache stats^M
  Cache hits (this session): 1^M
Cache misses (this session): 0^M
(gdb) PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats
...

and in the failing case we have:
...
PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: no files were created
show index-cache stats^M
  Cache hits (this session): 0^M
Cache misses (this session): 1^M
(gdb) FAIL: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats
...
Comment 3 Tom de Vries 2019-04-10 12:38:34 UTC
(In reply to Tom de Vries from comment #0)
> < PASS: gdb.dwarf2/gdb-index.exp: index used
> ---
> > FAIL: gdb.dwarf2/gdb-index.exp: index used

In the passing version, we have:
...
(gdb) mt print objfiles gdb-index^M
^M
Object file /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/gdb-index/gdb-index.with-index:  Objfile at 0x2ddeac0, bfd at 0x2894b30, 28 minsyms^M
^M
.gdb_index: version 8^M
^M
Symtabs:^M
/data/gdb_versions/devel/src/gdb/testsuite/gdb.dwarf2/main.c at 0x2de9c50, ^M
^M
(gdb) PASS: gdb.dwarf2/gdb-index.exp: index used
...

and in the failing version, we have:
...
(gdb) mt print objfiles gdb-index^M
^M
Object file /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/gdb-index/gdb-index.with-index:  Objfile at 0x1bf7030, bfd at 0x1708b30, 28 minsyms^M
^M
Psymtabs:^M
../sysdeps/x86_64/crtn.S at 0x1c6eca0, elf-init.c at 0x1c6ec30, /data/gdb_versions/devel/src/gdb/testsuite/gdb.dwarf2/main.c at 0x1c6ebc0, ../sysdeps/x86_64/crti.S at 0x1c6eb50, init.c at 0x1c6eae0, ../sysdeps/x86_64/start.S at 0x1c6ea70, ^M
^M
Symtabs:^M
/data/gdb_versions/devel/src/gdb/testsuite/gdb.dwarf2/main.c at 0x1c6cb90, ^M
^M
(gdb) FAIL: gdb.dwarf2/gdb-index.exp: index used
...
Comment 4 Tom de Vries 2019-04-11 10:45:47 UTC
(In reply to Tom de Vries from comment #1)
> (In reply to Tom de Vries from comment #0)
> > ...
> > < PASS: gdb.base/jit-so.exp: test jit-reader-load filename completion
> > ---
> > > FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
> > ...
> 
> In the passing case, we have:
> ...
> (gdb) PASS: gdb.base/jit-so.exp: one_jit_test-2: info function jit_function
> complete jit-reader-load
> /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-
> solib.s^M
> jit-reader-load
> /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-
> solib.so^M
> (gdb) PASS: gdb.base/jit-so.exp: test jit-reader-load filename completion
> ...
> 
> And in the failing case we have:
> ...
> (gdb) PASS: gdb.base/jit-so.exp: one_jit_test-2: info function jit_function
> complete jit-reader-load
> /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-
> solib.s^M
> jit-reader-load
> /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-
> solib.so^M
> jit-reader-load
> /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/jit-so/jit-
> solib.so.alt^M
> (gdb) FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
> ...
> 
> The failure is caused by the fact that the test-case does not expect the
> .alt file.

Patch submitted: https://sourceware.org/ml/gdb-patches/2019-04/msg00199.html
Comment 5 Tom de Vries 2019-04-11 12:28:44 UTC
(In reply to Tom de Vries from comment #2)
> (In reply to Tom de Vries from comment #0)
> > < PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache
> > stats
> > ---
> > > FAIL: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats
> 
> In the passing case, we have:
> ...
> PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: no files were created
> show index-cache stats^M
>   Cache hits (this session): 1^M
> Cache misses (this session): 0^M
> (gdb) PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: check
> index-cache stats
> ...
> 
> and in the failing case we have:
> ...
> PASS: gdb.base/index-cache.exp: test_cache_enabled_hit: no files were created
> show index-cache stats^M
>   Cache hits (this session): 0^M
> Cache misses (this session): 1^M
> (gdb) FAIL: gdb.base/index-cache.exp: test_cache_enabled_hit: check
> index-cache stats
> ...

Filed spinoff PR24445 - "dwz multifile index not written to index cache"
Comment 6 Tom de Vries 2019-04-11 12:29:48 UTC
(In reply to Tom de Vries from comment #3)
> (In reply to Tom de Vries from comment #0)
> > < PASS: gdb.dwarf2/gdb-index.exp: index used
> > ---
> > > FAIL: gdb.dwarf2/gdb-index.exp: index used
> 

Not investigating this one for now, assuming it's a duplicate of PR24445.
Comment 7 Sourceware Commits 2019-04-23 13:36:02 UTC
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6892f60143f7809641dc1824e29dcc406a705df6

commit 6892f60143f7809641dc1824e29dcc406a705df6
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Apr 23 15:35:21 2019 +0200

    [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh
    
    The -m option of cc-with-tweaks.sh sets want_multi to true, invoking dwz like
    this:
    ...
    elif [ "$want_multi" = true ]; then
        cp $output_file ${output_file}.alt
        $DWZ -m ${output_file}.dwz "$output_file" ${output_file}.alt \
            > /dev/null 2>&1
    fi
    ...
    
    The problem that is being solved here, is that we want to test dwz in
    multifile mode, which requires more than one input file, while we only have
    (at the scope of cc-with-tweaks.sh) one executable.  We handle this by copying
    the executable and offering this as a second input (and using a copy has the
    additional benefit that it maximally enables dwz transformation).
    
    However, after the dwz invocation, the copy is no longer used, and the
    presence of the file actually causes a test regression:
    ...
    FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
    ...
    
    Fix this by removing the superflous copy after dwz invocation.
    
    Tested on x86_64-linux.
    
    gdb/ChangeLog:
    
    2019-04-23  Tom de Vries  <tdevries@suse.de>
    
    	PR gdb/24438
    	* contrib/cc-with-tweaks.sh: Remove superfluous .alt file after dwz
    	invocation.
Comment 8 Tom de Vries 2019-04-29 12:15:10 UTC
With "[gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh" committed, the only issue left is in this PR is the one for which spinoff PR24445 - "dwz multifile index not written to index cache" was filed.

So, marking this one resolved-fixed.