Bug#765111: buildd: [PATCH] buildd no longer parses wanna-build debug lines as real output

2015-12-23 Thread Johannes Schauer
Hi dima,

Quoting Dima Kogan (2015-12-23 22:30:15)
> Oh my. This is an old bug, and I really don't remember much about it anymore.
> I do have a buildd setup, but really have no time to look at it now.
> 
> I do remember that I set up the buildd by following the directions, and hit
> this problem. The attached patch fixed it. The patch ignores debug-log lines,
> which shouldn't look like actual input to buildd. I don't recall what actual
> input looks like, but at the time I seemed satisfied that it'll never look
> like the logging lines.
> 
> There was probably a bug in something else that made this happen in the first
> place, so at worst this patch should be redundant.
> 
> Sorry this wasn't more helpful. I do still have my buildd, and I can look,
> but now just isn't a good time. If you want to use my buildd instance to look
> at it, just ask.

no worries, there is no rush :)

I am just trying to do a big bug cleanup and wanted to see if there is more
info you can provide on this bug. Now I'll just see when I have time to look
into it myself.

Thanks!

cheers, josch


signature.asc
Description: signature


Bug#765111: buildd: [PATCH] buildd no longer parses wanna-build debug lines as real output

2015-12-23 Thread Dima Kogan
Johannes Schauer  writes:

> Could you find somebody who has a running wanna-build/buildd setup who
> can verify either or better both of these things?

Oh my. This is an old bug, and I really don't remember much about it
anymore. I do have a buildd setup, but really have no time to look at it
now.

I do remember that I set up the buildd by following the directions, and
hit this problem. The attached patch fixed it. The patch ignores
debug-log lines, which shouldn't look like actual input to buildd. I
don't recall what actual input looks like, but at the time I seemed
satisfied that it'll never look like the logging lines.

There was probably a bug in something else that made this happen in the
first place, so at worst this patch should be redundant.

Sorry this wasn't more helpful. I do still have my buildd, and I can
look, but now just isn't a good time. If you want to use my buildd
instance to look at it, just ask.

dima



Bug#765111: buildd: [PATCH] buildd no longer parses wanna-build debug lines as real output

2015-12-22 Thread Johannes Schauer
Control: tag -1 + patch

Hi,

On Mon, 13 Oct 2014 10:38:15 -0700 Dima Kogan  wrote:
> On my local setup of buildd/sbuild/wanna-build for whatever reason the pipe
> that buildd uses to talk to wanna-build produces some debugging output. These
> are lines such as
> 
>  D: Setting Session Purged=0
>  D: Setting Log Stream=IO::File=GLOB(0x2293200)
>  D: Setting Host=Sbuild::ChrootRoot=HASH(0x22831f8)
>  D: Setting SETUP=1
>  D2: Pipe (PID 2694, GLOB(0x22935c0)) created for: ssh -l buildd 127.0.0.1 
> wanna-build --arch=amd64 --user=wbadm --api 1 --dist=sid test1_1.0-2
>  Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted HOME
>  Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted SSH_CLIENT
>  Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted LANGUAGE
> 
> The code that buildd was using to parse its output was not ignoring these 
> lines,
> and would try to use them as actual wanna-build output, which clearly would
> fail.

I do not have a wanna-build/buildd setup over here so I can neither reproduce
your problem nor can I verify that your patch doesn't introduce any new
problems.

Could you find somebody who has a running wanna-build/buildd setup who can
verify either or better both of these things?

Thanks!

cheers, josch


signature.asc
Description: signature


Bug#765111: buildd: [PATCH] buildd no longer parses wanna-build debug lines as real output

2014-10-13 Thread Dima Kogan
Source: buildd
Severity: normal

On my local setup of buildd/sbuild/wanna-build for whatever reason the pipe that
buildd uses to talk to wanna-build produces some debugging output. These are
lines such as

 D: Setting Session Purged=0
 D: Setting Log Stream=IO::File=GLOB(0x2293200)
 D: Setting Host=Sbuild::ChrootRoot=HASH(0x22831f8)
 D: Setting SETUP=1
 D2: Pipe (PID 2694, GLOB(0x22935c0)) created for: ssh -l buildd 127.0.0.1 
wanna-build --arch=amd64 --user=wbadm --api 1 --dist=sid test1_1.0-2
 Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted HOME
 Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted SSH_CLIENT
 Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted LANGUAGE

The code that buildd was using to parse its output was not ignoring these lines,
and would try to use them as actual wanna-build output, which clearly would 
fail.
This patch skips those lines.

>From 3cf06a2ade8de030a80162eef3dca991f892ebaf Mon Sep 17 00:00:00 2001
From: Dima Kogan 
Date: Mon, 13 Oct 2014 10:35:28 -0700
Subject: [PATCH] buildd no longer parses wanna-build debug lines as real
 output

On my local setup of buildd/sbuild/wanna-build for whatever reason the pipe that
buildd uses to talk to wanna-build produces some debugging output. These are
lines such as

 D: Setting Session Purged=0
 D: Setting Log Stream=IO::File=GLOB(0x2293200)
 D: Setting Host=Sbuild::ChrootRoot=HASH(0x22831f8)
 D: Setting SETUP=1
 D2: Pipe (PID 2694, GLOB(0x22935c0)) created for: ssh -l buildd 127.0.0.1 wanna-build --arch=amd64 --user=wbadm --api 1 --dist=sid test1_1.0-2
 Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted HOME
 Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted SSH_CLIENT
 Oct 13 08:52:25 buildd[2666]: D2: Environment filter: Deleted LANGUAGE

The code that buildd was using to parse its output was not ignoring these lines,
and would try to use them as actual wanna-build output, which clearly would
fail. This patch skips those lines.
---
 lib/Buildd/Daemon.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/Buildd/Daemon.pm b/lib/Buildd/Daemon.pm
index e9cb1d7..db0d8e8 100644
--- a/lib/Buildd/Daemon.pm
+++ b/lib/Buildd/Daemon.pm
@@ -156,6 +156,9 @@ sub get_next_WANNABUILD {
 
 	my($pkg_ver, $total, $nonex, $lowprio_pkg_ver);
 	while( <$pipe> ) {
+		# Skip debugging lines
+		next if /^D[0-9]*:/;
+
 		my $socket = $dist_config->get('WANNA_BUILD_SSH_SOCKET');
 		if ($socket &&
 		(/^Couldn't connect to $socket: Connection refused[\r]?$/ ||
-- 
2.0.0