Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
0295-erts-Fix-no-locking-in-erts_schedulers_sta...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0295-erts-Fix-no-locking-in-erts_schedulers_state-during-.patch of Package erlang
From 2a141570b98b1aacf21c649e92abe2ea5efb98d6 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson <sverker@erlang.org> Date: Tue, 18 Jun 2024 14:29:46 +0200 Subject: [PATCH 1/2] erts: Fix no locking in erts_schedulers_state() during crash dump --- erts/emulator/beam/erl_process.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index c2ca5a03f3..4c7546fbc5 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -8007,7 +8007,10 @@ erts_schedulers_state(Uint *total, { if (active || online || dirty_cpu_online || dirty_cpu_active || dirty_io_active) { - erts_mtx_lock(&schdlr_sspnd.mtx); + const int lock = !ERTS_IS_CRASH_DUMPING; + if (lock) { + erts_mtx_lock(&schdlr_sspnd.mtx); + } if (active) *active = schdlr_sspnd_get_nscheds(&schdlr_sspnd.active, ERTS_SCHED_NORMAL); @@ -8023,7 +8026,9 @@ erts_schedulers_state(Uint *total, if (dirty_io_active) *dirty_io_active = schdlr_sspnd_get_nscheds(&schdlr_sspnd.active, ERTS_SCHED_DIRTY_IO); - erts_mtx_unlock(&schdlr_sspnd.mtx); + if (lock) { + erts_mtx_unlock(&schdlr_sspnd.mtx); + } } if (total) -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor