Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-20 Thread Michael Biebl
Am 20.11.2016 um 23:24 schrieb Michael Biebl:
> Am 20.11.2016 um 17:55 schrieb Rainer Gerhards:
>> 2016-11-20 17:45 GMT+01:00 Michael Biebl :
>>> Am 20.11.2016 um 16:17 schrieb Rainer Gerhards:
 Lucas found the right root cause: It looks like the preload lib is not
 loaded on that platform. See
 https://github.com/rsyslog/rsyslog/issues/1268
>>>
>>> I'm not sure. I can't reproduce the issue with a standard Debian
>>> /etc/hosts which contains separate lines for localhost and the hostname.
>>
>> Well, the key point of the override library is that gethostname()
>> ALWAYS returns "", no matter how the system is configured. So if the
>> configured name is returned, the preload (or lib) did not work. I'd
>> outrule that the lib does not work, as it is ultra-small:
> 
> The override library is definitely loaded. I added some logging output
> to getLocalHostname to print out hnbuf. This logs localhost.
> Later on, rsyslog decides to use foo as hostname non-theless.
> 
> So my guess, rsyslog uses another code path (not based on gethostname)
> to determine the hostname.

I added some printf debug statements to runtime/net.c

Looking at getLocalHostname(), we do get an empty hostname from
gethostname() (from the overriden library) and at
https://github.com/rsyslog/rsyslog/blob/master/runtime/net.c#L1157

hnbuf is set to localhost (as expected).

At https://github.com/rsyslog/rsyslog/blob/master/runtime/net.c#L1164
dot is NULL so it calls gethostbyname() and iterates over the aliases.
This is where things go wrong. If I have an entry like this

127.0.0.1 foo localhost

fqdn is set to foo and this is what's returned from getLocalHostname.

Rainer, is that info sufficient for you to take it from here?



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-20 Thread Michael Biebl
Am 20.11.2016 um 17:55 schrieb Rainer Gerhards:
> 2016-11-20 17:45 GMT+01:00 Michael Biebl :
>> Am 20.11.2016 um 16:17 schrieb Rainer Gerhards:
>>> Lucas found the right root cause: It looks like the preload lib is not
>>> loaded on that platform. See
>>> https://github.com/rsyslog/rsyslog/issues/1268
>>
>> I'm not sure. I can't reproduce the issue with a standard Debian
>> /etc/hosts which contains separate lines for localhost and the hostname.
> 
> Well, the key point of the override library is that gethostname()
> ALWAYS returns "", no matter how the system is configured. So if the
> configured name is returned, the preload (or lib) did not work. I'd
> outrule that the lib does not work, as it is ultra-small:

The override library is definitely loaded. I added some logging output
to getLocalHostname to print out hnbuf. This logs localhost.
Later on, rsyslog decides to use foo as hostname non-theless.

So my guess, rsyslog uses another code path (not based on gethostname)
to determine the hostname.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-20 Thread Rainer Gerhards
2016-11-20 17:45 GMT+01:00 Michael Biebl :
> Am 20.11.2016 um 16:17 schrieb Rainer Gerhards:
>> Lucas found the right root cause: It looks like the preload lib is not
>> loaded on that platform. See
>> https://github.com/rsyslog/rsyslog/issues/1268
>
> I'm not sure. I can't reproduce the issue with a standard Debian
> /etc/hosts which contains separate lines for localhost and the hostname.

Well, the key point of the override library is that gethostname()
ALWAYS returns "", no matter how the system is configured. So if the
configured name is returned, the preload (or lib) did not work. I'd
outrule that the lib does not work, as it is ultra-small:

https://github.com/rsyslog/rsyslog/blob/master/tests/override_gethostname.c

Any suggestion of what may be wrong with the test tooling is appreciated.

Rainer
>
> I'm able to reproduce the failing test if I modify /etc/hosts to have
> 127.0.0.1 foo localhost
>
> The library seems to be loaded in both cases.
>
>
>
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
>



Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-20 Thread Michael Biebl
Am 20.11.2016 um 16:17 schrieb Rainer Gerhards:
> Lucas found the right root cause: It looks like the preload lib is not
> loaded on that platform. See
> https://github.com/rsyslog/rsyslog/issues/1268

I'm not sure. I can't reproduce the issue with a standard Debian
/etc/hosts which contains separate lines for localhost and the hostname.

I'm able to reproduce the failing test if I modify /etc/hosts to have
127.0.0.1 foo localhost

The library seems to be loaded in both cases.



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-20 Thread Rainer Gerhards
Lucas found the right root cause: It looks like the preload lib is not
loaded on that platform. See
https://github.com/rsyslog/rsyslog/issues/1268

I can modify the test so that it is skipped if the preload fails, but
I wonder why this happens in the first place (and if there is a better
solution that skipping).

Rainer

2016-11-20 14:18 GMT+01:00 Michael Biebl :
> Am 20.11.2016 um 08:50 schrieb Lucas Nussbaum:
>> 
>> Test: ./empty-hostname.sh
>> 
>> rsyslogd started with pid  71369
>> imdiag[13500]: mainqueue empty
>> expected hostname "localhost" not found in logs, rsyslog.out.log is:
>> 2016-11-18T23:01:17.942712+00:00 ip-172-31-8-210 rsyslogd: [origin 
>> software="rsyslogd" swVersion="8.23.0" x-pid="71369" 
>> x-info="http://www.rsyslog.com";] start
>> 2016-11-18T23:01:19.984583+00:00 ip-172-31-8-210 rsyslogd: [origin 
>> software="rsyslogd" swVersion="8.23.0" x-pid="71369" 
>> x-info="http://www.rsyslog.com";] exiting on signal 15.
>> FAIL empty-hostname.sh (exit status: 1)
>>
>> I can still reproduce the problem.
>
> It was hinted on IRC, that this build failure is triggered on AWS as
> /etc/hosts is configured differently there.
> A standard Debian setup has
>
> 127.0.0.1 localhost
> 127.0.1.1 
>
> whereas AWS uses
>
> 127.0.0.1  localhost
>
>
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
>



Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-20 Thread Michael Biebl
Am 20.11.2016 um 08:50 schrieb Lucas Nussbaum:
> 
> Test: ./empty-hostname.sh
> 
> rsyslogd started with pid  71369
> imdiag[13500]: mainqueue empty
> expected hostname "localhost" not found in logs, rsyslog.out.log is:
> 2016-11-18T23:01:17.942712+00:00 ip-172-31-8-210 rsyslogd: [origin 
> software="rsyslogd" swVersion="8.23.0" x-pid="71369" 
> x-info="http://www.rsyslog.com";] start
> 2016-11-18T23:01:19.984583+00:00 ip-172-31-8-210 rsyslogd: [origin 
> software="rsyslogd" swVersion="8.23.0" x-pid="71369" 
> x-info="http://www.rsyslog.com";] exiting on signal 15.
> FAIL empty-hostname.sh (exit status: 1)
> 
> I can still reproduce the problem.

It was hinted on IRC, that this build failure is triggered on AWS as
/etc/hosts is configured differently there.
A standard Debian setup has

127.0.0.1 localhost
127.0.1.1 

whereas AWS uses

127.0.0.1  localhost


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-20 Thread Lucas Nussbaum
Hi,

On 19/11/16 at 22:35 +0100, Michael Biebl wrote:
> control: tags -1 + moreinfo unreproducible
> 
> Am 19.11.2016 um 08:04 schrieb Lucas Nussbaum:
> 
> >> ===
> >> need to be root to run this test - skipping
> >> SKIP sndrcv_relp_dflt_pt.sh (exit status: 77)
> >>
> 
> I can't reproduce the issue when building the package locally.
> The package I uploaded 2 days ago also built fine
> https://buildd.debian.org/status/package.php?p=rsyslog
> 
> 
> Can you provide more information how I can reproduce the issue?

Hi,

Note that the error you quoted is not the one that is making the build
to fail.

It's:
FAIL: empty-hostname.sh
===

==

Test: ./empty-hostname.sh

rsyslogd started with pid  71369
imdiag[13500]: mainqueue empty
expected hostname "localhost" not found in logs, rsyslog.out.log is:
2016-11-18T23:01:17.942712+00:00 ip-172-31-8-210 rsyslogd: [origin 
software="rsyslogd" swVersion="8.23.0" x-pid="71369" 
x-info="http://www.rsyslog.com";] start
2016-11-18T23:01:19.984583+00:00 ip-172-31-8-210 rsyslogd: [origin 
software="rsyslogd" swVersion="8.23.0" x-pid="71369" 
x-info="http://www.rsyslog.com";] exiting on signal 15.
FAIL empty-hostname.sh (exit status: 1)

I can still reproduce the problem.

That's the failing test:

# cat empty-hostname.sh
#!/bin/bash
# This is part of the rsyslog testbench, licensed under ASL 2.0
echo ==
. $srcdir/diag.sh init
. $srcdir/diag.sh generate-conf
. $srcdir/diag.sh add-conf '
action(type="omfile" file="rsyslog.out.log")
'
export RSYSLOG_PRELOAD=.libs/liboverride_gethostname.so
. $srcdir/diag.sh startup
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing 
messages
. $srcdir/diag.sh wait-shutdown# we need to wait until rsyslogd is finished!

grep " localhost " < rsyslog.out.log
if [ ! $? -eq 0 ]; then
  echo "expected hostname \"localhost\" not found in logs, rsyslog.out.log is:"
  cat rsyslog.out.log
  . $srcdir/diag.sh error-exit 1
fi;

. $srcdir/diag.sh exit

It seems that
export RSYSLOG_PRELOAD=.libs/liboverride_gethostname.so
is supposed to load a library that will override gethostname?
That file exists. It seems to work:

(unstable-amd64-sbuild)root@ip-172-31-14-215:~/rsyslog-8.23.0/tests# export 
LD_PRELOAD=.libs/liboverride_gethostname.so 
(unstable-amd64-sbuild)root@ip-172-31-14-215:~/rsyslog-8.23.0/tests# hostname

(unstable-amd64-sbuild)root@ip-172-31-14-215:~/rsyslog-8.23.0/tests# export 
LD_PRELOAD=
(unstable-amd64-sbuild)root@ip-172-31-14-215:~/rsyslog-8.23.0/tests# hostname 
ip-172-31-14-215

But it doesn't seem to work when loaded during the test, by diag.sh.
Strange.

Lucas



Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-19 Thread Michael Biebl
control: tags -1 + moreinfo unreproducible

Am 19.11.2016 um 08:04 schrieb Lucas Nussbaum:

>> ===
>> need to be root to run this test - skipping
>> SKIP sndrcv_relp_dflt_pt.sh (exit status: 77)
>>

I can't reproduce the issue when building the package locally.
The package I uploaded 2 days ago also built fine
https://buildd.debian.org/status/package.php?p=rsyslog


Can you provide more information how I can reproduce the issue?

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#844914: rsyslog: FTBFS: Tests failures

2016-11-18 Thread Lucas Nussbaum
Source: rsyslog
Version: 8.23.0-1
Severity: serious
Tags: stretch sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-20161118 qa-ftbfs
Justification: FTBFS on amd64

Hi,

During a rebuild of all packages in sid, your package failed to build on
amd64.

Relevant part (hopefully):
> 
> 
> 
> Test: ./omjournal-basic-no-template.sh
> 
> journalctl command missing, skipping test
> SKIP omjournal-basic-no-template.sh (exit status: 77)
> 
> SKIP: sndrcv_relp_dflt_pt.sh
> 
> 
> ===
> need to be root to run this test - skipping
> SKIP sndrcv_relp_dflt_pt.sh (exit status: 77)
> 
> debian/rules:66: recipe for target 'override_dh_auto_test' failed

The full build log is available from:
   http://aws-logs.debian.net/2016/11/18/rsyslog_8.23.0-1_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.