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
Issues with signal(SIGUSR1) #1888
Comments
|
Good correction from lizmat++, the code to reproduce the problem only works on systems where SIGUSR1 is 10. You can replace 10 with the appropriate value, or send a signal using other means. The problem is that |
|
Interestingly, the workaround is to use As far as I can see, we'll have to wait for 2018.06 release. Meanwhile I had to do this in whateverable. Please let me know what you think. |
|
Unfortunately this is due to the signal changes I introduced. MoarVM used to translate the signums prior to installing the sighandler so if the user entered SIGUSR1 (30) from Rakudo, it would be translated to 10 internally. The getsignals PR changed that with the expectation that the Rakudo values would match the host system after the Rakudo getsignals PR was merged. Unfortunately there was a fairly large difference in when the MoarVM PR got merged in to when the NQP and Rakudo PRs got merged. I really should have better communicated the potential issues that could occur if one part was merged without the others, but I didn't. In fact, I had forgotten it myself, thinking instead that it was a benign change and that the op would just go unused until the others got merged. That was incorrect and I'm not sure why I didn't remember the potential for harm. As a result, I didn't push very hard for the NQP and Rakudo components to get merged in. @AlexDaniel, as you mentioned, this should not be affecting MacOSX and BSD systems as their signal values match the constant values set in Rakudo pre-getsignals merge. Also, even on GNU/Linux, signals with explicit values in the POSIX spec also match (SIGINT, SIGQUIT, SIGKILL, SIGSEGV, etc). I suppose that it would be a good idea to introduce patch releases for 2018.04 and 2018.05, although I don't know how much trouble that would be from the packaging and distrobution side. The NQP and Rakudo PRs merge cleanly onto the 2018.04.1 and 2018.05. I don't know why the output of pre-2018.04 and HEAD differ. I can look into that more later today. |
Yeah, it's probably better to figure this out before we commit to anything. But either way I can't really tell if point releases are justified. Only some signals are broken, and only on some platforms. That's very unfortunate but yet I'm the only person so far who noticed, I think. Also, signal values were originally broken until very recently, and it is somewhat luck that signal handlers were not affected. Ping @nxadm @stmuk @robertlemmen, let me know what you think. I can cut point releases no problem, if that is really needed. |
|
Thx @AlexDaniel for being consulted. With the monthly Rakudo release schedule in mind, I don't see the point for dot releases for older Rakudos. You just move to the fixed release if necessary (or automatically if you're using my repos). I do find dot releases useful, however, for the last released Rakudo. It usefulness depends on the severity of the newly introduced bug and the time until the next release. Depending on real life scenarios of people being bitten with this bug, a dot 2015.05.2 release may be useful if the needed fix does not take the amount of time that will result in a release just a few days before the scheduled release. C. PS: Linux distributions that package rakudo may backport the changes, but that is an other use-case than rakudo-pkg that focuses on being up-to-date with the last release. |
On the recent modification of the signal sub, there was a subtle change to the form of the signum emitted by the signal handler. Pre-change it emitted the signum in the form of the corresponding Signal enum and post-change it emits the signum as an Int. Changing it so that it will one again emit the Signal enum as it is more useful in varying contexts. AlexDaniel++ for discovering this. See [Github Issue 1888](rakudo#1888).
|
I've submitted a PR that addresses the difference in output between pre-2018.04 and HEAD. Pre-2018.04 was emitting the Signal enumeration while afterwards was just emitting the signum as an Int. |
|
I pretty much agree with @nxadm and @AlexDaniel Given limited resources, the minor nature of this particular bug and a work around I don't think it matters too much. Maybe a low severity https://alerts.perl6.org/ might be worth it? |
Code:
Output «2015.12⌁2018.03»:
Result «2018.04.1,2018.05»:
Output HEAD(4109ce3):
Basically, from 2015.12 to 2018.03 it was able to handle signals correctly. Then in 2018.04 and 2018.05 it was completely broken (wasn't catching the signal at all). Currently on HEAD it works again, but the returned value from the supply is now numeric. I don't know if it should be this way.
There are two reasons for this ticket:
The text was updated successfully, but these errors were encountered: