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

Issue 809201 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Stop using unsupported POSIX APIs under OS_FUCHSIA

Project Member Reported by w...@chromium.org, Feb 5 2018

Issue description

There are a number of POSIX APIs we currently call under OS_FUCHSIA, mostly via implicitly inheriting from OS_POSIX. The Fuchsia SDK will omit these APIs in future, in favour of (re-)introducing POSIX-compatible APIs as and when a real implementation exists.  Affected APIs include:

getpriority
pathconf
pthread_getschedparam
pthread_kill
pthread_mutexattr_setprotocol
pthread_setschedparam
setpriority

We should remove calls to these APIs in Chromium for OS_FUCHSIA, in favour of NOTIMPLEMENTED(), where appropriate, for now.
 

Comment 1 by w...@chromium.org, Feb 5 2018

The Fuchsia-side POSIX API changes are tracked at ZX-1653.

Comment 2 by w...@chromium.org, Feb 5 2018

Status: Started (was: Assigned)

Comment 3 by w...@chromium.org, Feb 6 2018

Looks like this requires changes to v8, angle and webrtc dependencies as well as Chromium itself.
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/ca5c105982c0423a80fd1d2f8b73f633ba34f811

commit ca5c105982c0423a80fd1d2f8b73f633ba34f811
Author: Wez <wez@chromium.org>
Date: Tue Feb 06 20:37:21 2018

Replace a POSIX API call not supported by Fuchsia.

Bug:  chromium:809201 

Change-Id: Iafc2e7efe92bcb977e5185901c073e499114a9f4
Reviewed-on: https://chromium-review.googlesource.com/903261
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>

[modify] https://crrev.com/ca5c105982c0423a80fd1d2f8b73f633ba34f811/src/common/string_utils.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 8 2018

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

commit 148618cd582ca5bf03a3eed7f19d0fedd34cbea0
Author: Wez <wez@chromium.org>
Date: Thu Feb 08 05:56:13 2018

Remove some POSIX API calls that are unsupported under Fuchsia.

Fuchsia will provide a reduced subset of the POSIX APIs, omitting those
which are not yet, or never will be, implemented properly for the new
platform (e.g. fork(), getrlimit(), pthread_kill()).

This CL removes call-sites which use the missing APIs, usually by adding
OS_FUCHSIA as a compile-time condition to code blocks which are already
optional for OS_POSIX platforms.

Bug:  809201 
Change-Id: I0ad543bc99e4f2bef3aca39992dae5900090d0f6
Reviewed-on: https://chromium-review.googlesource.com/904850
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535315}
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/BUILD.gn
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/allocator/partition_allocator/partition_alloc_unittest.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/files/file_util_posix.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/process/process_metrics.h
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/process/process_metrics_fuchsia.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/process/process_metrics_posix.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/process/process_util_unittest.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/synchronization/condition_variable_unittest.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/synchronization/lock_impl_posix.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/threading/platform_thread_fuchsia.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/threading/platform_thread_posix.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/threading/platform_thread_unittest.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/time/pr_time_unittest.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/base/time/time_unittest.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/net/disk_cache/disk_cache_perftest.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/net/disk_cache/simple/simple_backend_impl.cc
[modify] https://crrev.com/148618cd582ca5bf03a3eed7f19d0fedd34cbea0/third_party/WebKit/Source/platform/scheduler/util/thread_cpu_throttler.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/199a3341e4df78c88a94cffc63d55da26f531403

commit 199a3341e4df78c88a94cffc63d55da26f531403
Author: Wez <wez@chromium.org>
Date: Thu Feb 08 23:24:25 2018

Fix various call-sites not to use POSIX APIs unsupported by Fuchsia.

Bug:  chromium:809201 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I060ae3a88c3a3731bfdbb9e6d5cdf8600ec8b832
Reviewed-on: https://chromium-review.googlesource.com/903421
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51190}
[modify] https://crrev.com/199a3341e4df78c88a94cffc63d55da26f531403/src/base/sys-info.cc
[modify] https://crrev.com/199a3341e4df78c88a94cffc63d55da26f531403/src/d8-posix.cc
[modify] https://crrev.com/199a3341e4df78c88a94cffc63d55da26f531403/src/libsampler/sampler.cc

Comment 8 by w...@chromium.org, Feb 9 2018

Status: Fixed (was: Started)
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://webrtc.googlesource.com/src.git/+/0614ed9d3593f2b56bec13e83ca88b1c14fd1cfe

commit 0614ed9d3593f2b56bec13e83ca88b1c14fd1cfe
Author: Wez <wez@chromium.org>
Date: Mon Feb 12 22:06:44 2018

Remove calls to some POSIX APIs which Fuchsia does not implement.

Fuchsia's POSIX-lite does not provide the pthread priority nor file
locking APIs.

Bug:  chromium:809201 
Change-Id: I1efc5fe46909771e4934d91d2ed5f3e97c33444c
Reviewed-on: https://webrtc-review.googlesource.com/48860
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Wez <wez@google.com>
Cr-Commit-Position: refs/heads/master@{#21990}
[modify] https://crrev.com/0614ed9d3593f2b56bec13e83ca88b1c14fd1cfe/rtc_base/platform_thread.cc
[modify] https://crrev.com/0614ed9d3593f2b56bec13e83ca88b1c14fd1cfe/rtc_base/stream.cc
[modify] https://crrev.com/0614ed9d3593f2b56bec13e83ca88b1c14fd1cfe/rtc_base/stream.h

Sign in to add a comment