[erlang-bugs] bug at alarm_handler or at documentation

Siri Hansen erlangsiri@REDACTED
Tue Jul 1 15:06:09 CEST 2014


Given the fact that the alarm_handler has not been touched since R13B03
(i.e. as far back as the git history goes) and probably far beyond that, I
do not believe that it has been very much used. We are quite settled on
spending as little time as possible on this - especially since the default
handler is really too simple for production use anyway and, as stated
earlier in this thread, the user is encouraged to install an own handler to
do the job. So we will take the simplest way out and fix the documentation.

Thanks for reporting the problem.

Regards
/siri




2014-07-01 3:45 GMT+02:00 Anders Nygren <anders.nygren@REDACTED>:

> You shouldn't raise the same alarm several times. Once it is raised the
> alarm state exists until You clear it. In my opinion the bug is that
> several copies of the alarm is saved, not that they are not all cleared.
>
> I think that the default alarm handler should be considered as just a
> primitive example. The documentation says
> "One simple event handler is installed in the alarm handler at start-up,
> but users are encouraged to write and install their own handlers."
>
>
>
> On Mon, Jun 30, 2014 at 6:26 PM, Anthony Ramine <n.oxyde@REDACTED> wrote:
>
>> I would say the bug is in the code, if I had 10 alarms for low memory
>> during the night, I would like to clear them all at once once I fixed the
>> problem.
>>
>> What does the OTP team say?
>>
>> --
>> Anthony Ramine
>>
>> Le 25 juin 2014 à 10:47, Dmitry Kolesnikov <dmkolesnikov@REDACTED> a
>> écrit :
>>
>> > Hello,
>> >
>> > The alarm_handler documentation says:
>> > http://www.erlang.org/doc/man/alarm_handler.html
>> >
>> > — CLIP —
>> > clear_alarm(AlarmId) -> void()
>> >
>> > Clears all alarms with id AlarmId.
>> > — CLIP —
>> >
>> > but code does not clears all alarms, it clears the last one
>> >
>> >
>> https://github.com/erlang/otp/blob/maint/lib/sasl/src/alarm_handler.erl#L83
>> >
>> > — CLIP —
>> > {ok, lists:keydelete(AlarmId, 1, Alarms)};
>> > — CLIP —
>> >
>> > I can patch alarm_handler if needed but I think the bug in
>> documentation?
>> >
>> > Best Regards,
>> > Dmitry
>> > _______________________________________________
>> > erlang-bugs mailing list
>> > erlang-bugs@REDACTED
>> > http://erlang.org/mailman/listinfo/erlang-bugs
>>
>> _______________________________________________
>> erlang-bugs mailing list
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>>
>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140701/0ad7a71b/attachment.htm>


More information about the erlang-bugs mailing list