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

Issue 740305 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 1
Type: Bug

Blocked on:
issue 740692

Blocking:
issue 706592
issue 738275



Sign in to add a comment

MessageLoop*FileDescriptorWatcherTest*Readable* tests fail

Project Member Reported by w...@chromium.org, Jul 8 2017

Issue description

Various *Readable* tests fail. If you run them in a Debug build, you'll see e.g:

[00000.764] 03339.03440> [ RUN      ] MessageLoopForIOOnMainThread/FileDescriptorWatcherTest.WatchReadableOneByte/0
[00000.765] 03339.03440> [3:1792027440:0708/015600.185316:765203:ERROR:message_pump_fuchsia.cc(215)] mx_port_queue failed: -10

As a result the test hangs, since the file-descriptor is not actually being watched, and the failure is silently ignored.
 

Comment 1 by w...@chromium.org, Jul 8 2017

Blocking: 706592
Summary: MessageLoop*FileDescriptorWatcherTest*Readable* tests fail (was: MessageLoop*FileDescriptorWatcherTest*Readable* fail)

Comment 2 by w...@chromium.org, Jul 8 2017

Blocking: 738275

Comment 3 by w...@chromium.org, Jul 8 2017

Cc: jam...@chromium.org
Error previous listed is mx_port_queue failing with MX_ERR_INVALID_ARGS, most likely indicating that |port| isn't a valid port handle.

Read registration failure is:

[00000.801] 03179.03221> mx_object_wait_async_failed[3:2028579632:0708/020458.245169:801427:ERROR:message_pump_fuchsia.cc(107)] mx_object_wait_async failed: -12

This is an MX_ERR_WRONG_TYPE failure, again suggesting that we're passing an invalid |port| parameter.

Comment 4 by w...@chromium.org, Jul 9 2017

Owner: w...@chromium.org
Status: Started (was: Untriaged)
While we're dependent on unstable/private mxio APIs we should ideally build on the ulib port API wrapper, which implements fd-watching, to benefit from updates/improvements to that in future SDK rolls.

Comment 5 by w...@chromium.org, Jul 11 2017

Blockedon: 740692
Found threading bugs in some test fixtures, including the FileDescriptorWatcher POSIX wrapper, which would explain why this has been flakey - fixes are up for review at https://chromium-review.googlesource.com/c/565227.

Comment 6 by w...@chromium.org, Jul 12 2017

Components: Internals>TaskScheduler
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 12 2017

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

commit 14e88d132b8de80803a825078fe16fd433410360
Author: Wez <wez@chromium.org>
Date: Wed Jul 12 01:51:00 2017

Add extra CHECKs and DLOGs, and missing MX_PORT_OPT_V2.

This reverts https://chromium-review.googlesource.com/562660.

Our current Fuchsia SDK has a kernel version which supports both the
old ports API, and the new "V2" API, so we must pass the MX_PORT_OPT_V2
option, to create the right version of port. We will un-do this change,
and possibly migrate to using the ulib/port APIs, in future.

This CL also fixes StopWatchingFileDescriptor() to cope with being
called more than once, to match the API/interface expectations, adds
some additional Debug logging for API failures, and adds CHECKs on
calls which we cannot cope with seeing fail.

Bug:  740305 

Change-Id: I2579039fbd747e528da3c59cba9f2e1d07bf7326
Reviewed-on: https://chromium-review.googlesource.com/564739
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485787}
[modify] https://crrev.com/14e88d132b8de80803a825078fe16fd433410360/base/message_loop/message_pump_fuchsia.cc

Comment 8 by w...@chromium.org, Jul 12 2017

Status: Fixed (was: Started)

Sign in to add a comment