Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal Fixes #7595

Conversation

rickard-green
Copy link
Contributor

Three signal handling fixes:

  • OTP-18647 - A process optimized for parallel signal delivery could under some circumstances lose wakeup information. That is, the processes was not woken up to take care of the signal, so the signal would not be taken care of until the process was woken by another signal. Only processes configured with message_queue_data set to off_heap utilize this optimization.
  • OTP-18706 - Delivery time of message signals to a process not executing any receive expressions could become very long, potentially infinite. For example, a process checking for messages using process_info(self(), message_queue_len) or process_info(self(), messages) and avoiding to execute a receive expression matching on messages could be very slow in detecting new messages. Note that you are still discouraged from using process_info() this way. A process that wants to check if there are messages available to handle should execute a receive expression matching on messages.
  • OTP-18737 - A constant flow of incoming non-message signals could prevent a process needing to execute dirty from doing so.

@rickard-green rickard-green added team:VM Assigned to OTP team VM fix labels Aug 27, 2023
@rickard-green rickard-green self-assigned this Aug 27, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 27, 2023

CT Test Results

       4 files     194 suites   1h 47m 1s ⏱️
2 942 tests 2 647 ✔️ 295 💤 0
3 649 runs  3 285 ✔️ 364 💤 0

Results for commit 97f1928.

♻️ This comment has been updated with latest results.

When the receiving process did not attempt to receive messages
(by executing a receive expression matching on messages), message
delivery could potentially take an infinite time.
@rickard-green rickard-green force-pushed the rickard/signal-fixes/OTP-18647/OTP-18706/OTP-18737 branch from 16b933d to 5be2260 Compare August 27, 2023 22:46
@rickard-green rickard-green force-pushed the rickard/signal-fixes/OTP-18647/OTP-18706/OTP-18737 branch from 5be2260 to 97f1928 Compare September 7, 2023 11:32
@rickard-green rickard-green merged commit 291f3ed into erlang:maint Sep 7, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

process_info/2 returns empty messages list
1 participant