New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 813530 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2018
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

calculate_package_deps.py deadlocks when dpkg-shlibdeps writes a lot to stderr

Project Member Reported by pkern@google.com, Feb 19 2018

Issue description

On my workstation when trying to build the Debian package calculate_package_deps.py is invoked and then deadlocks during the build. This is because the stderr pipe is filled with too much output for the current code to process. It wait()s first and then calls communicate() instead of the other way around, so the pipe is never emptied for dpkg-shlibdeps to write more and it's blocked indefinitely. Luckily the fix is just to follow the documentation and to reverse the two calls.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ddf4330d65164fee55d1b7ed9cd055910bcbec19

commit ddf4330d65164fee55d1b7ed9cd055910bcbec19
Author: Philipp Kern <pkern@google.com>
Date: Tue Feb 20 18:59:47 2018

Avoid a deadlock in calculate_package_deps.py.

Large output on stderr will fill up the pipe and because wait is called
before the pipe is emptied, the process actually deadlocks. Swap around
the communicate() and wait() calls to make this work properly.

Bug:  813530 
Change-Id: I58e05ac497b7c2d9aa2dd3fcd551421aea023242
Reviewed-on: https://chromium-review.googlesource.com/924224
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Philipp Kern <pkern@google.com>
Cr-Commit-Position: refs/heads/master@{#537838}
[modify] https://crrev.com/ddf4330d65164fee55d1b7ed9cd055910bcbec19/chrome/installer/linux/debian/calculate_package_deps.py

Comment 2 by pkern@google.com, Feb 20 2018

Status: Fixed (was: Unconfirmed)

Sign in to add a comment