Fix: lib: usage of output port message iterator
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 13 May 2019 18:01:22 +0000 (14:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commitddcfe1546e120c8250c327c7beb62eceeebc8e29
tree892a558af5802669d677b6bd05b1f236dee90260
parent52c65bda7458e563a8c9f09da597569845d8f974
Fix: lib: usage of output port message iterator

Fix some issues relate to output port message iterator usage.

The first encountered issue when trying to create one such iterator is:

    05-13 13:51:20.845 14995 14995 F MSG-ITER bt_self_component_port_input_message_iterator_create@iterator.c:444 Graph is not configured: addr=0x612000000640, is-canceled=0, can-consume=0, config-state=BT_GRAPH_CONFIGURATION_STATE_CONFIGURING, comp-count=2, conn-count=1, en-pool-size=0, en-pool-cap=0, pbn-pool-size=0, pbn-pool-cap=0, pen-pool-size=0, pen-pool-cap=0

The problem is that the colander is trying to create an input iterator on its
input port in the "port connected" callback, which is before the graph is
configured.  This is not a valid thing to do anymore, so change it to create
the input iterator during the "graph is configured" step.

The next issue we face is then:

    05-13 14:00:01.903 21344 21344 W COLANDER colander_consume@component-class-sink-colander.c:142 Trying to consume without an upstream message iterator: comp-addr=0x60c0000028c0, c
omp-name="colander-36ac3409-b1a8-4d60-ab1f-4fdf341a8fb1", comp-class-type=BT_COMPONENT_CLASS_TYPE_SINK, comp-class-name="colander", comp-class-partial-descr="", comp-class-is-frozen=1, comp-input-port-count=1, comp-output-port-count=0

This is because the "graph is configured" callback is never invoked,
the reason being that bt_port_output_message_iterator_create just sets
the graph's config state field directly, rather than calling
bt_graph_configure.

Change-Id: Idbf873912ea5d116f0b011639177e57aa78e6759
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1297
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
lib/graph/component-class-sink-colander.c
lib/graph/iterator.c
This page took 0.02514 seconds and 4 git commands to generate.