Status Update
Comments
aj...@google.com <aj...@google.com> #2
The watchdog issue is caused by vold stuck in mounting fuse user bind bounts
I only have the logs on Xiaomi devices, and Xiaomi's dual app feature is built based on the AOSP's app clone feature, only difference is that the user id of the Xiaomi's dual app is fixed to 999
// create the app clone
03-05 16:11:01.422 989 989 I vold : onUserAdded: 999
03-05 16:11:02.028 989 989 I vold : Bind mounted /mnt/user/0/emulated/0 on /mnt/user/999/emulated/0
03-05 16:11:02.028 989 989 I vold : Configuring read_ahead of /mnt/user/999/emulated fuse filesystem to 256kb
// Delete app clone
03-05 16:11:11.230 989 995 I vold : Killing all processes referencing /storage/emulated/999
03-05 16:11:11.785 989 995 I vold : fuse-bpf is disabled because of property ro.fuse.bpf.is_running
03-05 16:11:11.785 989 995 I vold : Unmounting /mnt/user/999/emulated/0
03-05 16:11:11.786 989 995 I vold : Unmounting /mnt/user/999/emulated/999/Android/data
03-05 16:11:11.787 989 995 I vold : Unmounted /mnt/user/999/emulated/999/Android/data
03-05 16:11:11.787 989 995 I vold : Unmounting /mnt/user/999/emulated/999/Android/obb
03-05 16:11:11.787 989 995 I vold : Unmounted /mnt/user/999/emulated/999/Android/obb
03-05 16:11:11.787 989 995 I vold : Unmounting fuse path /mnt/user/999/emulated
03-05 16:11:11.788 989 995 I vold : Unmounting pass_through_path /mnt/pass_through/999/emulated
// Re-create the app clone
03-05 16:12:28.393 989 995 I vold : onUserAdded: 999
03-05 16:12:28.626 989 995 I vold : Mounting emulated fuse volume
03-05 16:12:28.638 989 995 I vold : Bind mounting /data/media to /mnt/pass_through/999/emulated
03-05 16:12:28.644 2604 3669 I StorageSessionController: Creating and starting session with id: emulated;999
// Becuase the old fuse session for the the previously deleted app clone is not destroyed correctly, new session would not be created
03-05 16:12:28.656 5845 6204 W ExternalStorageServiceImpl: Session already started with id: emulated;999
// Stuck forever !
03-05 16:12:28.657 989 995 I vold : Bind mounting //data/media/999/Android/data on /mnt/user/999/emulated/999/Android/data
"watchdog.monitor" prio=5 tid=16 Native
| group="main" sCount=1 ucsCount=0 flags=1 obj=0x138c1540 self=0xb400007b61654330
| sysTid=2753 nice=0 cgrp=foreground sched=0/0 handle=0x798c6766b0
| state=S schedstat=( 14406145 8462918 49 ) utm=0 stm=0 core=1 HZ=100
| stack=0x798c573000-0x798c575000 stackSize=1037KB
| held mutexes=
native: #00 pc 000c304c /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+12) (BuildId: da81583da99c8268aa14df4694ef9086)
native: #01 pc 00069c7c /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: da81583da99c8268aa14df4694ef9086)
native: #02 pc 0004bec0 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver+244) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #03 pc 0004d23c /system/lib64/libbinder.so (android::IPCThreadState::waitForResponse+136) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #04 pc 0004cf48 /system/lib64/libbinder.so (android::IPCThreadState::transact+188) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #05 pc 00061e48 /system/lib64/libbinder.so (android::BpBinder::transact+200) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #06 pc 001b2b10 /system/lib64/libandroid_runtime.so (android_os_BinderProxy_transact+156) (BuildId: 462355a3dfd128463d8eb4e28bd5323f)
at android.os.BinderProxy.transactNative(Native method)
at android.os.BinderProxy.transact(BinderProxy.java:684)
at android.os.IVold$Stub$Proxy.monitor(IVold.java:1666)
at com.android.server.StorageManagerService.monitor(StorageManagerService.java:5093)
at com.android.server.Watchdog$HandlerChecker.run(Watchdog.java:410)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:249)
at android.os.Looper.loop(Looper.java:337)
at android.os.HandlerThread.run(HandlerThread.java:85)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
DumpLatencyMs: 23.7132
"StorageManagerService" prio=5 tid=123 Native
| group="main" sCount=1 ucsCount=0 flags=1 obj=0xcf012b8 self=0xb400007b61768960
| sysTid=3669 nice=0 cgrp=foreground sched=0/0 handle=0x79093c36b0
| state=S schedstat=( 50018397 84219946 273 ) utm=2 stm=2 core=5 HZ=100
| stack=0x79092c0000-0x79092c2000 stackSize=1037KB
| held mutexes=
native: #00 pc 000c304c /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+12) (BuildId: da81583da99c8268aa14df4694ef9086)
native: #01 pc 00069c7c /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: da81583da99c8268aa14df4694ef9086)
native: #02 pc 0004bec0 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver+244) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #03 pc 0004d23c /system/lib64/libbinder.so (android::IPCThreadState::waitForResponse+136) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #04 pc 0004cf48 /system/lib64/libbinder.so (android::IPCThreadState::transact+188) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #05 pc 00061e48 /system/lib64/libbinder.so (android::BpBinder::transact+200) (BuildId: 44b748826f51f8fcc91290b7d22a013e)
native: #06 pc 001b2b10 /system/lib64/libandroid_runtime.so (android_os_BinderProxy_transact+156) (BuildId: 462355a3dfd128463d8eb4e28bd5323f)
at android.os.BinderProxy.transactNative(Native method)
at android.os.BinderProxy.transact(BinderProxy.java:684)
at android.os.IVold$Stub$Proxy.mount(IVold.java:1866)
at com.android.server.StorageManagerService.mount(StorageManagerService.java:2591)
at com.android.server.StorageManagerService.-$$Nest$mmount(unavailable:0)
at com.android.server.StorageManagerService$StorageManagerServiceHandler.handleMessage(StorageManagerService.java:782)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:249)
at android.os.Looper.loop(Looper.java:337)
at android.os.HandlerThread.run(HandlerThread.java:85)
----- Waiting Channels: pid 989 at 2025-03-05 16:13:44.984401844+0800 -----
Cmd line: /system/bin/vold --blkid_context=u:r:blkid:s0 --blkid_untrusted_context=u:r:blkid_untrusted:s0 --fsck_context=u:r:fsck:s0 --fsck_untrusted_context=u:r:fsck_untrusted:s0
sysTid=989 state=S binder_wait_for_work
sysTid=995 state=D fuse_get_req
sysTid=996 state=S do_sys_poll
sysTid=997 state=S binder_wait_for_work
sysTid=1096 state=S binder_wait_for_work
sysTid=1280 state=S futex_wait_queue_me
sysTid=3677 state=S binder_wait_for_work
sysTid=11118 state=S futex_wait_queue_me
----- end 989 -----
<6>[ 244.766287][T12063] sysrq: Show Blocked State
<6>[ 244.766384][T12063] task:binder:989_1 state:D stack: 0 pid: 995 ppid: 1 flags:0x04000001
<6>[ 244.766389][T12063] Call trace:
<6>[ 244.766396][T12063] __switch_to+0x180/0x2dc
<6>[ 244.766401][T12063] __schedule+0x4dc/0x940
<6>[ 244.766403][T12063] schedule+0x80/0x100
<6>[ 244.766407][T12063] fuse_get_req+0xc4/0x2b4
<6>[ 244.766408][T12063] fuse_simple_request+0x3c/0x298
<6>[ 244.766410][T12063] fuse_lookup_name+0x110/0x240
<6>[ 244.766412][T12063] fuse_lookup+0x80/0x1e4
<6>[ 244.766415][T12063] __lookup_slow+0x13c/0x1ec
<6>[ 244.766417][T12063] walk_component+0x1d4/0x230
<6>[ 244.766418][T12063] link_path_walk+0x248/0x374
<6>[ 244.766420][T12063] path_lookupat+0x94/0x17c
<6>[ 244.766421][T12063] filename_lookup+0xcc/0x208
<6>[ 244.766424][T12063] __arm64_sys_umount+0x68/0xb4
<6>[ 244.766428][T12063] el0_svc_common.llvm.1779838892619036198+0xd0/0x1e0
<6>[ 244.766429][T12063] do_el0_svc+0x28/0x98
<6>[ 244.766432][T12063] el0_svc+0x14/0x24
<6>[ 244.766434][T12063] el0_sync_handler+0x88/0xec
<6>[ 244.766436][T12063] el0_sync+0x1b8/0x1c0
The exact code where vold stuck in is
// system/vold/model/EmulatedVolume.cpp
status_t EmulatedVolume::doMount() {
...
if (!IsFuseBpfEnabled()) {
// Only do the bind-mounts when we know for sure the FUSE daemon can resolve the path.
res = mountFuseBindMounts();
if (res != OK) {
return res;
}
}
// system/vold/Utils.cpp
status_t MountUserFuse(userid_t user_id, const std::string& absolute_lower_path,
const std::string& relative_upper_path, android::base::unique_fd* fuse_fd) {
std::string pre_fuse_path(StringPrintf("/mnt/user/%d", user_id));
std::string fuse_path(
StringPrintf("%s/%s", pre_fuse_path.c_str(), relative_upper_path.c_str()));
// Open fuse fd.
fuse_fd->reset(open("/dev/fuse", O_RDWR | O_CLOEXEC));
if (fuse_fd->get() == -1) {
PLOG(ERROR) << "Failed to open /dev/fuse";
return -1;
}
// Note: leaving out default_permissions since we don't want kernel to do lower filesystem
// permission checks before routing to FUSE daemon.
const auto opts = StringPrintf(
"fd=%i,"
"rootmode=40000,"
"allow_other,"
"user_id=0,group_id=0,",
fuse_fd->get());
result = TEMP_FAILURE_RETRY(mount("/dev/fuse", fuse_path.c_str(), "fuse",
MS_NOSUID | MS_NODEV | MS_NOEXEC | MS_NOATIME | MS_LAZYTIME,
opts.c_str()));
if (result != 0) {
PLOG(ERROR) << "Failed to mount " << fuse_path;
return -errno;
}
if (IsSdcardfsUsed()) {
...
} else {
LOG(INFO) << "Bind mounting " << absolute_lower_path << " to " << pass_through_path;
return BindMount(absolute_lower_path, pass_through_path); // <<<<<<<<<<<<<<<
}
}
status_t BindMount(const std::string& source, const std::string& target) {
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// This will stuck since the fuse is initlized above, so this unmount request will go through the fuse driver,
// but the fuse daemon in the user space will never start
if (UnmountTree(target) < 0) {
return -errno;
}
if (TEMP_FAILURE_RETRY(mount(source.c_str(), target.c_str(), nullptr, MS_BIND, nullptr)) < 0) {
PLOG(ERROR) << "Failed to bind mount " << source << " to " << target;
return -errno;
}
return OK;
}
aj...@google.com <aj...@google.com> #3
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
gb...@google.com <gb...@google.com> #4
I think it's a bug of the app clone feature, could you please assign this to
aj...@google.com <aj...@google.com> #5
As discussed on the CL shared by you, here is the patch to try to see if it works on your side. It actually tries to make sure that fuse daemon thread exists when we unmount the volume for clone profile.
ap...@google.com <ap...@google.com> #6
Thanks for the patch, I've verified that it could address the previous vold hang issue when disable and re-enable the dual app feature
ap...@google.com <ap...@google.com> #7
Branch: main
commit bb2278911caa6718078fefbfac04d9f69f089425
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Thu Jun 06 00:06:56 2024
toolchain-utils: Add useful git utils to git_utils
This commit does 3 things:
1. Move git_format_patch from get_patch into git_utils,
as now "format_patch" (kept a wrapper for mocking).
2. Adds new git utilities to git_utils, such as
get_message_subject, get_commit_metadata, merge_base,
branch_list, and commits_between.
3. Adds some minor testing for git_utils_test.py
BUG=b:343568613
TEST=run_python_tests.py
Change-Id: Iabd8dd34b6db102877ad8571cb1a2c6b6df6f996
Reviewed-on:
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
M cros_utils/git_utils.py
M cros_utils/git_utils_test.py
M llvm_tools/get_patch.py
M llvm_tools/get_patch_test.py
ap...@google.com <ap...@google.com> #8
Branch: main
commit 5dbd8092cca4d22abe5106e487f7f780adefe254
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Fri Jun 07 18:25:39 2024
llvm_tools: Add create_patch_file
This adds a new script which allows us to create
and edit a PATCHES.json file from LLVM commits
on ChromiumOS branches.
Additionally, this adds minor testing for the
new script.
BUG=b:343568613
TEST=py/bin/llvm_tools/create_patch_file.py \
--patch-dir ../chromiumos-overlay/sys-devel/llvm/files
TEST=run_python_tests.py
Change-Id: I1446fc56291c4b838af1e5c0632e6d72b1500742
Reviewed-on:
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
A llvm_tools/create_patch_file.py
A llvm_tools/create_patch_file_test.py
A py/bin/llvm_tools/create_patch_file.py
ap...@google.com <ap...@google.com> #9
Branch: main
commit caae51d4f788eca657d0cb4b3ebd0f7a1a4b6f7c
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Mon Jun 10 21:25:05 2024
llvm_tools: chromiumos_apply for CrOS LLVM branches
With the new planned workflow for branch patches, we
need a mechanism to apply the patches with a set footer.
This footer should contain relevant information about the
patch, so that when it's represented inside PATCHES.json,
the values are accurate.
BUG=b:343568613
TEST=py/bin/llvm_tools/patch_manager.py \
--svn_version 516547 \
--patch_metadata_file \
$(realpath \
../chromiumos-overlay/sys-devel/llvm/files/PATCHES.json) \
--src_path ../llvm-project/
Change-Id: Iea3f5b359fef9cd6b27d5452b7abbe89206e282e
Reviewed-on:
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
M llvm_tools/patch_manager.py
M llvm_tools/patch_utils.py
ap...@google.com <ap...@google.com> #10
Branch: main
commit f358b3bffa1147322e3e299abc300d40f264aa96
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Wed Jun 12 21:48:30 2024
llvm_tools: Strip Change-Id from commit messages
We don't want to store Change-Ids in the patch contents.
Strip them from the commits.
BUG=b:343568613
TEST=py/bin/llvm_tools/create_patch_file.py \
--patch-dir ../chromiumos-overlay/sys-devel/llvm/files
TEST=run_python_tests.py
Change-Id: I6793c251496589ccc3bb698357e1e2bbc13e48f0
Reviewed-on:
Reviewed-by: Bob Haarman <inglorion@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
M llvm_tools/create_patch_file.py
M llvm_tools/create_patch_file_test.py
ap...@google.com <ap...@google.com> #11
Branch: main
commit 067f8282aada83736d623d64cbfb9276543e85cd
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Fri Jun 14 23:53:05 2024
sys-devel: Restructure all patches for git am
The `git am` application process requires a fairly
strict patch format. The easiest way to get these patch
formats is through `git format-patch`. Additionally,
many patches are renamed to better match their autogenerated
format-patch names.
This commit also introduces the concept of "original_sha"
metadata entries.
We can always add metadata entries without worry, as they
are always preserved by our tooling by design--yet are
never required.
Many of these changes will be overwritten the next
time we run create_patch_file.py, but we need to get
the patches in a state that we can even apply them
as a series of commits.
BUG=b:343568613
TEST=./py/bin/llvm_tools/patch_manager.py \
--chromiumos_apply \
--src_path ../llvm-project/ \
--patch_metadata_file \
../chromiumos-overlay/sys-devel/llvm/files/PATCHES.json \
--svn_version 516547
Change-Id: I1a65b3d4a2cca78019d1fffb98619fd59d8b49a3
Reviewed-on:
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
M sys-devel/llvm/files/Adds-a-allowlist-of-packages-that-have-known-memory-v5.patch
M sys-devel/llvm/files/BOLT-Increase-max-allocation-size-to-allow-BOLTing-clang-and-rustc.patch
M sys-devel/llvm/files/Disable-Cast-Assertion.patch
M sys-devel/llvm/files/Disable-vfork-fork-events.patch
M sys-devel/llvm/files/Ignore-inlinable-calls-if-unrolling-is-forced.patch
M sys-devel/llvm/files/PATCHES.json
M sys-devel/llvm/files/cherry/339faffd053b60bee3515fe7c4cca5e76f2cf427.patch
M sys-devel/llvm/files/cherry/7e34ee5291b935a1e37cd1b132552187d5c784d0.patch
M sys-devel/llvm/files/cherry/801c78d5b474c2319aa8ead44db7ba8cacac4714.patch
M sys-devel/llvm/files/cherry/955dd8800b4745784bf6da948ec7992d5b75b4d7.patch
M sys-devel/llvm/files/cherry/af2bf86a372cacf5f536bae06e2f2d3886eefb7b.patch
M sys-devel/llvm/files/cherry/ed86e740effaf1de540820a145a9df44eaf0df0e.patch
M sys-devel/llvm/files/cherry/f1ac559534788f8dd42191b60dfdf9cc56b39fd4.patch
M sys-devel/llvm/files/clang-12.0-asan-default-path.patch
M sys-devel/llvm/files/compiler-rt-un-unset-compiler_rt_build_crt.patch
M sys-devel/llvm/files/disable-querying-git-in-benchmarking-code.patch
M sys-devel/llvm/files/inline-cost-skip-threshold-checks.patch
M sys-devel/llvm/files/libcxx-crash-when-dereferencing-nullopt-v3.patch
M sys-devel/llvm/files/lld-10.0-invoke-name-v2.patch
M sys-devel/llvm/files/llvm-17.0-invocation.patch
M sys-devel/llvm/files/llvm-3.9-dwarf-version.patch
M sys-devel/llvm/files/llvm-8.0-clang-executable-detection.v2.patch
M sys-devel/llvm/files/scudo-Add-baseline-Scudo-config-for-ChromeOS-v2.patch
ap...@google.com <ap...@google.com> #12
Branch: main
commit 95796977ec5bd5b3bec4764aab426b6dffae035a
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Mon Jun 17 19:50:05 2024
llvm_tools: Fix writing to cherry/ subdirs
The parent of each atomic_write call must exist prior to calling
the atomic_write call. When testing, I found that this broke
when the cherry/ patch subdirectory didn't exist.
Not likely a problem in real-world usage, but it's a nice fix
for testing.
BUG=b:343568613
TEST=py/bin/llvm_tools/create_patch_file.py \
--patch-dir patches_test
Change-Id: I060c3c98c9651c6bbec7dde7150aeb076f6edab1
Reviewed-on:
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
M llvm_tools/create_patch_file.py
ap...@google.com <ap...@google.com> #13
Branch: main
commit ef5e5e51b24f7d6862165c87fa1fbb0827d92fba
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Mon Jun 17 19:25:28 2024
llvm_tools: Add support for original_sha
The intent of original_sha is to preserve the upstream SHA
(or some other preserve-worthy SHA) in the commit metadata
info.
We are free to add entries to "metadata", as Patch Sync and
patch_utils always preserve metadata as closely as possible.
Also fix a bug where "from_rev" returned "null" as its default
instead of the intended "0".
Also fix a left over print statement for skipping Change-Id.
BUG=b:343568613
TEST=./run_python_tests.py
TEST=py/bin/llvm_tools/create_patch_file.py \
--patch-dir ../chromiumos-overlay/sys-devel/llvm/files
Change-Id: I9731a56592491e96f2390db7fc32f16ce224ba31
Reviewed-on:
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
M llvm_tools/create_patch_file.py
M llvm_tools/get_patch.py
M llvm_tools/get_patch_test.py
M llvm_tools/patch_utils.py
ap...@google.com <ap...@google.com> #14
Branch: main
commit c788c4080a389e3dcd915ca493dff5d93b1b9b0a
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Mon Jul 08 19:30:14 2024
llvm_tools: Add llvm_project_base_commit.py lib
This library gives programs a quick way to make an LLVM-project
base commit for the new branching workflow.
BUG=b:343568613
TEST=Run python tests
Change-Id: I412f66b8d85b0aa0bbf2d7097bdbd27ab0e1d043
Reviewed-on:
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
A llvm_tools/llvm_project_base_commit.py
ap...@google.com <ap...@google.com> #15
Branch: main
commit ab7ba1c694472ed66ce589d8b9881fb4ce5d16be
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Tue Jul 16 00:08:41 2024
llvm_tools: Fix typo in llvm_project_base_commit
We need to write to the README, not the directory. :)
BUG=b:343568613
TEST=./run_python_tests.py verify_patch_consistency_test.py
Change-Id: I30b156fbca9f84b64bcb80bed091b7e7ca30aa49
Reviewed-on:
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
M llvm_tools/llvm_project_base_commit.py
ap...@google.com <ap...@google.com> #16
Branch: main
commit df5d3350658cc6416b11ef5596cefa7713bc4284
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Fri Jun 28 20:10:56 2024
llvm_tools: Add verify_patch_consistency.py
This adds a new script which will verify that a given
LLVM branch CL is identical to a the local patch state
generated from a given SVN revision.
Also add the git_am_chromiumos_quiet patch function
so that it doesn't spam the terminal with patch application
messages.
BUG=b:343568613
TEST=py/bin/llvm_tools/verify_patch_consistency.py --cl 5637483
TEST=run_python_tests.sh
Change-Id: Ia1764238e721812c1adc620a439b37a077004dd5
Reviewed-on:
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
M cros_utils/git_utils.py
M llvm_tools/patch_utils.py
A llvm_tools/verify_patch_consistency.py
A llvm_tools/verify_patch_consistency_test.py
A py/bin/llvm_tools/verify_patch_consistency.py
ap...@google.com <ap...@google.com> #17
Branch: main
commit 984d27e8544fa547ce9680def8dd1a659cc4e9c7
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Mon Jul 08 19:34:14 2024
llvm_tools: Add ready_llvm_branch.py
This script creates an LLVM branch locally with the necessary patch
stack.
This is a really simple script that's basically just a patch_utils.py
wrapper--and is almost entirely a subset of patch_manager.py. But it
has more ergonomic CLI usage, so I thought it would be still nice to
add.
BUG=b:343568613
TEST=py/bin/llvm_tools/ready_llvm_branch.py \
-r 516547 --branch-number 2
Change-Id: I610b3989da47de004a5c9d8491ad6dfbb04c3ef8
Reviewed-on:
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
M cros_utils/cros_paths.py
M cros_utils/git_utils.py
A llvm_tools/ready_llvm_branch.py
A py/bin/llvm_tools/ready_llvm_branch.py
ap...@google.com <ap...@google.com> #18
Branch: main
commit 9213283d09be2e24439113496da9a432986fdb6c
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Thu Jul 18 18:23:29 2024
llvm_tools: Minor bug fixes for git_llvm_rev
git_llvm_rev.translate_rev_to_sha is the better
library call here instead of GetGitHashFrom. Was
encountering a bug where the chosen svn_revision
didn't exist (or rather, only existed in the future),
and the logging here was unclear.
While testing, I noticed that want_rev was not
filling in, so fixed the formatting there too.
BUG=b:343568613
TEST=py/bin/llvm_tools/ready_llvm_branch.py -r516547
TEST=run_python_tests.sh
Change-Id: Id4ec590891a803be3d6d0ed16da9e86157feb274
Reviewed-on:
Reviewed-by: George Burgess <gbiv@chromium.org>
Auto-Submit: Jordan Abrahams-Whitehead <ajordanr@google.com>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: George Burgess <gbiv@chromium.org>
M llvm_tools/git_llvm_rev.py
M llvm_tools/ready_llvm_branch.py
ap...@google.com <ap...@google.com> #19
Branch: main
commit e2fbffceda26d0840d9e3702a152dab0561a1b35
Author: Jordan R Abrahams-Whitehead <ajordanr@google.com>
Date: Fri Jul 19 20:49:38 2024
toolchain-utils: Edit CMakeLists in Base Commit
setup_for_workon.py uses a CMakeLists.txt hack
to prevent cmake.eclass from editing the
source files directly.
Move the parts from setup_for_workon.py into
the llvm_project_base_commit library so
it can be shared across the scripts, and
update all the users.
BUG=b:343568613, b:354225301
TEST=run_python_tests.sh
TEST=Built llvm with cros workon enabled and eclass edits
Change-Id: I12720625614f2cec38ab8ea083028f2c02f3de25
Reviewed-on:
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
M cros_utils/cros_paths.py
M llvm_tools/llvm_project_base_commit.py
M llvm_tools/ready_llvm_branch.py
M llvm_tools/setup_for_workon.py
M llvm_tools/verify_patch_consistency.py
M llvm_tools/verify_patch_consistency_test.py
bl...@google.com <bl...@google.com> #20
Automated by Blunderbuss job chromeos-toolchain-blunderbuss for config chromeos_blunderbuss_config for component 1038090.
bl...@google.com <bl...@google.com> #21
(Attention: @aj...@google.com)
Automated by Blunderbuss job chromeos-toolchain-blunderbuss for config chromeos_blunderbuss_config for component 1038090.
Description
At present, we keep track of patches solely through single metadata files called PATCHES.json. This has worked for quite a while, but as we've streamlined the patching process through
-9999
Live ebuilds andpatch-sync
setup_for_workon.py
, PATCHES.json gets updated at a rate that it's become tedious to rebase.Even more frustrating, each llvm project must have its own PATCHES.json--if they are combined, PUPr ebuild uprevving does not know they are changed.
Through some internal discussion and feedback from the ChromeOS Build team, we think we can implement a solution which uses Chromium Git-on-Borg branches/tags (GoB).
Here's some prior discussion on the topic.