gst-instruments icon indicating copy to clipboard operation
gst-instruments copied to clipboard

Error: <stdin>: syntax error in line 1 near '('

Open rotemb-hailo opened this issue 3 years ago • 9 comments

This is my pipeline:

 PIPELINE="GST_DEBUG_FILE=output.log GST_DEBUG_NO_COLOR=1 \
     LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgstintercept.so GST_DEBUG_DUMP_TRACE_DIR=. \
     gst-launch-1.0 --gst-debug-level=3 \
     filesrc location=detection.mp4 ! decodebin ! videoconvert ! \
     xvimagesink sync=true"
 
 eval $PIPELINE

I'm using Ubuntu18.04 and GStreamer 1.14

pipeline0.gsttrace.log

This is the gsttrace file (added log suffix because Github doesn't allow it otherwise).

Am I missing something?

rotemb-hailo avatar Aug 15 '21 10:08 rotemb-hailo

@kirushyk, @rotemb-hailo I can confirm that there's problem with --dot option in the case of this pipeline. I run the same generation on Ubuntu 20.04, Gstreamer 1.16. Other options work correctly, for example:

$ gst-report-1.0 --memory --types pipeline0.gsttrace 
ELEMENT        TYPE               %CPU   %TIME   TIME     INPUT     OUTPUT
avdec_h264-0   avdec_h264           5.4   81.1    164 ms  4.11 MiB   103 MiB
capsfilter0    GstCapsFilter        0.4    6.0   12.1 ms  4.11 MiB  4.11 MiB
xvimagesink0   GstXvImageSink       0.2    3.2   6.54 ms   103 MiB       0 B
h264parse0     GstH264Parse         0.2    3.0   6.04 ms  4.11 MiB  4.11 MiB
qtdemux0       GstQTDemux           0.2    2.8   5.63 ms  4.11 MiB  4.11 MiB
filesrc0       GstFileSrc           0.1    1.8   3.59 ms       0 B  4.11 MiB
multiqueue0    GstMultiQueue        0.1    0.9   1.90 ms  4.11 MiB  4.11 MiB
videoconvert0  GstVideoConvert      0.1    0.9   1.88 ms   103 MiB   103 MiB
typefind       GstTypeFindElement   0.0    0.3    582 us  4.11 MiB  4.11 MiB
decodebin0     GstDecodeBin         0.0    0.0      0 ns       0 B       0 B
pipeline0      ?                    0.0    0.0      0 ns       0 B       0 B

Interestingly, --dot option generates some kind of incomplete svg file, starting with:

digraph cluster_eg0x5585f5092180 {
 rankdir=LR;
 labelloc=t;
 nodesep=.1;
 ranksep=.1;
 fontsize="14";
 style="filled,rounded";
 color=black;
 label="pipeline0";
 node [style="filled", shape=box, fontsize="14", margin="0.1,0.1"];
 edge [labelfontsize="14", fontsize="14"];
 fillcolor="#ffffff";
 label=<<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD COLSPAN="2" ALIGN="RIGHT">?</TD></TR><TR><TD COLSPAN="2" ALIGN="RIGHT">pipeline0</TD></TR><TR><TD ALIGN="RIGHT">Time:</TD><TD ALIGN="RIGHT">0 ns</TD></TR><TR><TD ALIGN="RIGHT"></TD><TD ALIGN="RIGHT">(  0.0%)</TD></TR><TR><TD ALIGN="RIGHT">CPU:</TD><TD ALIGN="RIGHT">  0.0%</TD></TR></TABLE>>;

Attached is the whole file: pipeline.svg.log

please remove .log ext.

zdanek avatar Jan 06 '23 17:01 zdanek

Looks like .dot file, not .svg. To convert to .svg, try this:

mv pipeline.svg.log pipeline.dot
dot pipeline.dot -Tsvg > pipeline.svg

kirushyk avatar Jan 06 '23 19:01 kirushyk

Can confirm the erronous behaviour. Root cause is a generated .dot file starting with digraph cluster_eg(nil) { rankdir=LR; labelloc=t; nodesep=.1; ranksep=.1; where the "(nil)" is clearly not conforming to .dot syntax, see https://graphviz.org/doc/info/lang.html

It happened for me in a longer pipeline using 3rd party AI elements, but also when I call # gst-report-1.0 --dot pipeline0.gsttrace > pipeline0.dot on the OP's .gsttrace from above.

The behaviour is totally unrelated to the svg/dot mixup described above.

FrankBau avatar Oct 21 '23 19:10 FrankBau

Can you send me that pipeline0.gsttrace?

kirushyk avatar Oct 23 '23 10:10 kirushyk

The trace is large, here is a link:

https://1drv.ms/f/s!AkaYrLPR0ekIrIcz0aQ-9ar1BO3bUw?e=VvgOxQ

The trace was generated on an i.MX8MP embedded system with a yocto-built linux using the head revision cb8977a67 of gst-instruments. It seems that element->identifier is NULL in gst-report.c where %p prints out as (nil). The pipeline is

gst-launch-1.0 -e filesrc location=${PATHNAME} ! decodebin ! tee name=t ! queue ! hailomuxer name=mux \
    t. ! videoconvert ! videoscale ! queue \
    ! hailonet \
    ! queue \
    ! hailofilter \
    ! hailotracker keep-tracked-frames=5 ! queue ! mux. \
    mux. ! queue ! videoconvert ! tee name=tea \
    ! carrillo \
    ! queue ! vpuenc_h264 qp-max=23 ! h264parse ! mp4mux ! filesink location=${FILENAME}_enc.mp4 \
    tea. ! hailoexportfile location=${FILENAME}.json

using hailo AI accelerator and a custom element carrillo.

The same result occurs when I feed the OP's pipeline pipeline0.gsttrace.log to the tools:

$ gst-report-1.0 pipeline0.gsttrace --dot | head
digraph cluster_eg(nil) {
 rankdir=LR;
 labelloc=t;
 nodesep=.1;
...

That one is smaller and probably easier to reproduce.

FrankBau avatar Oct 23 '23 17:10 FrankBau

Inspecting this...

kirushyk avatar Oct 23 '23 19:10 kirushyk