Date: Tue, 25 Feb 2025 09:19:50 GMT
From: Robert Nagy <rnagy@FreeBSD.org>
To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject: git: ab91b1a5e5f4 - 2025Q1 - www/{*chromium,iridium}: disable shadow metadata in PA to fix random crashes
Message-ID: <202502250919.51P9Josx072837@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch 2025Q1 has been updated by rnagy: URL: https://cgit.FreeBSD.org/ports/commit/?id=ab91b1a5e5f4af2a8922b4e3da8772a1d7c666dd commit ab91b1a5e5f4af2a8922b4e3da8772a1d7c666dd Author: Robert Nagy <rnagy@FreeBSD.org> AuthorDate: 2025-02-25 07:07:44 +0000 Commit: Robert Nagy <rnagy@FreeBSD.org> CommitDate: 2025-02-25 09:19:40 +0000 www/{*chromium,iridium}: disable shadow metadata in PA to fix random crashes also sync the code with the shared patch repo and fixup the plist (cherry picked from commit 1df26190841853c1bdead536fb6634c771675c6b) --- www/chromium/Makefile | 1 + ...cator_partition__allocator_partition__alloc.gni | 11 ++++++++- ...patch-base_process_process__metrics__openbsd.cc | 27 +++------------------- www/chromium/pkg-plist | 1 + www/iridium/Makefile | 1 + ...cator_partition__allocator_partition__alloc.gni | 11 ++++++++- ...patch-base_process_process__metrics__openbsd.cc | 27 +++------------------- www/iridium/pkg-plist | 1 + www/ungoogled-chromium/Makefile | 1 + ...cator_partition__allocator_partition__alloc.gni | 11 ++++++++- ...patch-base_process_process__metrics__openbsd.cc | 27 +++------------------- www/ungoogled-chromium/pkg-plist | 1 + 12 files changed, 45 insertions(+), 75 deletions(-) diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 89e50a06d14f..1bc5a2afb640 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -1,5 +1,6 @@ PORTNAME= chromium PORTVERSION= 133.0.6943.126 +PORTREVISION= 1 PULSEMV= 16 PULSEV= ${PULSEMV}.1 CATEGORIES= www wayland diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 86247717e179..2e3a81d95c03 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,4 +1,4 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-02-19 07:43:18 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-02-25 07:06:47 UTC +++ base/allocator/partition_allocator/partition_alloc.gni @@ -39,7 +39,7 @@ if (is_nacl) { use_large_empty_slot_span_ring = true @@ -9,6 +9,15 @@ declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, +@@ -290,7 +290,7 @@ declare_args() { + declare_args() { + # Shadow metadata is still under development and only supports Linux + # for now. +- enable_shadow_metadata = is_linux && has_64_bit_pointers ++ enable_shadow_metadata = !is_bsd && is_linux && has_64_bit_pointers + } + + declare_args() { @@ -433,7 +433,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. diff --git a/www/chromium/files/patch-base_process_process__metrics__openbsd.cc b/www/chromium/files/patch-base_process_process__metrics__openbsd.cc index c71666b0c046..5bb5b1da2134 100644 --- a/www/chromium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/chromium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,4 +1,4 @@ ---- base/process/process_metrics_openbsd.cc.orig 2025-02-19 07:43:18 UTC +--- base/process/process_metrics_openbsd.cc.orig 2025-02-25 07:06:47 UTC +++ base/process/process_metrics_openbsd.cc @@ -6,73 +6,85 @@ @@ -122,7 +122,7 @@ struct vmtotal vmtotal; unsigned long mem_total, mem_free, mem_inactive; size_t len = sizeof(vmtotal); -@@ -85,9 +97,136 @@ size_t GetSystemCommitCharge() { +@@ -85,9 +97,115 @@ size_t GetSystemCommitCharge() { mem_free = vmtotal.t_free; mem_inactive = vmtotal.t_vm - vmtotal.t_avm; @@ -133,32 +133,11 @@ +} + +int ProcessMetrics::GetOpenFdCount() const { -+#if 0 -+ struct kinfo_file *files; -+ kvm_t *kd = NULL; -+ int total_count = 0; -+ char errbuf[_POSIX2_LINE_MAX]; -+ -+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) -+ goto out; -+ -+ if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, -+ sizeof(struct kinfo_file), &total_count)) == NULL) { -+ total_count = 0; -+ goto out; -+ } -+ -+ kvm_close(kd); -+ -+out: -+ return total_count; -+#endif -+ return getdtablecount(); ++ return (process_ == getpid()) ? getdtablecount() : -1; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); -+// return GetMaxFds(); +} + +bool ProcessMetrics::GetPageFaultCounts(PageFaultCounts* counts) const { diff --git a/www/chromium/pkg-plist b/www/chromium/pkg-plist index 2ec07b30c6ad..7f700c6df485 100644 --- a/www/chromium/pkg-plist +++ b/www/chromium/pkg-plist @@ -131,6 +131,7 @@ bin/chrome %%DATADIR%%/resources/accessibility/reading_mode_gdocs_helper_manifest.json %%DATADIR%%/resources/inspector_overlay/inspector_overlay_resources.grd %%DATADIR%%/resources/inspector_overlay/main.js +%%DATADIR%%/resources/tts_engine/background.js %%DATADIR%%/snapshot_blob.bin %%NOT_AARCH64%%%%DATADIR%%/libvk_swiftshader.so %%NOT_AARCH64%%%%DATADIR%%/vk_swiftshader_icd.json diff --git a/www/iridium/Makefile b/www/iridium/Makefile index 24a6180689d2..729bd0bcd21b 100644 --- a/www/iridium/Makefile +++ b/www/iridium/Makefile @@ -1,5 +1,6 @@ PORTNAME= iridium PORTVERSION= 2025.02.133 +PORTREVISION= 1 PULSEMV= 16 PULSEV= ${PULSEMV}.1 CATEGORIES= www wayland diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index e0df18646808..9ef81b4e8afb 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,4 +1,4 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-02-22 18:06:53 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-02-25 07:07:23 UTC +++ base/allocator/partition_allocator/partition_alloc.gni @@ -39,7 +39,7 @@ if (is_nacl) { use_large_empty_slot_span_ring = true @@ -9,6 +9,15 @@ declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, +@@ -290,7 +290,7 @@ declare_args() { + declare_args() { + # Shadow metadata is still under development and only supports Linux + # for now. +- enable_shadow_metadata = is_linux && has_64_bit_pointers ++ enable_shadow_metadata = !is_bsd && is_linux && has_64_bit_pointers + } + + declare_args() { @@ -433,7 +433,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. diff --git a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc index c2288de879d9..91cdff0393a4 100644 --- a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,4 +1,4 @@ ---- base/process/process_metrics_openbsd.cc.orig 2025-02-22 18:06:53 UTC +--- base/process/process_metrics_openbsd.cc.orig 2025-02-25 07:07:23 UTC +++ base/process/process_metrics_openbsd.cc @@ -6,73 +6,85 @@ @@ -122,7 +122,7 @@ struct vmtotal vmtotal; unsigned long mem_total, mem_free, mem_inactive; size_t len = sizeof(vmtotal); -@@ -85,9 +97,136 @@ size_t GetSystemCommitCharge() { +@@ -85,9 +97,115 @@ size_t GetSystemCommitCharge() { mem_free = vmtotal.t_free; mem_inactive = vmtotal.t_vm - vmtotal.t_avm; @@ -133,32 +133,11 @@ +} + +int ProcessMetrics::GetOpenFdCount() const { -+#if 0 -+ struct kinfo_file *files; -+ kvm_t *kd = NULL; -+ int total_count = 0; -+ char errbuf[_POSIX2_LINE_MAX]; -+ -+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) -+ goto out; -+ -+ if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, -+ sizeof(struct kinfo_file), &total_count)) == NULL) { -+ total_count = 0; -+ goto out; -+ } -+ -+ kvm_close(kd); -+ -+out: -+ return total_count; -+#endif -+ return getdtablecount(); ++ return (process_ == getpid()) ? getdtablecount() : -1; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); -+// return GetMaxFds(); +} + +bool ProcessMetrics::GetPageFaultCounts(PageFaultCounts* counts) const { diff --git a/www/iridium/pkg-plist b/www/iridium/pkg-plist index 00997bf65b92..e5e32c5c0ccd 100644 --- a/www/iridium/pkg-plist +++ b/www/iridium/pkg-plist @@ -130,6 +130,7 @@ bin/iridium %%DATADIR%%/resources/accessibility/reading_mode_gdocs_helper_manifest.json %%DATADIR%%/resources/inspector_overlay/inspector_overlay_resources.grd %%DATADIR%%/resources/inspector_overlay/main.js +%%DATADIR%%/resources/tts_engine/background.js %%DATADIR%%/snapshot_blob.bin %%NOT_AARCH64%%%%DATADIR%%/libvk_swiftshader.so %%NOT_AARCH64%%%%DATADIR%%/vk_swiftshader_icd.json diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 0de3aa8c8a91..bb88a4d7a7d3 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,5 +1,6 @@ PORTNAME= ungoogled-chromium PORTVERSION= 133.0.6943.126 +PORTREVISION= 1 PULSEMV= 16 PULSEV= ${PULSEMV}.1 UGVERSION= ${DISTVERSION}-1 diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 33cef46f8691..91036f44c2e3 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,4 +1,4 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-02-20 09:59:21 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-02-25 06:59:53 UTC +++ base/allocator/partition_allocator/partition_alloc.gni @@ -39,7 +39,7 @@ if (is_nacl) { use_large_empty_slot_span_ring = true @@ -9,6 +9,15 @@ declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, +@@ -287,7 +287,7 @@ declare_args() { + declare_args() { + # Shadow metadata is still under development and only supports Linux + # for now. +- enable_shadow_metadata = is_linux && has_64_bit_pointers ++ enable_shadow_metadata = !is_bsd && is_linux && has_64_bit_pointers + } + + declare_args() { @@ -430,7 +430,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc index 5409dfd8d8d8..d6bbb5163a77 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,4 +1,4 @@ ---- base/process/process_metrics_openbsd.cc.orig 2025-02-20 09:59:21 UTC +--- base/process/process_metrics_openbsd.cc.orig 2025-02-25 06:59:53 UTC +++ base/process/process_metrics_openbsd.cc @@ -6,73 +6,85 @@ @@ -122,7 +122,7 @@ struct vmtotal vmtotal; unsigned long mem_total, mem_free, mem_inactive; size_t len = sizeof(vmtotal); -@@ -85,9 +97,136 @@ size_t GetSystemCommitCharge() { +@@ -85,9 +97,115 @@ size_t GetSystemCommitCharge() { mem_free = vmtotal.t_free; mem_inactive = vmtotal.t_vm - vmtotal.t_avm; @@ -133,32 +133,11 @@ +} + +int ProcessMetrics::GetOpenFdCount() const { -+#if 0 -+ struct kinfo_file *files; -+ kvm_t *kd = NULL; -+ int total_count = 0; -+ char errbuf[_POSIX2_LINE_MAX]; -+ -+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) -+ goto out; -+ -+ if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, -+ sizeof(struct kinfo_file), &total_count)) == NULL) { -+ total_count = 0; -+ goto out; -+ } -+ -+ kvm_close(kd); -+ -+out: -+ return total_count; -+#endif -+ return getdtablecount(); ++ return (process_ == getpid()) ? getdtablecount() : -1; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); -+// return GetMaxFds(); +} + +bool ProcessMetrics::GetPageFaultCounts(PageFaultCounts* counts) const { diff --git a/www/ungoogled-chromium/pkg-plist b/www/ungoogled-chromium/pkg-plist index f776fe8af2e6..9838cdc5a58c 100644 --- a/www/ungoogled-chromium/pkg-plist +++ b/www/ungoogled-chromium/pkg-plist @@ -131,6 +131,7 @@ bin/ungoogled-chromium %%DATADIR%%/resources/accessibility/reading_mode_gdocs_helper_manifest.json %%DATADIR%%/resources/inspector_overlay/inspector_overlay_resources.grd %%DATADIR%%/resources/inspector_overlay/main.js +%%DATADIR%%/resources/tts_engine/background.js %%DATADIR%%/snapshot_blob.bin %%NOT_AARCH64%%%%DATADIR%%/libvk_swiftshader.so %%NOT_AARCH64%%%%DATADIR%%/vk_swiftshader_icd.jsonhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502250919.51P9Josx072837>
