<div dir="ltr">I am confused. Do we have a github issue and a mailing list thread on this issue?<div><br></div><div>Can we continue discussion on the github issue?</div><div><br></div><div>Regards<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Pierre</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 24 janv. 2021 à 02:41, Yngve N. Pettersen <<a href="mailto:yngve@vivaldi.com">yngve@vivaldi.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Minor correction i PoC below, doesn't change the result.<br>
<br>
On Sun, 24 Jan 2021 02:30:03 +0100, Yngve N. Pettersen <<a href="mailto:yngve@vivaldi.com" target="_blank">yngve@vivaldi.com</a>>  <br>
wrote:<br>
<br>
><br>
> Hi again,<br>
><br>
> I just did a small bit of PoC testing, and based on that testing I  <br>
> suspect that the problem is that LineConsumerLogObserver.finishReceived  <br>
> is called too early from LogObserver.gotData because data is None,  <br>
> before all data have actually been added to the log.<br>
><br>
> The next line add then triggers a StopIteration exception.<br>
><br>
> PoC:<br>
><br>
> ================<br>
> def foo():<br>
>    while True:<br>
>      try:<br>
>        x = yield<br>
><br>
>        print("X: %d" % x)<br>
>      except StopIteration:<br>
<br>
Should be "except GeneratorExit:"<br>
<br>
>        print("Finished!")<br>
>        return<br>
><br>
> generator = foo()<br>
><br>
> next(generator)<br>
><br>
> feed = generator.send<br>
><br>
> feed(1)<br>
> feed(2)<br>
> feed(3)<br>
><br>
> generator.close()<br>
><br>
> feed(4)<br>
> ================<br>
><br>
> feed(4) will fail with the exception StopIteration<br>
><br>
> On Wed, 13 Jan 2021 17:52:51 +0100, Yngve N. Pettersen  <br>
> <<a href="mailto:yngve@vivaldi.com" target="_blank">yngve@vivaldi.com</a>> wrote:<br>
><br>
>> Hi,<br>
>><br>
>> We are using a class based on steps.ShellCommandNewStyle to process log  <br>
>> output using LineConsumerLogObserver from a number of tests.<br>
>><br>
>> After the v2.10 upgrade (from v2.7) I have noticed several cases of  <br>
>> Exceptions being thrown and being registered as such in the Build  <br>
>> status information. One such case, missing handling of GeneratorExit,  <br>
>> has been fixed.<br>
>><br>
>> But today a lot of these test runs started failing (next on todo list  <br>
>> is finding out why), and was reported terminated due to an exception.<br>
>><br>
>> The exception turns out to be due to a StopIteration from  <br>
>> LineConsumerLogObserver.headerLineReceived (at least in the case I  <br>
>> investigated). My guess is that the "problem line" is one of the two  <br>
>> last lines in the log, which reports the exit status of the task.<br>
>><br>
>> The log handler function is written like the logConsumer function in  <br>
>> <<a href="http://docs.buildbot.net/current/developer/cls-logobserver.html#buildbot.process.logobserver.LineConsumerLogObserver" rel="noreferrer" target="_blank">http://docs.buildbot.net/current/developer/cls-logobserver.html#buildbot.process.logobserver.LineConsumerLogObserver</a>><br>
>><br>
>> Based on what I've quickly skimmed about StopIteration, it should be  <br>
>> handled by the caller of the logConsumer function. This suggests that  <br>
>> LineConsumerLogObserver or its caller need to be updated.<br>
>><br>
>><br>
>> BTW, this is not new in v2.10, this exception also happened in v2.7  <br>
>> based on my grep of the log files. I guess the reason it is now showing  <br>
>> up as an issue is that these exceptions are reported upwards to the  <br>
>> step.<br>
>><br>
>><br>
><br>
><br>
<br>
<br>
-- <br>
Sincerely,<br>
Yngve N. Pettersen<br>
Vivaldi Technologies AS<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a><br>
</blockquote></div>