Bug 318375 (MONO75387) - [PATCH] SIGRTMIN not always usable
Summary: [PATCH] SIGRTMIN not always usable
Status: RESOLVED FIXED
Alias: MONO75387
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.1
Hardware: Other SLES 8
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-27 12:34 UTC by Robert Jordan
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
sigrtmin.diff (360 bytes, patch)
2005-06-27 12:36 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:23:15 UTC


---- Reported by robertj@gmx.net 2005-06-27 05:34:46 MST ----

Some older SUSE distros (7.x, 8.x SLES 7 and 8) have been
shipped with a buggy LIBC which consumes SIGRTMIN itself
leading to crash when libmono.so is loaded, for example
when --with-static_mono=no is applied or when libmono.so is
consumed by third party programs.

About the LIBC bug:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=53394

The patch presets mono_thread_get_abort_signal to return
SIGRTMIN+3. This signal is supposed to be available on
all systems that support SIGRTMIN, because POSIX requires
at least 8 signals.



---- Additional Comments From robertj@gmx.net 2005-06-27 05:36:09 MST ----

Created an attachment (id=168184)
sigrtmin.diff




---- Additional Comments From miguel@ximian.com 2005-06-29 19:45:45 MST ----

I would rather have some way of testing for this than mkaing the
change on every distribution.  

This patch only turns the problem into a potentially different problem.

What we probably need to have is a way of "probing" if these signals
are being used, something like this:

handler = -1;
for (int i = SIGRTMIN; i < SIGRTMAX; i++){
    sigaction (i, NULL, &old);
    if (old.sa_handler == NOT_SET){
       handler = i; break; 
    }
}

Now, the above only works if signals have been preset before Mono has
been invoked.  Am not sure if there is a reliable way of coping with
this problem 



---- Additional Comments From lupus@ximian.com 2005-07-07 14:17:04 MST ----

Fixed in svn: we avoid SIGRTMIN and select a free signal if available.

Imported an attachment (id=168184)