Debugging multithreaded driver


Hi,

I'm trying to follow a driver's trace but much too often an event on
the
other channel arrives and the trace gets messy and starts jumping back
and forth, rendering the trace completely unreadable.

My example is going through a heavy user add operation while a modify
user flows from the connected system. The trace goes back and forth
between the events and it's hard to tell apart query results and the
modify event.

Is there any way to automatically tell when it's hopping from one event
to the other?
Should I perhaps limit the driver to 1 thread anyways? Is that even
possible?
I thought about using the event-id but from what I've read so far it
doesn't look
too consistent and is more a "best effort" type.

Thanks!


--
YLivay
------------------------------------------------------------------------
YLivay's Profile: https://forums.netiq.com/member.php?userid=5678
View this thread: https://forums.netiq.com/showthread.php?t=48480

Parents
  • On 26.08.2013 10:54, YLivay wrote:
    >
    > I'm trying to follow a driver's trace but much too often an event on
    > the
    > other channel arrives and the trace gets messy and starts jumping back
    > and forth, rendering the trace completely unreadable.
    >
    > My example is going through a heavy user add operation while a modify
    > user flows from the connected system. The trace goes back and forth
    > between the events and it's hard to tell apart query results and the
    > modify event.


    It can be very difficult to read a trace from a busy driver, I
    understand your problem and have experienced it myself.

    > Is there any way to automatically tell when it's hopping from one event
    > to the other?
    > Should I perhaps limit the driver to 1 thread anyways? Is that even
    > possible?


    Each channel is independently threaded. So you can't really limit the
    driver to 1 thread total. You will always have two channels.

    > I thought about using the event-id but from what I've read so far it
    > doesn't look
    > too consistent and is more a "best effort" type.


    The event id is useful for tracking an event in a trace.

    It was my understanding that the IDM engine will try and assign an
    event-id that includes the driver which originated the change (but only
    if that driver is part of the same driverset). Otherwise, it simply
    indicates the server which originated the change.

    Regardless, the event-id plus the channel indicator should be enough to
    get you by.

    Colour coding the channels can also help. I use baretail to view my log
    files on windows with custom colour/highlighting rules to help make it
    easier to distinguish each channel.

    --
    ----------------------------------------------------------------------
    Alex McHugh
    NetIQ Knowledge Partner http://forums.netiq.com

    Please post questions in the forums. No support is provided via email.

  • Problem with ID is that it is visible only in the event nds and not in
    the actual trace lines,
    so till you reach the end of a policy you can't be sure what event
    you're tracing.

    Isn't there a utility to help read logs and not only display them?


    --
    YLivay
    ------------------------------------------------------------------------
    YLivay's Profile: https://forums.netiq.com/member.php?userid=5678
    View this thread: https://forums.netiq.com/showthread.php?t=48480

  • YLivay wrote:

    > Isn't there a utility to help read logs and not only display them?


    Apart from the situation you just experience here, traces are really well
    readable and you do not need any tool to do it.

    Would indeed be *very* helpful if it was possible to have subscriber an
    publisher write to separate log files. You could enter an enhancement request
    for it, should'nt be too hard to implement: try http://www.novell.com/rms
  • On 26.08.2013 12:44, YLivay wrote:
    >
    > Problem with ID is that it is visible only in the event nds and not in
    > the actual trace lines,
    > so till you reach the end of a policy you can't be sure what event
    > you're tracing.


    You can infer this, by looking at the channel.

    There aren't multiple *active* threads within a channel, so the trace
    will clearly indicate if it starts processing a new event.

    When a policy requires a new thread (for example a query, or a direct
    write) the context of the existing thread is saved and the thread is paused.

    Then the new thread is processed and once it completes, control is
    returned to the original thread.

    Take a look at:

    https://www.netiq.com/communities/coolsolutions/comprehending-idm-traces-part-1/

    and

    https://www.netiq.com/communities/coolsolutions/comprehending-idm-traces-part-2/

    for more details.

    > Isn't there a utility to help read logs and not only display them?


    My ex-colleague once talked about writing such a util, I don't believe
    he ever got beyond a prototype.


    --
    ----------------------------------------------------------------------
    Alex McHugh
    NetIQ Knowledge Partner http://forums.netiq.com

    Please post questions in the forums. No support is provided via email.

  • If you separate the subscriber and publisher, wouldn't
    tracing queries and direct commands become a pain?

    For example shouldn't a result for a query sent by the subscriber
    channel
    to the connected application return through the publisher channel as it
    needs to go through the schema mapping, input policies etc?
    (Not too familiar with IDM, didn't get to test that yet)


    --
    YLivay
    ------------------------------------------------------------------------
    YLivay's Profile: https://forums.netiq.com/member.php?userid=5678
    View this thread: https://forums.netiq.com/showthread.php?t=48480

  • On 26.08.2013 14:14, YLivay wrote:
    >
    > If you separate the subscriber and publisher, wouldn't
    > tracing queries and direct commands become a pain?
    >
    > For example shouldn't a result for a query sent by the subscriber
    > channel
    > to the connected application return through the publisher channel as it
    > needs to go through the schema mapping, input policies etc?
    > (Not too familiar with IDM, didn't get to test that yet)


    Schema mapping, input and output policies are not considered to be
    exclusively part of either the publisher or subscriber channel.

    An event from either channel will normally go through all three of the
    components listed above.

    I can see there could be advantages to the separate subscriber and
    publisher channels. Not sure if it'd be worth the engine, designer

  • Oh, right - completely forgot about that.

    And a simple GCV will do. After thinking about it,
    there really is no sense putting two thread outputs in the same log
    file.


    --
    YLivay
    ------------------------------------------------------------------------
    YLivay's Profile: https://forums.netiq.com/member.php?userid=5678
    View this thread: https://forums.netiq.com/showthread.php?t=48480


  • > for more details.
    >
    >> Isn't there a utility to help read logs and not only display them?

    >
    > My ex-colleague once talked about writing such a util, I don't believe
    > he ever got beyond a prototype.


    Hey! So did mine! And got about as far!


  • > I can see there could be advantages to the separate subscriber and
    > publisher channels. Not sure if it'd be worth the engine, designer
Reply Children
No Data