tag:help.appveyor.com,2012-11-13:/discussions/problems/25166-byoc-100-cpu-usage-in-bash-shellsh-and-random-exited-with-code-1AppVeyor: Discussion 2019-11-04T21:05:10Ztag:help.appveyor.com,2012-11-13:Comment/477275782019-10-14T20:08:25Z2019-10-14T20:08:25ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>Hi Jan,</p>
<p>Thank you for such a thorough test of BYOC!</p>
<p>Do you still have a command to create a custom Docker image that would work with your project (or you can upload it to Docker registry if it's not huge :)?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/477275782019-10-14T21:09:36Z2019-10-14T21:09:36ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>Hi,</p>
<p>it should be available as "jvesely/ci:appveyor" on docker hub.<br>
setting up BYOC was my first exposure to docker infrastructure so I'm sure there are ways to do things better.<br>
thanks.</p></div>Jan Veselytag:help.appveyor.com,2012-11-13:Comment/477275782019-10-15T02:44:48Z2019-10-17T01:56:41ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>I was able to get around the test hang in 3., by using <code>sh</code> instead of <code>pwsh</code>.<br>
I assume finishing a job (before 'on_finish') also involves some powershell commands.<br>
so it looks like there's something wrong with powershell on that image.</p>
<p>EDIT: to be more specific, the problem seems to be switching from <code>sh</code> to <code>pwsh</code></p></div>Jan Veselytag:help.appveyor.com,2012-11-13:Comment/477275782019-10-17T02:05:58Z2019-10-17T02:05:58ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>Hi,</p>
<p>Switching builds to use <code>pwsh</code> exclusively works around the hangs.<br>
Exporting PIP_PROGRESS_BAR=off fixed the occasional "exited with code 1" error.</p></div>Jan Veselytag:help.appveyor.com,2012-11-13:Comment/477275782019-10-17T03:32:12Z2019-10-17T03:32:12ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>Interesting findings! We'll look into what might be wrong with bash loop. I guess "exited with code 1" is also related to bash issue...</p>
<p>You know what, could you try one more thing please? What if you switch back to using <code>sh</code> everywhere, but additionally configure <code>APPVEYOR_CONSOLE_DISABLE_PTY: true</code> environment variable on that build (either yaml or UI)? This way the log "coloring" will be off without PTY emulation proxy. Just wondering if that makes the build stable.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/477275782019-10-17T18:35:57Z2019-10-17T18:35:57ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>Hi,<br>
using <code>APPVEYOR_CONSOLE_DISABLE_PTY: true</code> fixes the hangs when using a mix of <code>sh</code> and <code>pwsh</code> commands.</p>
<p>thanks!</p></div>Jan Veselytag:help.appveyor.com,2012-11-13:Comment/477275782019-10-18T17:25:09Z2019-10-18T17:25:09ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>That's great, thanks for the update! It means we should revisit our implementation of PTY.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/477275782019-11-03T03:57:43Z2019-11-03T03:57:43ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>I've run into one more similar problem. A pure <code>sh</code> setup (similar to 2.) with artifacts works without setting <code>APPVEYOR_CONSOLE_DISABLE_PTY: true</code>, but the artifact upload speeds are extremely low (~1min to upload 4MB), to the point it occasionally fails to upload at all[0]<br>
The other symptoms are similar; 100% cpu usage in bash-shell.sh.</p>
<p>[0] <a href="https://ci.appveyor.com/project/jvesely/llvm-project-libclc/builds/28571324/job/lrrdaq83ovqdpal1">https://ci.appveyor.com/project/jvesely/llvm-project-libclc/builds/...</a></p></div>Jan Veselytag:help.appveyor.com,2012-11-13:Comment/477275782019-11-03T21:29:37Z2019-11-03T21:29:37ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>Where the server you are uploading from is located?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/477275782019-11-04T01:03:04Z2019-11-04T21:05:10ZBYOC: 100% CPU usage in 'bash-shell.sh' and random 'exited with code 1'<div><p>The machine is located on the Rutgers University network (central NJ).</p>
<p>Edit: the upload speed looks like local Rutger issue. It's still interesting that it doesn't need the <code>PTY</code> workaround in the presence of artifacts.</p></div>Jan Vesely