Dne 18.4.2012 03:44, KOSAKI Motohiro napsal(a):
>> I have a question. Can we detect abrt enableness on runtime?
> I am not sure what is the best way how to detect ABRT enableness, but I can
> clarify it with upstream. Actually such checking is not required I would
> say, because:
>
> 1) If ABRT is not enabled, the gem cannot send the report via socket. Only
> record into /var/log/messages is made.
> 2) I would like to see Ruby in Fedora automatically to try to require
> abrt.rb and fail silently if the gem is not installed.
Hmm.. this is not an item I wanted. when abrt is disabled, ruby shouldn't
run any additional code.
Hmm, there might be some additional code on startup checking if ABRT is
enabled and install the at_exit handler only if it is. However there are
two issues to consider:
1) There will be probably some slowdown to Ruby startup time, which may
penalize especially short scripts, but this might be unnoticeable.
2) What if the Ruby process is some long running service and ABRT is
started/installed later? But this looks a bit silly :)
any new code path might make application
deadlock.
Yes, that is true that this handler might get things worse, but it is
aimed to handle problems in your Ruby code, such as if you change some
functionality, but not adjust the rest of the application. So it is not
designed to check some errors in C code or extensions. However I really
should check, if for example SEGV in nokogiri is caught by ABRT.
for clarify, the worst scenario is, ruby or ruby extention
made
memory corruption and libc internal function made SEGV and then libc
lock (libc internal mutex) was not released. any libc call may makes
deadlock. and if ruby don't exit, abrt can't record correct
information and
more importantly, crash watching daemon can't know ruby stop to
working and then fail to restart it.
Hm, this is probably far beyond ABRT capabilities and design. Do you
believe that such problem is somehow detectable?
>> I mean, I want to integrate it to upstream. Ruby already has
>> similar support code for Mac.
> Could you please elaborate what Mac support Ruby already has?
Ruby didn't need any additional code for Mac. Its abrt like crash logger
automatically save a crash information. we only remove redundunt code.
What I need to get this working is some thing like automatic inclusion
of os_prelude.rb during build time if that is available in build
directory, or alternatively some configuration option to achieve the
same, i.e. to require some .rb file which is somewhere available and
treat it as a prelude file. Of course I can patch the Ruby build to
include some os_prelude.rb, but I'd like to see this supported by upstream.
>> but I also want to fallback original behavior when a user disable abrt
>> service.
>>
> The original behavior is always preserved (assuming that there is no bug in
> the ABRT gem :)), i.e. the exception is written to terminal for example. The
> report to ABRT is just extension.
>
>
> With regards to SEGV, I believe that they are caught by ABRT anyway, since
> Ruby itself is C, so they should be handled by ABRT C hook. Or are you aware
> of some specific example which does not work that way?
>
>
> Vit
>
>
>
> _______________________________________________
> ruby-sig mailing list
> ruby-sig(a)lists.fedoraproject.org
>
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
_______________________________________________
ruby-sig mailing list
ruby-sig(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig