Bug#936055: t/unthreaded.t test failing

2020-03-01 Thread Sergio Durigan Junior
Control: reassign -1 gdb 9.1-1
Control: forwarded -1 
https://sourceware.org/ml/gdb-patches/2020-03/msg00010.html
Control: retitle -1 [regression] GDB can't printf convenience vars that hold 
pointers to strings

On Wednesday, February 19 2020, gregor herrmann wrote:

> On Wed, 19 Feb 2020 14:16:52 +0100, Héctor Orón Martínez wrote:
>
>>   This issue is now affecting GDB 9.1 autopkgtests and preventing it from 
>> migrating to testing.
>>   
>> https://ci.debian.net/data/autopkgtest/testing/amd64/liba/libapp-stacktrace-perl/4328197/log.gz
>>   
>> https://ci.debian.net/data/autopkgtest/testing/arm64/liba/libapp-stacktrace-perl/4314744/log.gz
>
> Oh, one of the bugs which "hide":
> https://ci.debian.net/packages/liba/libapp-stacktrace-perl/testing/amd64/
> is all green, and after clicking on britney it turns red:
> https://ci.debian.net/user/britney/jobs?package=libapp-stacktrace-perl[]=testing[]=amd64

Hi there,

After spending a non-trivial amount of time investigating this over the
weekend, I was able to find the underlying case of the bug (and come up
with a fix).  Please, keep reading.

> Anyway, in the meantime it also FTBFS in unstable:
>
> # [Thread debugging using libthread_db enabled]
> # Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> # 0x7f7b77cc1047 in select () from /lib/x86_64-linux-gnu/libc.so.6
> # à|ÚU:101
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # [Inferior 1 (process 25884) detached]
>
> #   Failed test at t/unthreaded.t line 55.
> #   '[Thread debugging using libthread_db enabled]
> # Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> # 0x7f7b77cc1047 in select () from /lib/x86_64-linux-gnu/libc.so.6
> # à|ÚU:101
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # à|ÚU:106
> # [Inferior 1 (process 25884) detached]
> # '
> # doesn't match '(?^mx:
> # (?:
> # ^t/unthreaded\.t:\d+\n
> # ){10}
> # )'
> # Looks like you failed 1 test of 5.
> t/unthreaded.t  
> 1..5
> not ok 1
> ok 2 - Reaped pstack
> ok 3 - exit(0)
> ok 4 - No signals
> ok 5 - No core dump
> # Alive top 1582127930: 1 middle: 1
> # Alive top 1582127931: 1 middle: 0
> Dubious, test returned 1 (wstat 256, 0x100)
> Failed 1/5 subtests 
>
> Test Summary Report
> ---
> t/unthreaded.t  (Wstat: 256 Tests: 5 Failed: 1)
>   Failed test:  1
>   Non-zero exit status: 1
> Files=4, Tests=6,  2 wallclock secs ( 0.03 usr  0.01 sys +  0.96 cusr  0.09 
> csys =  1.09 CPU)
> Result: FAIL
>
> (I _think_ that's yet another different error.)

This seems to be the same failure reported by doko.

> In testing with gdb 8.3.1 the package still builds:
>
> # [Thread debugging using libthread_db enabled]
> # Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> # 0x7f1b9eb77047 in select () from /lib/x86_64-linux-gnu/libc.so.6
> # t/unthreaded.t:101
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # t/unthreaded.t:106
> # [Inferior 1 (process 3207) detached]
> t/unthreaded.t  
> 1..5
> ok 1
> ok 2 - Reaped pstack
> ok 3 - exit(0)
> ok 4 - No signals
> ok 5 - No core dump
> # Alive top 1582128303: 1 middle: 1
> # Alive top 1582128304: 1 middle: 0
> ok

Right.  This is actually a regression that happened on GDB (therefore
I'm reassigning the bug).

So, it took me quite a bit of time to debug this because
libapp-stacktrace-perl doesn't help when it comes to seeing what GDB is
doing inside it...  But I was able to determine that the problem started
happening after the following upstream commit:

  commit 1f6f6e21fa86dc3411a6498608f32e9eb24b7851
  Author: Philippe Waroquiers 
  Date:   Mon Jun 10 21:41:51 2019 +0200

  Ensure GDB printf command can print convenience var strings without a 
target.

As the commit title says, the goal here was to make GDB's "printf"
command be able to print convenience variables that are strings without
the need for a target (a program/corefile being debugged, for example).
However, the commit changed the way GDB treats convenience variables
that *point* to addresses referring to e.g. a "char *" inside the
debuggee's memory space.  GDB will treat this as a string (because it's
pointing to a "char *"), and will try to obtain its value via the wrong
mechanism.

I won't dive too deep here; suffice it to say that if we treat
convenience variables that hold pointers in a different manner, then
things get back to normal.

I submitted a tentative patch to fix this upstream, and will backport it
downstream once my approach is deemed correct.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 

Bug#936055: t/unthreaded.t test failing

2020-02-19 Thread gregor herrmann
Control: severity -1 serious

On Wed, 19 Feb 2020 14:16:52 +0100, Héctor Orón Martínez wrote:

>   This issue is now affecting GDB 9.1 autopkgtests and preventing it from 
> migrating to testing.
>   
> https://ci.debian.net/data/autopkgtest/testing/amd64/liba/libapp-stacktrace-perl/4328197/log.gz
>   
> https://ci.debian.net/data/autopkgtest/testing/arm64/liba/libapp-stacktrace-perl/4314744/log.gz

Oh, one of the bugs which "hide":
https://ci.debian.net/packages/liba/libapp-stacktrace-perl/testing/amd64/
is all green, and after clicking on britney it turns red:
https://ci.debian.net/user/britney/jobs?package=libapp-stacktrace-perl[]=testing[]=amd64

Anyway, in the meantime it also FTBFS in unstable:

# [Thread debugging using libthread_db enabled]
# Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
# 0x7f7b77cc1047 in select () from /lib/x86_64-linux-gnu/libc.so.6
# à|ÚU:101
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# [Inferior 1 (process 25884) detached]

#   Failed test at t/unthreaded.t line 55.
#   '[Thread debugging using libthread_db enabled]
# Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
# 0x7f7b77cc1047 in select () from /lib/x86_64-linux-gnu/libc.so.6
# à|ÚU:101
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# à|ÚU:106
# [Inferior 1 (process 25884) detached]
# '
# doesn't match '(?^mx:
# (?:
# ^t/unthreaded\.t:\d+\n
# ){10}
# )'
# Looks like you failed 1 test of 5.
t/unthreaded.t  
1..5
not ok 1
ok 2 - Reaped pstack
ok 3 - exit(0)
ok 4 - No signals
ok 5 - No core dump
# Alive top 1582127930: 1 middle: 1
# Alive top 1582127931: 1 middle: 0
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests 

Test Summary Report
---
t/unthreaded.t  (Wstat: 256 Tests: 5 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=4, Tests=6,  2 wallclock secs ( 0.03 usr  0.01 sys +  0.96 cusr  0.09 
csys =  1.09 CPU)
Result: FAIL

(I _think_ that's yet another different error.)


In testing with gdb 8.3.1 the package still builds:

# [Thread debugging using libthread_db enabled]
# Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
# 0x7f1b9eb77047 in select () from /lib/x86_64-linux-gnu/libc.so.6
# t/unthreaded.t:101
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# t/unthreaded.t:106
# [Inferior 1 (process 3207) detached]
t/unthreaded.t  
1..5
ok 1
ok 2 - Reaped pstack
ok 3 - exit(0)
ok 4 - No signals
ok 5 - No core dump
# Alive top 1582128303: 1 middle: 1
# Alive top 1582128304: 1 middle: 0
ok



Cheers,
gregor


-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Pink Floyd: Another Brick In The Wall (part 1)


signature.asc
Description: Digital Signature


Bug#936055: t/unthreaded.t test failing

2020-02-19 Thread Héctor Orón Martínez
Source: libapp-stacktrace-perl
Version: 0.09-3
Followup-For: Bug #936055

Dear Maintainer,

  This issue is now affecting GDB 9.1 autopkgtests and preventing it from 
migrating to testing.
  
https://ci.debian.net/data/autopkgtest/testing/amd64/liba/libapp-stacktrace-perl/4328197/log.gz
  
https://ci.debian.net/data/autopkgtest/testing/arm64/liba/libapp-stacktrace-perl/4314744/log.gz

Regards

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf

Kernel: Linux 5.3.0-1-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8), 
LANGUAGE=ca_AD:ca (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



Bug#936055: t/unthreaded.t test failing

2019-08-31 Thread gregor herrmann
On Sat, 31 Aug 2019 14:57:15 +0200, gregor herrmann wrote:

> Some random notes:

What I also noted, probably unrelated but still:

During the build:

dpkg-gencontrol: warning: Depends field of package perl-stacktrace: 
substitution variable ${shlibs:Depends} used, but is not defined
dpkg-gencontrol: warning: Depends field of package perl-stacktrace: 
substitution variable ${shlibs:Depends} used, but is not defined

Lintian:

W: perl-stacktrace: shared-lib-without-dependency-information 
usr/lib/x86_64-linux-gnu/perl5/5.28/auto/App/Stacktrace/Stacktrace.so

(ldd indeed returns "static")


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Lightnin' Hopkins: Cryin' Shame


signature.asc
Description: Digital Signature


Bug#936055: t/unthreaded.t test failing

2019-08-31 Thread gregor herrmann
On Thu, 29 Aug 2019 15:45:03 +0200, Matthias Klose wrote:

> Package: src:libapp-stacktrace-perl
> Version: 0.09-3
> Severity: important
> Tags: upstream
> Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=121262
> 
> I see you already forwarded this upstream.  Filing the issue, because I also
> see that in Ubuntu at
> https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-eoan/eoan/amd64/liba/libapp-stacktrace-perl/20190828_222752_2da85@/log.gz

Thanks for the bug report.

Some random notes:
- I can't get t/unthreaded.t to fail when running it in a loop (in a
  cowbuilder chroot) for hours.
- The failure in the CPAN ticket looks different than the one from the
  Ubuntu autopkgtest.
- The package has a patch [0] which mentions a bug [1] which also has
  a failure in t/unthreaded.t (which looks more like the CPAN failure
  than the Ubuntu failure).
 
> Is there a way to exit with a status for unreliable tests, that gets ignored
> by the autopkg tests?

None that I'm aware of, at least with the autopkgtest-pkg-perl
framework.
And I suspect that the problem should show up not only for
autopkgtests but also during build, at least potentially.

But I note that it builds/tests fine about everywhere we have in
Debian (buildds, reproducible builds, and also debci for testing and
unstable just a few days ago [2]).

Cheers,
gregor, confused


[0] 
https://sources.debian.org/src/libapp-stacktrace-perl/0.09-3/debian/patches/0001-Pointers-should-be-long-not-int.patch/
[1] https://bugs.debian.org/775744
[2] https://ci.debian.net/packages/liba/libapp-stacktrace-perl/testing/amd64/
https://ci.debian.net/packages/liba/libapp-stacktrace-perl/unstable/amd64/

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Lightnin' Hopkins: Cryin' Shame


signature.asc
Description: Digital Signature


Bug#936055: t/unthreaded.t test failing

2019-08-29 Thread Matthias Klose

Package: src:libapp-stacktrace-perl
Version: 0.09-3
Severity: important
Tags: upstream
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=121262

I see you already forwarded this upstream.  Filing the issue, because I also see 
that in Ubuntu at

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-eoan/eoan/amd64/liba/libapp-stacktrace-perl/20190828_222752_2da85@/log.gz

Is there a way to exit with a status for unreliable tests, that gets ignored by 
the autopkg tests?