Menu

#2 remote filters cause segfault

open
nobody
None
5
2006-09-20
2006-09-20
No

The CosNotification spec allows for 'remote filters'
(for want of a better term). In section "3.2.1 The
Filter Interface" of the CosNotification spec (v1.1),
the following statement appears:

"""
Every conformant implementation of this service must
support constraint expressions expressed in the default
constraint grammar described in ?The Default Filter
Constraint Language? on page 2-26. In addition,
implementations may support other constraint grammars,
and/or users of this service may implement their own
filter objects, which allow constraints to be expressed
in terms of an alternative constraint grammar. As long
as such user-defined filter objects support the Filter
interface, they can be attached to Proxy or Admin
objects in the same fashion as the default Filter
objects supported by the implementation of the service
are, and the channel should be able to use them to
filter events in the same fashion.
"""

While the text says "should" rather than "must", the
intent seems to be that Filters other than those
created by the internal FilterFactory should work.

When I tried this, omniNotify segfaulted inside
attach_callbacks(). Steps: created a Filter object in
a Java client, activated that Filter on a POA, called
add_filter() on the default ConsumerAdmin passing-in a
reference to my Filter object.

The error was in FAdminHelper::add_filter_i(). On the
line:
entry.callback_id = fltr->attach_callback_i(held,
filter_holder, need_schange);

The value for fltr is NULL, since the remote filter
could not be found in
Filter_i::Filter2Filter_i(new_filter);

This NULL should be caught by the intervening:
RDI_Assert(fltr, "Filter was not created by READY\n");
but unless debugging is turned-on, is the RDI_Assert
skipped?

The code that calls match_structured() et al in the
Proxy and Consumer objects has already been written
properly, to call a local Filter_i if possible, or to
do a remote CORBA call if the filter is not local. It
is only the FilterAdmin code that seems to have a
problem using the remote filters.

I have made the changes to FilterAdmin, and tested them
(only tested match_structured()), and will check them
in, if the changes are approved.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB