<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">(I truncated some of the repetitive output below)</div><div class="gmail_quote"><br></div><div class="gmail_quote">I just tried with the -o argument and seems like it passes. I guess it only affects stdout output, good to know.</div><div class="gmail_quote"><br></div><div class="gmail_quote">We're using python 2.7.5 in production. I did some testing today with Python 3.4.3 and it seems the 3.4.x stream at least doesn't run into this issue so I'm guessing this only affects Python 2.7.x.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Regards,</div><div class="gmail_quote"><br></div><div class="gmail_quote">Thanh</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">On 8 January 2016 at 12:44, Wayne Warren <span dir="ltr"><<a href="mailto:wayne@puppetlabs.com" target="_blank">wayne@puppetlabs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Thanh,<br>
<br>
Looking at that stack trace and the command that causes it, it appears<br>
that the object whose encoding is being accessed is "sys.stdout" [1]<br>
<br>
I would suggest trying to pass a specific "-o" argument to the "test"<br>
subcommand to see if the stream.encoding __getattr__ recursion happens<br>
there also.<br>
<br>
Also, what specific minor version of Python are you using?<br>
<br>
[1] <a href="https://review.openstack.org/gitweb?p=openstack-infra/jenkins-job-builder.git;a=blob;f=jenkins_jobs/cmd.py;h=efafdf05fa35f93a00633489dde160c06930641d;hb=b023d7e23f77e4de33e740dcc37af911e36fb189#l115" rel="noreferrer" target="_blank">https://review.openstack.org/gitweb?p=openstack-infra/jenkins-job-builder.git;a=blob;f=jenkins_jobs/cmd.py;h=efafdf05fa35f93a00633489dde160c06930641d;hb=b023d7e23f77e4de33e740dcc37af911e36fb189#l115</a><br>
<div><div><br>
On Thu, Jan 7, 2016 at 5:40 PM, Thanh Ha <<a href="mailto:thanh.ha@linuxfoundation.org" target="_blank">thanh.ha@linuxfoundation.org</a>> wrote:<br>
> Hi JJB Devs,<br>
><br>
> We discovered what seems to be a regression with JJB 1.4.0 which after some<br>
> git bisecting found it was caused by this patch [1]. My Jenkins verify<br>
> builds are failing to pass due to python runtime error:<br>
><br>
> RuntimeError: maximum recursion depth exceeded<br>
><br>
> This error follows what seems to be a recursive loop of python codecs<br>
> __getattr__ attempts. I've pasted the full traceback below. This issue seems<br>
> to only affect the command "jenkins-jobs test --recursive /path/to/jobs" and<br>
> when as part of a Jenkins verify job. Oddly enough running "jenkins-jobs<br>
> update --recursive /path/to/jobs" seems to pass just fine.<br>
><br>
> Any ideas how to fix or workaround this issue? (This issue is preventing us<br>
> from upgrading to JJB 1.4.0)<br>
><br>
> Thanks,<br>
><br>
> Thanh<br>
><br>
> [1] <a href="https://review.openstack.org/183939/" rel="noreferrer" target="_blank">https://review.openstack.org/183939/</a><br>
><br>
><br>
> Traceback (most recent call last):<br>
> File "/tmp/jjbtest/jjb/bin/jenkins-jobs", line 11, in <module><br>
> sys.exit(main())<br>
> File "/tmp/jjbtest/jjb/lib/python2.7/site-packages/jenkins_jobs/cmd.py",<br>
> line 172, in main<br>
> execute(options, config)<br>
> File "/tmp/jjbtest/jjb/lib/python2.7/site-packages/jenkins_jobs/cmd.py",<br>
> line 337, in execute<br>
> output=options.output_dir)<br>
> File<br>
> "/tmp/jjbtest/jjb/lib/python2.7/site-packages/jenkins_jobs/builder.py", line<br>
> 326, in update_job<br>
> output = utils.wrap_stream(output)<br>
> File "/tmp/jjbtest/jjb/lib/python2.7/site-packages/jenkins_jobs/utils.py",<br>
> line 25, in wrap_stream<br>
> stream_enc = stream.encoding<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>
> File "/tmp/jjbtest/jjb/lib64/python2.7/codecs.py", line 828, in<br>
> __getattr__<br>
> return getattr(self.stream, name)<br>> ...<br>
> RuntimeError: maximum recursion depth exceeded<br></div></div></blockquote></div></div></div>