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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit36d1acad60fd6c9cfb933f3f2fbc039443d47115
tree76a7978977c716c7329ffc84759ad05f840d028b
parent65531d5502d759226b18a2974dd77c78d58ab4dc
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.026687 seconds and 4 git commands to generate.