Vsh can hang and use 100% cpu |
||
Issue descriptionThis has happened occasionally during manual runs of tast-test, and now I have a repro case for it. If you SSH into the DUT and run this script (replace owner_id): x=0; while [ 1 ] ; do vsh --vm_name=termina --target_container=penguin --owner_id=533dd0c6a9276e2629fa1eac6a5ccbb8eeb24d59 -- sh -c "echo 'nothing but the web ${x}' > ~/index.html"; echo ${x}; x=`expr ${x} + 1`; done Then after a little bit it will end up hanging. If you then connect into the terminal you'll see vsh using 100% of the CPU and a defunct sh process. Occasionally it also spits out this error: [ERROR:utils.cc(32)] Failed to write message size to socket: Broken pipe [ERROR:vsh_client.cc(264)] Failed to send tty window resize message Putting the DUT under load makes this happen faster; it's also more likely to happen if there isn't another active vsh session.
,
Sep 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/4b2c3d1581b4a413b0596134dff2fbba75cf3e99 commit 4b2c3d1581b4a413b0596134dff2fbba75cf3e99 Author: Stephen Barber <smbarber@chromium.org> Date: Tue Sep 18 21:03:51 2018 vm_tools: vsh: block SIGCHLD before fork It's possible for SIGCHLD to be delivered before the parent has started listening for it. So set the signal disposition to be blocked rather than ignored, so we can get the signal delivered later. BUG= chromium:882002 TEST=run vsh commands in a loop; no hang Change-Id: I45b2810496dfce4353d3806d40a7b49d7c4e5ca1 Reviewed-on: https://chromium-review.googlesource.com/1227380 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> [modify] https://crrev.com/4b2c3d1581b4a413b0596134dff2fbba75cf3e99/vm_tools/vsh/vsh_forwarder.cc
,
Sep 18
|
||
►
Sign in to add a comment |
||
Comment 1 by smbar...@chromium.org
, Sep 13Labels: -Pri-2 M-71 Pri-1
Status: Started (was: Assigned)