[ZBX-22368] Change sigprocmask in multi-threaded processes to pthread_sigmask to avoid undefined behaviour Created: 2023 Feb 16  Updated: 2024 Apr 10  Resolved: 2023 Feb 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 6.4.0rc1
Fix Version/s: 6.4.0rc3, 6.4 (plan)

Type: Problem report Priority: Trivial
Reporter: Vladislavs Sokurenko Assignee: Andris Zeila
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team A
Sprint: Sprint 97 (Feb 2023)
Story Points: 1

 Description   

"Note that you must not use sigprocmask in multi-threaded processes, because each thread has its own signal mask and there is no single process signal mask. According to POSIX, the behavior of sigprocmask in a multi-threaded process is “unspecified”. Instead, use pthread_sigmask."
https://www.gnu.org/software/libc/manual/html_node/Process-Signal-Mask.html

Currently server cannot be stopped on Mac OS, manager no longer receives signal due to usage of sigprocmask in startup logs.



 Comments   
Comment by Andris Zeila [ 2023 Feb 24 ]

Released ZBX-22368 in:

  • pre-6.4.0rc2 82fede1930c
Generated at Thu Apr 03 02:08:38 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.