Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Issue 14567016: Make IsHostPortUsed() handle ports bound by foreign UIDs. (Closed)

Created:
7 years, 7 months ago by Philippe
Modified:
7 years, 7 months ago
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, klundberg+watch_chromium.org, ilevy+watch_chromium.org, frankf+watch_chromium.org, aurimas (slooooooooow), Isaac (away), navabi1
Visibility:
Public.

Description

Make IsHostPortUsed() handle ports bound by foreign UIDs. lsof -np is not able (permission denied when running as non-root to be exact) to retrieve file descriptor information for processes running under a different UID. This can make IsHostPortUsed() return false when the provided port is actually used. Trying to connect to a port rather than binding it should not introduce any side-effect on the system that could affect next runs as the TODO suggested. It is also always sane not to depend on an external process (lsof) output format. BUG=229685 R=bulach@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=198683

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -10 lines) Patch
M build/android/pylib/ports.py View 2 chunks +7 lines, -10 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Philippe
7 years, 7 months ago (2013-05-07 08:33:30 UTC) #1
Philippe
FYI, this is also needed to fix the release bot downstream which is always failing ...
7 years, 7 months ago (2013-05-07 08:34:32 UTC) #2
Philippe
FYI, this is also needed to fix the release bot downstream which is always failing ...
7 years, 7 months ago (2013-05-07 08:34:32 UTC) #3
bulach
lgtm
7 years, 7 months ago (2013-05-07 08:36:48 UTC) #4
Philippe
On 2013/05/07 08:36:48, bulach wrote: > lgtm Thanks Marcus! FYI, I re-ran the android_dbg bot. ...
7 years, 7 months ago (2013-05-07 09:15:25 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/14567016/1
7 years, 7 months ago (2013-05-07 09:32:25 UTC) #6
Philippe
On 2013/05/07 09:32:25, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
7 years, 7 months ago (2013-05-07 10:07:02 UTC) #7
Philippe
Committed patchset #1 manually as r198683 (presubmit successful).
7 years, 7 months ago (2013-05-07 12:16:35 UTC) #8
boliu
If no one has notified you yet...this seem to be breaking upstream tester. It seems ...
7 years, 7 months ago (2013-05-07 16:18:13 UTC) #9
pliard
I did notice the failures but cannot see how it could be related. Do you? ...
7 years, 7 months ago (2013-05-07 16:19:35 UTC) #10
pliard
We can try to revert this and see what happens. On Tue, May 7, 2013 ...
7 years, 7 months ago (2013-05-07 16:20:00 UTC) #11
pliard
I landed https://codereview.chromium.org/15021006/ as a revert. On Tue, May 7, 2013 at 6:19 PM, Philippe ...
7 years, 7 months ago (2013-05-07 16:26:15 UTC) #12
Philippe
On 2013/05/07 16:26:15, pliard wrote: > I landed https://codereview.chromium.org/15021006/ as a revert. > > > ...
7 years, 7 months ago (2013-05-07 16:35:26 UTC) #13
navabi
7 years, 7 months ago (2013-05-08 01:33:39 UTC) #14
Message was sent while issue was closed.
On 2013/05/07 16:35:26, Philippe wrote:
> On 2013/05/07 16:26:15, pliard wrote:
> > I landed https://codereview.chromium.org/15021006/ as a revert.
> > 
> > 
> > On Tue, May 7, 2013 at 6:19 PM, Philippe Liard <mailto:pliard@google.com>
> wrote:
> > 
> > > We can try to revert this and see what happens.
> > >
> > >
> > > On Tue, May 7, 2013 at 6:19 PM, Philippe Liard <mailto:pliard@google.com>
> wrote:
> > >
> > >> I did notice the failures but cannot see how it could be related. Do you?
> > >>
> > >>
> > >> On Tue, May 7, 2013 at 6:18 PM, <mailto:boliu@chromium.org> wrote:
> > >>
> > >>> If no one has notified you yet...this seem to be breaking upstream
> > >>> tester. It
> > >>> seems to be knocking devices offline permanently.
> > >>>
> > >>>
> >
>
https://codereview.chromium.**org/14567016/%253Chttps://codereview.chromium.o...>
> > >>>
> > >>
> > >>
> > >
> 
> Armand/Isaac do you guys see how this change could make the devices go
offline?
> Could this interfere with reboot on disconnect?

Devices going offline is a tricky beast. I do not see how this particular change
could make the devices go offline, but that does seem to what is going on (we'll
know for sure now that Siva has rebooted the devices and the change has been
reverted).

Note that the devices are on IMM76D. That has known to go offline, but did not
do so on the upstream Android Tests bot. We saw it on the downstream yakju perf
bots. bulach, do you know anything that the downstream perf bots do, that are
like this change. We may be able to identify the source of this device failure
now that we have more information.

Questions:

Do the downstream perf bots do something similar that could have been causing
this problem when those devices were on IMM76D?

Would devices go offline with this change on a different Android build (i.e. a
JB build)?

Also, the Android team may be interested in what we are finding out.

Powered by Google App Engine
This is Rietveld 408576698