gstreamer stalling?

Hi, I'm having a problem while running an RTSP videoSource from the dev branch (the one that allows for authenticated uris). It happens from time to time (maybe 1/3 of the runs) ... the thing is that the videoSource.Capture() method kinda stalls, waiting for some condition on the gstreamer pipeline to finish, and while it cant resolve what's going on in the pipeline, it would appear as if it didn't return ...
This is part of the gstreamer output that I see while this condition is active ... and while this happens my program basically hangs waiting for something that apparently never happens ...
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> videorate3
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter18
[gstreamer] gstreamer changed state from NULL to READY ==> nvvconv3
[gstreamer] gstreamer changed state from NULL to READY ==> omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse18
[gstreamer] gstreamer changed state from NULL to READY ==> rtph264depay18
[gstreamer] gstreamer changed state from NULL to READY ==> queue8
[gstreamer] gstreamer changed state from NULL to READY ==> rtspsrc8
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline8
[gstreamer] gstreamer changed state from READY to PAUSED ==> videorate3
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter18
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvvconv3
[gstreamer] gstreamer changed state from READY to PAUSED ==> omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse18
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtph264depay18
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtspsrc8
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline8
[gstreamer] gstreamer message new-clock ==> pipeline8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videorate3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvvconv3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtph264depay18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560, bitrate=(uint)15395729;
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer rtspsrc8 ERROR Could not read from resource.
[gstreamer] gstreamer Debugging info: gstrtspsrc.c(5917): gst_rtsp_src_receive_response (): /GstPipeline:pipeline8/GstRTSPSrc:rtspsrc8:
Could not receive message. (System error)
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20655400, bitrate=(uint)3813294;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800, bitrate=(uint)11630612;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20690000, bitrate=(uint)3869547;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2342200, maximum-bitrate=(uint)20690000, bitrate=(uint)3807197;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560, bitrate=(uint)15721958;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800, bitrate=(uint)11870816;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2336400, maximum-bitrate=(uint)20690000, bitrate=(uint)3815523;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690000, bitrate=(uint)3808952;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)884400, maximum-bitrate=(uint)33955800, bitrate=(uint)11931955;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)870800, maximum-bitrate=(uint)33955800, bitrate=(uint)11945827;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)749800, maximum-bitrate=(uint)33955800, bitrate=(uint)11903179;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)166000, maximum-bitrate=(uint)33955800, bitrate=(uint)11890159;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690600, bitrate=(uint)3813485;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20693000, bitrate=(uint)3813473;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2313800, maximum-bitrate=(uint)20693000, bitrate=(uint)3806887;
I've already learned to recognize this pattern as a "ok, ill have to kill it and run it again" ... it's like if gstreamer has some problem starting the pipeline ... but it doesnt give me the chance to reconnect or anything.
I can attach the whole session logs if you need them.
Thank you.

Sometimes with RTP / RTSP it can take some time to "connect" with the remote source over the network and actually start streaming.  In my experience up to 10 seconds or so.
If you just let it run, does it ever give you back a frame or not?

From: drakorg<EMAIL_ADDRESS>Sent: Saturday, July 11, 2020 3:10:54 AM
To: dusty-nv/jetson-utils<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [dusty-nv/jetson-utils] gstreamer stalling? (#30)
Hi, I'm having a problem while running an RTSP videoSource from the dev branch (the one that allows for authenticated uris). It happens from time to time (maybe 1/3 of the runs) ... the thing is that the videoSource.Capture() method kinda stalls, waiting for some condition on the gstreamer pipeline to finish, and while it cant resolve what's going on in the pipeline, it would appear as if it didn't return ...
This is part of the gstreamer output that I see while this condition is active ... and while this happens my program basically hangs waiting for something that apparently never happens ...
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> videorate3
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter18
[gstreamer] gstreamer changed state from NULL to READY ==> nvvconv3
[gstreamer] gstreamer changed state from NULL to READY ==> omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse18
[gstreamer] gstreamer changed state from NULL to READY ==> rtph264depay18
[gstreamer] gstreamer changed state from NULL to READY ==> queue8
[gstreamer] gstreamer changed state from NULL to READY ==> rtspsrc8
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline8
[gstreamer] gstreamer changed state from READY to PAUSED ==> videorate3
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter18
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvvconv3
[gstreamer] gstreamer changed state from READY to PAUSED ==> omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse18
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtph264depay18
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtspsrc8
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline8
[gstreamer] gstreamer message new-clock ==> pipeline8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videorate3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvvconv3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtph264depay18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560, bitrate=(uint)15395729;
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer rtspsrc8 ERROR Could not read from resource.
[gstreamer] gstreamer Debugging info: gstrtspsrc.c(5917): gst_rtsp_src_receive_response (): /GstPipeline:pipeline8/GstRTSPSrc:rtspsrc8:
Could not receive message. (System error)
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20655400, bitrate=(uint)3813294;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800, bitrate=(uint)11630612;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20690000, bitrate=(uint)3869547;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2342200, maximum-bitrate=(uint)20690000, bitrate=(uint)3807197;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560, bitrate=(uint)15721958;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800, bitrate=(uint)11870816;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2336400, maximum-bitrate=(uint)20690000, bitrate=(uint)3815523;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690000, bitrate=(uint)3808952;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)884400, maximum-bitrate=(uint)33955800, bitrate=(uint)11931955;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)870800, maximum-bitrate=(uint)33955800, bitrate=(uint)11945827;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)749800, maximum-bitrate=(uint)33955800, bitrate=(uint)11903179;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)166000, maximum-bitrate=(uint)33955800, bitrate=(uint)11890159;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690600, bitrate=(uint)3813485;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20693000, bitrate=(uint)3813473;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main\ Profile)", minimum-bitrate=(uint)2313800, maximum-bitrate=(uint)20693000, bitrate=(uint)3806887;
I've already learned to recognize this pattern as a "ok, ill have to kill it and run it again" ... it's like if gstreamer has some problem starting the pipeline ... but it doesnt give me the chance to reconnect or anything.
I can attach the whole session logs if you need them.
Thank you.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/jetson-utils/issues/30, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVEGK5755QCYPDDPPCW26TR3AF75ANCNFSM4OXFSMZA.

Hi, yes, I'm used to dealing with those kinds of delays, glitches,
disconnections or even periods of no communication. That's the reason the
fetch loop is always assuming that a problem can occur, and in that case it
can retry or even restart the channel. The problem with what I'm reporting
is that the call never returns, and I have nothing else to do but to kill
the application. When this happens the thread stalls and the only logging
that the application receives are a never ending sequence of this:
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690600,
bitrate=(uint)3813485;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3813473;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2313800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3806887;
If you need any more information please say and I'll try to prepare it.
Thank you.
On Sat, 11 Jul 2020 at 21:44, Dustin Franklin<EMAIL_ADDRESS>wrote:

Sometimes with RTP / RTSP it can take some time to "connect" with the
remote source over the network and actually start streaming. In my
experience up to 10 seconds or so.
If you just let it run, does it ever give you back a frame or not?

From: drakorg<EMAIL_ADDRESS>Sent: Saturday, July 11, 2020 3:10:54 AM
To: dusty-nv/jetson-utils<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [dusty-nv/jetson-utils] gstreamer stalling? (#30)
Hi, I'm having a problem while running an RTSP videoSource from the dev
branch (the one that allows for authenticated uris). It happens from time
to time (maybe 1/3 of the runs) ... the thing is that the
videoSource.Capture() method kinda stalls, waiting for some condition on
the gstreamer pipeline to finish, and while it cant resolve what's going on
in the pipeline, it would appear as if it didn't return ...
This is part of the gstreamer output that I see while this condition is
active ... and while this happens my program basically hangs waiting for
something that apparently never happens ...
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to
GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> videorate3
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter18
[gstreamer] gstreamer changed state from NULL to READY ==> nvvconv3
[gstreamer] gstreamer changed state from NULL to READY ==>
omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse18
[gstreamer] gstreamer changed state from NULL to READY ==> rtph264depay18
[gstreamer] gstreamer changed state from NULL to READY ==> queue8
[gstreamer] gstreamer changed state from NULL to READY ==> rtspsrc8
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline8
[gstreamer] gstreamer changed state from READY to PAUSED ==> videorate3
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter18
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvvconv3
[gstreamer] gstreamer changed state from READY to PAUSED ==>
omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse18
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtph264depay18
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtspsrc8
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline8
[gstreamer] gstreamer message new-clock ==> pipeline8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videorate3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvvconv3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==>
omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==>
rtph264depay18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560,
bitrate=(uint)15395729;
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer rtspsrc8 ERROR Could not read from resource.
[gstreamer] gstreamer Debugging info: gstrtspsrc.c(5917):
gst_rtsp_src_receive_response ():
/GstPipeline:pipeline8/GstRTSPSrc:rtspsrc8:
Could not receive message. (System error)
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20655400,
bitrate=(uint)3813294;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800,
bitrate=(uint)11630612;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20690000,
bitrate=(uint)3869547;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2342200, maximum-bitrate=(uint)20690000,
bitrate=(uint)3807197;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560,
bitrate=(uint)15721958;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800,
bitrate=(uint)11870816;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2336400, maximum-bitrate=(uint)20690000,
bitrate=(uint)3815523;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690000,
bitrate=(uint)3808952;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)884400, maximum-bitrate=(uint)33955800,
bitrate=(uint)11931955;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)870800, maximum-bitrate=(uint)33955800,
bitrate=(uint)11945827;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)749800, maximum-bitrate=(uint)33955800,
bitrate=(uint)11903179;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)166000, maximum-bitrate=(uint)33955800,
bitrate=(uint)11890159;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690600,
bitrate=(uint)3813485;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3813473;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2313800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3806887;
I've already learned to recognize this pattern as a "ok, ill have to kill
it and run it again" ... it's like if gstreamer has some problem starting
the pipeline ... but it doesnt give me the chance to reconnect or anything.
I can attach the whole session logs if you need them.
Thank you.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<
https://github.com/dusty-nv/jetson-utils/issues/30>, or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ADVEGK5755QCYPDDPPCW26TR3AF75ANCNFSM4OXFSMZA

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/dusty-nv/jetson-utils/issues/30#issuecomment-657155143,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACK2REYX5LLW6FT3RXEGNBTR3EBNVANCNFSM4OXFSMZA
.

Hmm I see this error in the log:
GstPipeline:pipeline8/GstRTSPSrc:rtspsrc8:
Could not receive message. (System error)
So when you call videoSource.Capture(), set timeout=1000, and it will return after one second.  src.Capture(timeout=1000)

From: drakorg<EMAIL_ADDRESS>Sent: Saturday, July 11, 2020 10:50:19 PM
To: dusty-nv/jetson-utils<EMAIL_ADDRESS>Cc: Dustin Franklin<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [dusty-nv/jetson-utils] gstreamer stalling? (#30)
Hi, yes, I'm used to dealing with those kinds of delays, glitches,
disconnections or even periods of no communication. That's the reason the
fetch loop is always assuming that a problem can occur, and in that case it
can retry or even restart the channel. The problem with what I'm reporting
is that the call never returns, and I have nothing else to do but to kill
the application. When this happens the thread stalls and the only logging
that the application receives are a never ending sequence of this:
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690600,
bitrate=(uint)3813485;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3813473;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2313800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3806887;
If you need any more information please say and I'll try to prepare it.
Thank you.
On Sat, 11 Jul 2020 at 21:44, Dustin Franklin<EMAIL_ADDRESS>wrote:

Sometimes with RTP / RTSP it can take some time to "connect" with the
remote source over the network and actually start streaming. In my
experience up to 10 seconds or so.
If you just let it run, does it ever give you back a frame or not?

From: drakorg<EMAIL_ADDRESS>Sent: Saturday, July 11, 2020 3:10:54 AM
To: dusty-nv/jetson-utils<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [dusty-nv/jetson-utils] gstreamer stalling? (#30)
Hi, I'm having a problem while running an RTSP videoSource from the dev
branch (the one that allows for authenticated uris). It happens from time
to time (maybe 1/3 of the runs) ... the thing is that the
videoSource.Capture() method kinda stalls, waiting for some condition on
the gstreamer pipeline to finish, and while it cant resolve what's going on
in the pipeline, it would appear as if it didn't return ...
This is part of the gstreamer output that I see while this condition is
active ... and while this happens my program basically hangs waiting for
something that apparently never happens ...
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to
GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> videorate3
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter18
[gstreamer] gstreamer changed state from NULL to READY ==> nvvconv3
[gstreamer] gstreamer changed state from NULL to READY ==>
omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse18
[gstreamer] gstreamer changed state from NULL to READY ==> rtph264depay18
[gstreamer] gstreamer changed state from NULL to READY ==> queue8
[gstreamer] gstreamer changed state from NULL to READY ==> rtspsrc8
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline8
[gstreamer] gstreamer changed state from READY to PAUSED ==> videorate3
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter18
[gstreamer] gstreamer changed state from READY to PAUSED ==> nvvconv3
[gstreamer] gstreamer changed state from READY to PAUSED ==>
omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse18
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtph264depay18
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtspsrc8
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline8
[gstreamer] gstreamer message new-clock ==> pipeline8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videorate3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> nvvconv3
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==>
omxh264dec-omxh264dec8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==>
rtph264depay18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560,
bitrate=(uint)15395729;
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer rtspsrc8 ERROR Could not read from resource.
[gstreamer] gstreamer Debugging info: gstrtspsrc.c(5917):
gst_rtsp_src_receive_response ():
/GstPipeline:pipeline8/GstRTSPSrc:rtspsrc8:
Could not receive message. (System error)
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer message progress ==> rtspsrc8
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20655400,
bitrate=(uint)3813294;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800,
bitrate=(uint)11630612;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2345800, maximum-bitrate=(uint)20690000,
bitrate=(uint)3869547;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2342200, maximum-bitrate=(uint)20690000,
bitrate=(uint)3807197;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)11583360, maximum-bitrate=(uint)32654560,
bitrate=(uint)15721958;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)7878000, maximum-bitrate=(uint)33955800,
bitrate=(uint)11870816;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2336400, maximum-bitrate=(uint)20690000,
bitrate=(uint)3815523;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690000,
bitrate=(uint)3808952;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)884400, maximum-bitrate=(uint)33955800,
bitrate=(uint)11931955;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)870800, maximum-bitrate=(uint)33955800,
bitrate=(uint)11945827;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)749800, maximum-bitrate=(uint)33955800,
bitrate=(uint)11903179;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)166000, maximum-bitrate=(uint)33955800,
bitrate=(uint)11890159;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20690600,
bitrate=(uint)3813485;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2326800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3813473;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ (Main
Profile)", minimum-bitrate=(uint)2313800, maximum-bitrate=(uint)20693000,
bitrate=(uint)3806887;
I've already learned to recognize this pattern as a "ok, ill have to kill
it and run it again" ... it's like if gstreamer has some problem starting
the pipeline ... but it doesnt give me the chance to reconnect or anything.
I can attach the whole session logs if you need them.
Thank you.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<
https://github.com/dusty-nv/jetson-utils/issues/30>, or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ADVEGK5755QCYPDDPPCW26TR3AF75ANCNFSM4OXFSMZA

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/dusty-nv/jetson-utils/issues/30#issuecomment-657155143,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACK2REYX5LLW6FT3RXEGNBTR3EBNVANCNFSM4OXFSMZA
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/jetson-utils/issues/30#issuecomment-657166087, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVEGK3JWXTC7QOF4EOR2RTR3EQGXANCNFSM4OXFSMZA.

Hi, thanks for the suggestion. However I get the following error when passing the timeout parameter to Capture().
 2020-07-12 12:31:55,461 [DEBUG] threadId=546567373296: about to Capture(timeout=1000) ..
 2020-07-12 12:31:55,463 [DEBUG] threadId=546567373296: Capture() finished ...
 2020-07-12 12:31:55,464 [WARNING] threadId=546567373296: jetson.utils -- videoSource.Capture() failed to parse args tuple

Just in case the snippet:
    def fetch_frame(self):
        timeout = 1000
        self.debug('about to Capture(timeout={}) ..'.format(timeout))
        try:
            cudaImage = self.stream.Capture(timeout = timeout)
        finally:
            self.debug('Capture() finished ...')

Sorry about that, it was a bug - just fixed it.  It is working here now.
Try pulling the latest on jetson-inference (git pull origin dev) and it should be working now.

Hi, the timeout works now, but the problem kinda remains.
I'm now able to reproduce it at least. Apparently the problem is not in the Capture() method, but in the Close() one.
I'm attaching the full log but the important lines are mostly the last ones, where Close() is called and it never comes back.
(nspi) drakorg@drakorg-desktop:~/workspace/nspi$ python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jetson.utils
>>> import sys
>>> vs =<EMAIL_ADDRESS>sys.argv + ['--headless=true'])
URI -- missing/invalid IP port from<EMAIL_ADDRESS>default to port 554
[gstreamer] gstDecoder -- creating decoder for admin
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
[gstreamer] gstDecoder -- discovered video resolution: 1920x1080  (framerate 25.000000 Hz)
[gstreamer] gstDecoder -- discovered video caps:  video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)4.2, profile=(string)main, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] rtspsrc<EMAIL_ADDRESS>! queue ! rtph264depay ! h264parse ! omxh264dec ! video/x-raw ! appsink name=mysink
[video]  created gstDecoder from<EMAIL_ADDRESS>------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI<EMAIL_ADDRESS>     - protocol:  rtsp
     - location:  admin
     - port:      554
  -- deviceType: ip
  -- ioType:     input
  -- codec:      h264
  -- width:      1920
  -- height:     1080
  -- frameRate:  25.000000
  -- bitRate:    0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
------------------------------------------------
>>> while True:
...     frame = vs.Capture(timeout = 1000)
...
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter2
[gstreamer] gstreamer changed state from NULL to READY ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse2
[gstreamer] gstreamer changed state from NULL to READY ==> rtph264depay2
[gstreamer] gstreamer changed state from NULL to READY ==> queue0
[gstreamer] gstreamer changed state from NULL to READY ==> rtspsrc0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter2
[gstreamer] gstreamer changed state from READY to PAUSED ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse2
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtph264depay2
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtspsrc0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer message new-clock ==> pipeline0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtph264depay2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtspsrc0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer changed state from NULL to READY ==> manager
[gstreamer] gstreamer changed state from READY to PAUSED ==> manager
[gstreamer] gstreamer changed state from NULL to READY ==> rtpssrcdemux5
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpssrcdemux5
[gstreamer] gstreamer changed state from NULL to READY ==> rtpsession5
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpsession5
[gstreamer] gstreamer changed state from NULL to READY ==> funnel10
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel10
[gstreamer] gstreamer changed state from NULL to READY ==> funnel11
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel11
[gstreamer] gstreamer changed state from NULL to READY ==> rtpstorage5
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpstorage5
[gstreamer] gstreamer message progress ==> rtspsrc0

(python3:11979): GStreamer-CRITICAL **: 02:06:31.561: gst_caps_is_empty: assertion 'GST_IS_CAPS (caps)' failed

(python3:11979): GStreamer-CRITICAL **: 02:06:31.561: gst_caps_truncate: assertion 'GST_IS_CAPS (caps)' failed

(python3:11979): GStreamer-CRITICAL **: 02:06:31.561: gst_caps_fixate: assertion 'GST_IS_CAPS (caps)' failed

(python3:11979): GStreamer-CRITICAL **: 02:06:31.562: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:11979): GStreamer-CRITICAL **: 02:06:31.562: gst_structure_get_string: assertion 'structure != NULL' failed

(python3:11979): GStreamer-CRITICAL **: 02:06:31.562: gst_mini_object_unref: assertion 'mini_object != NULL' failed
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Allocating new output: 1920x1088 (x 11), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1920, nFrameHeight = 1080
[gstreamer] gstDecoder -- onPreroll()
[gstreamer] gstreamer changed state from NULL to READY ==> rtpssrcdemux6
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpssrcdemux6
[gstreamer] gstreamer changed state from NULL to READY ==> rtpsession6
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpsession6
[gstreamer] gstreamer changed state from NULL to READY ==> funnel12
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel12
[gstreamer] gstreamer changed state from NULL to READY ==> funnel13
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel13
[gstreamer] gstreamer changed state from NULL to READY ==> rtpstorage6
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpstorage6
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer changed state from NULL to READY ==> udpsink10
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsink10
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsink10
[gstreamer] gstreamer changed state from NULL to READY ==> fakesrc5
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> fakesrc5
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> fakesrc5
[gstreamer] gstreamer changed state from NULL to READY ==> udpsink12
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsink12
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsink12
[gstreamer] gstreamer changed state from NULL to READY ==> fakesrc6
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> fakesrc6
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> fakesrc6
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpssrcdemux6
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpstorage6
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpsession6
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel12
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel13
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpssrcdemux5
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpstorage5
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpsession5
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel10
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel11
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> manager
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc15
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc15
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc16
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc16
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc18
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc19
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc19
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from NULL to READY ==> rtpptdemux4
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpptdemux4
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpptdemux4
[gstreamer] gstreamer changed state from NULL to READY ==> rtpjitterbuffer4
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpjitterbuffer4
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpjitterbuffer4
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer message stream-start ==> pipeline0
[gstreamer] gstreamer changed state from NULL to READY ==> rtpptdemux5
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpptdemux5
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpptdemux5
[gstreamer] gstreamer changed state from NULL to READY ==> rtpjitterbuffer5
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpjitterbuffer5
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpjitterbuffer5
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)";
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
Exception: jetson.utils -- videoSource failed to capture image
>>> [gstreamer] gstDecoder recieve caps:  video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
[gstreamer] gstDecoder -- recieved first frame, codec=h264 format=nv12 width=1920 height=1080 size=3110400
RingBuffer -- allocated 4 buffers (3110400 bytes each, 12441600 bytes total)
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink
[gstreamer] gstreamer message async-done ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> mysink
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> pipeline0
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3984800, maximum-bitrate=(uint)3984800, bitrate=(uint)6675860;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)3984800, bitrate=(uint)6427763;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)3984800, bitrate=(uint)6221916;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)4954600, bitrate=(uint)6124430;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)4954600, bitrate=(uint)5955493;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)31780800, bitrate=(uint)7569575;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)31780800, bitrate=(uint)7420435;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)31780800, bitrate=(uint)7156726;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)31780800, bitrate=(uint)6940990;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)31780800, bitrate=(uint)6799000;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)31780800, bitrate=(uint)6627161;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)31780800, bitrate=(uint)6490565;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)7314961;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)7138723;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)6993081;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)6832873;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)7279765;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)7124412;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)6957425;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33257800, bitrate=(uint)6817770;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33261600, bitrate=(uint)7251275;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33261600, bitrate=(uint)7105067;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33261600, bitrate=(uint)6962670;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33261600, bitrate=(uint)7286573;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33261600, bitrate=(uint)7143274;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)33261600, bitrate=(uint)6979255;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3946800, maximum-bitrate=(uint)34528000, bitrate=(uint)7206872;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3501400, maximum-bitrate=(uint)34528000, bitrate=(uint)7134318;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3501400, maximum-bitrate=(uint)34528000, bitrate=(uint)6989246;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3501400, maximum-bitrate=(uint)34528000, bitrate=(uint)7144624;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)3501400, maximum-bitrate=(uint)34528000, bitrate=(uint)7003138;

KeyboardInterrupt
>>> while True:
...     frame = vs.Capture(timeout = 1000)
...     print(frame)
...
RingBuffer -- allocated 4 buffers (6220800 bytes each, 24883200 bytes total)

<cudaImage object>
   -- ptr:      0x101e20000
   -- size:     6220800
   -- width:    1920
   -- height:   1080
   -- channels: 3
   -- format:   rgb8
   -- mapped:   true
   -- freeOnDelete: false

<cudaImage object>
   -- ptr:      0x102410000
   -- size:     6220800
   -- width:    1920
   -- height:   1080
   -- channels: 3
   -- format:   rgb8
   -- mapped:   true
   -- freeOnDelete: false

** HERE I CHANGED THE RESOLUTION OF THE CAMERA, RESULTING IN A DISCONNECTION ***

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
Exception: jetson.utils -- videoSource failed to capture image
>>> Allocating new output: 1280x720 (x 12), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1280, nFrameHeight = 720
[gstreamer] gstDecoder -- end of stream (EOS)

>>> vs.IsStreaming()
False
>>> vs.Open()
[gstreamer] gstDecoder -- end of stream (EOS) has been reached, stream has been closed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: jetson.utils -- failed to open videoSource device for streaming
>>> vs.Capture()
[gstreamer] gstDecoder -- end of stream (EOS) has been reached, stream has been closed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: jetson.utils -- videoSource failed to capture image
>>> vs.Close()
[gstreamer] gstDecoder -- stopping pipeline, transitioning to GST_STATE_NULL

^C

And then I had to kill the interpreter.
Apparently Close() is never getting back. I would expect Close() to return an error if it's not able to close its underlying stuff (because it reached EOS and it was already closed, for example), or maybe just do nothing and just return, but I'd never expect it to block indefinitely. That I think is another manifestation of the same problem I was facing before (or the very same problem or root of it).
Thank you.

Hi, the same happens also when removing the last reference to a videoSource which has internally been closed (or stopped, or has received an EOS). It hangs on the sole dereference of the object (vs = None). Check the last line. The interpreter never comes back after that line.
(nspi) drakorg@drakorg-desktop:~/workspace/nspi$ python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jetson.utils
>>> import sys
>>> vs =<EMAIL_ADDRESS>sys.argv + ['--headless=true'])
URI -- missing/invalid IP port from<EMAIL_ADDRESS>default to port 554
[gstreamer] initialized gstreamer, version <IP_ADDRESS>
[gstreamer] gstDecoder -- creating decoder for admin
nvbuf_utils: Could not get EGL display connection
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
[gstreamer] gstDecoder -- failed to discover stream info
[gstreamer] gstDecoder -- try manually setting the codec with the --input-codec option
[gstreamer] gstDecoder -- failed to create decoder for<EMAIL_ADDRESS>Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: jetson.utils -- failed to create videoSource device
>>> vs =<EMAIL_ADDRESS>sys.argv + ['--headless=true'])
URI -- missing/invalid IP port from<EMAIL_ADDRESS>default to port 554
[gstreamer] gstDecoder -- creating decoder for admin
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
[gstreamer] gstDecoder -- discovered video resolution: 1280x720  (framerate 25.000000 Hz)
[gstreamer] gstDecoder -- discovered video caps:  video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3.1, profile=(string)main, width=(int)1280, height=(int)720, framerate=(fraction)25/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] rtspsrc<EMAIL_ADDRESS>! queue ! rtph264depay ! h264parse ! omxh264dec ! video/x-raw ! appsink name=mysink
[video]  created gstDecoder from<EMAIL_ADDRESS>------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI<EMAIL_ADDRESS>     - protocol:  rtsp
     - location:  admin
     - port:      554
  -- deviceType: ip
  -- ioType:     input
  -- codec:      h264
  -- width:      1280
  -- height:     720
  -- frameRate:  25.000000
  -- bitRate:    0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
------------------------------------------------
>>> vs =<EMAIL_ADDRESS>sys.argv)
URI -- missing/invalid IP port from<EMAIL_ADDRESS>default to port 554
[gstreamer] gstDecoder -- creating decoder for admin
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
[gstreamer] gstDecoder -- discovered video resolution: 1280x720  (framerate 25.000000 Hz)
[gstreamer] gstDecoder -- discovered video caps:  video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3.1, profile=(string)main, width=(int)1280, height=(int)720, framerate=(fraction)25/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] rtspsrc<EMAIL_ADDRESS>! queue ! rtph264depay ! h264parse ! omxh264dec ! video/x-raw ! appsink name=mysink
[video]  created gstDecoder from<EMAIL_ADDRESS>------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI<EMAIL_ADDRESS>     - protocol:  rtsp
     - location:  admin
     - port:      554
  -- deviceType: ip
  -- ioType:     input
  -- codec:      h264
  -- width:      1280
  -- height:     720
  -- frameRate:  25.000000
  -- bitRate:    0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
------------------------------------------------
>>> vs =<EMAIL_ADDRESS>sys.argv)
URI -- missing/invalid IP port from<EMAIL_ADDRESS>default to port 554
[gstreamer] gstDecoder -- creating decoder for admin
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
[gstreamer] gstDecoder -- discovered video resolution: 1280x720  (framerate 25.000000 Hz)
[gstreamer] gstDecoder -- discovered video caps:  video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3.1, profile=(string)main, width=(int)1280, height=(int)720, framerate=(fraction)25/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] rtspsrc<EMAIL_ADDRESS>! queue ! rtph264depay ! h264parse ! omxh264dec ! video/x-raw ! appsink name=mysink
[video]  created gstDecoder from<EMAIL_ADDRESS>------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI<EMAIL_ADDRESS>     - protocol:  rtsp
     - location:  admin
     - port:      554
  -- deviceType: ip
  -- ioType:     input
  -- codec:      h264
  -- width:      1280
  -- height:     720
  -- frameRate:  25.000000
  -- bitRate:    0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
------------------------------------------------
>>> while True:
...     frame = vs.Capture(timeout=10000)
...
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter6
[gstreamer] gstreamer changed state from NULL to READY ==> omxh264dec-omxh264dec2
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse6
[gstreamer] gstreamer changed state from NULL to READY ==> rtph264depay6
[gstreamer] gstreamer changed state from NULL to READY ==> queue2
[gstreamer] gstreamer changed state from NULL to READY ==> rtspsrc2
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline2
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter6
[gstreamer] gstreamer changed state from READY to PAUSED ==> omxh264dec-omxh264dec2
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse6
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtph264depay6
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue2
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtspsrc2
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline2
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer message new-clock ==> pipeline2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter6
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> omxh264dec-omxh264dec2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse6
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtph264depay6
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue2
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtspsrc2
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer changed state from NULL to READY ==> manager
[gstreamer] gstreamer changed state from READY to PAUSED ==> manager
[gstreamer] gstreamer changed state from NULL to READY ==> rtpssrcdemux8
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpssrcdemux8
[gstreamer] gstreamer changed state from NULL to READY ==> rtpsession8
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpsession8
[gstreamer] gstreamer changed state from NULL to READY ==> funnel16
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel16
[gstreamer] gstreamer changed state from NULL to READY ==> funnel17
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel17
[gstreamer] gstreamer changed state from NULL to READY ==> rtpstorage8
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpstorage8
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer changed state from NULL to READY ==> rtpssrcdemux9
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpssrcdemux9
[gstreamer] gstreamer changed state from NULL to READY ==> rtpsession9
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpsession9
[gstreamer] gstreamer changed state from NULL to READY ==> funnel18
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel18
[gstreamer] gstreamer changed state from NULL to READY ==> funnel19
[gstreamer] gstreamer changed state from READY to PAUSED ==> funnel19
[gstreamer] gstreamer changed state from NULL to READY ==> rtpstorage9
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpstorage9
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer changed state from NULL to READY ==> udpsink16
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsink16
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsink16
[gstreamer] gstreamer changed state from NULL to READY ==> fakesrc8
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> fakesrc8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> fakesrc8
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from NULL to READY ==> udpsink18
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsink18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsink18
[gstreamer] gstreamer changed state from NULL to READY ==> fakesrc9
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> fakesrc9
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> fakesrc9
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer stream status ENTER ==> src

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_is_empty: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_truncate: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_fixate: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_structure_get_string: assertion 'structure != NULL' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_mini_object_unref: assertion 'mini_object != NULL' failed
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Allocating new output: 1280x720 (x 12), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1280, nFrameHeight = 720
[gstreamer] gstDecoder -- onPreroll()
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpssrcdemux9
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpstorage9
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpsession9
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel18
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel19
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpssrcdemux8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpstorage8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpsession8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel16
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> funnel17
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> manager
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc21
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc21
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc22
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc22
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc23
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc23
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc24
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc24
[gstreamer] gstreamer message progress ==> rtspsrc2
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from NULL to READY ==> rtpptdemux8
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpptdemux8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpptdemux8
[gstreamer] gstreamer changed state from NULL to READY ==> rtpjitterbuffer8
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpjitterbuffer8
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpjitterbuffer8
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer message stream-start ==> pipeline2
[gstreamer] gstreamer changed state from NULL to READY ==> rtpptdemux9
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpptdemux9
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpptdemux9
[gstreamer] gstreamer changed state from NULL to READY ==> rtpjitterbuffer9
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtpjitterbuffer9
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtpjitterbuffer9
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)";
[gstreamer] gstDecoder recieve caps:  video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
[gstreamer] gstDecoder -- recieved first frame, codec=h264 format=nv12 width=1280 height=720 size=1382400
RingBuffer -- allocated 4 buffers (1382400 bytes each, 5529600 bytes total)
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink
[gstreamer] gstreamer message async-done ==> pipeline2
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> mysink
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> pipeline2
RingBuffer -- allocated 4 buffers (2764800 bytes each, 11059200 bytes total)
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1790800, maximum-bitrate=(uint)1790800, bitrate=(uint)3645980;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1790800, maximum-bitrate=(uint)1880200, bitrate=(uint)3485454;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1765800, maximum-bitrate=(uint)1880200, bitrate=(uint)3342150;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1765800, maximum-bitrate=(uint)1880200, bitrate=(uint)3221430;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1740600, maximum-bitrate=(uint)1880200, bitrate=(uint)3115657;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)1880200, bitrate=(uint)3022346;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3938212;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3813455;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3718178;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3628540;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3545666;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3469000;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3400660;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3333216;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3215838;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3112257;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17676200, bitrate=(uint)3021820;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3495980;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3411811;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3330133;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3251952;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3178735;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3111842;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3049127;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3338943;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3263676;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3184400;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3110596;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1716000, maximum-bitrate=(uint)17720800, bitrate=(uint)3041203;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3019080;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3259678;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3186000;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3108140;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3035454;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3210976;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3138026;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1713800, maximum-bitrate=(uint)17720800, bitrate=(uint)3061666;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3016682;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3177934;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3106318;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3041829;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3155077;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3082528;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3016443;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3137671;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(Main\ Profile\)", minimum-bitrate=(uint)1688000, maximum-bitrate=(uint)17720800, bitrate=(uint)3074620;
Allocating new output: 1920x1088 (x 11), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1920, nFrameHeight = 1080
[gstreamer] gstDecoder -- end of stream (EOS)
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
Exception: jetson.utils -- videoSource failed to capture image
>>> vs.IsStreaming()
False
>>> vs = None
[gstreamer] gstDecoder -- stopping pipeline, transitioning to GST_STATE_NULL

^C

Thank you.
Best regards.

Hmm it appears that GStreamer never returns from gst_element_set_state(mPipeline, GST_STATE_NULL);
It seems like it is blocking on network access:   https://gstreamer-devel.narkive.com/cePG8Gw8/gst-element-set-state-hangs#post2
I will have to think of a way to workaround it.   For now, what happens if you comment out this line of code:
https://github.com/dusty-nv/jetson-utils/blob/5cf543d9e0bc37ce7df0def2242c2e17dc8559d0/codec/gstDecoder.cpp#L114
Then run make, and sudo make install again.

Hi, great, apparently that worked, it no longer hangs and I can now do the reconnection attempt without problem apparently. I'll let you know if I face some long term issue, but for the moment apparently it's doing well.
Thank you,
Regards.

@dusty-nv, I am facing a similar issue while streaming 120 fps videos from 2 CSI cameras on the jetson nano using the C++ API. The Capture() call times out for one of the cameras/streams after a while of streaming (maybe 5-10 mins) and then when I do a SAFE_DELETE() of that input stream, it hangs after [gstreamer] gstCamera -- stopping pipeline, transitioning to GST_STATE_NULL at which point I have to force kill the program. I'm not sure if the problem arises from the same place, i.e. at gst_element_set_state(mPipeline, GST_STATE_NULL);. I will try and use the suggestion of commenting out the Close() and inform back.

@dusty-nv I've been following your S3E1 Hello AI World tutorial and ran into an issue that could be related to this thread. I have a live RTSP feed that I can play on network and can view on the Jetson Nano using the pre-installed SMPlayer. When I feed the path into the video-viewer app it attempts to pull the stream but eventually fails in a loop and I have to kill it. This happens with docker and source versions. The //close() suggestion above did not help.
My server sees the connection attempt with a disconnect issued one second later. I'm thinking this is a timing issue caused by my network but any work-around would be appreciated. (Thanks for the tutorials by the way. They are great.)
[Start of the failure loop:]
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtspsrc0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer message progress ==> rtspsrc0
[gstreamer] gstreamer message progress ==> rtspsrc0
video-viewer:  failed to capture video frame
video-viewer:  failed to capture video frame
video-viewer:  failed to capture video frame

I also have same issue. And //close did not help me either.

   This would be good for testing purposes to verify that GStreamer can indeed pull your RTSP feed.

Hi @dusty-nv
We are able to do object detection with RTSP using detectnet utility on Jetson Xavier NX but when we are doing object detection using python jetson.inference and jetson.utils modules it is giving us the above issue.
We have referred to the master branch implementation and it is giving us the same issue:
(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_is_empty: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_truncate: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_fixate: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_structure_get_string: assertion 'structure != NULL' failed

(python3:20080): GStreamer-CRITICAL **: 04:07:32.972: gst_mini_object_unref: assertion 'mini_object != NULL' failed

Is it stable now in the master branch?
Please let us know if we could provide more information.

Hello @dusty-nv,
We are able to do object detection using detectnet/detectnet.py or video-viewer/video-viewer.py but faced the above issue while using jetson inference python API.
We have used the timeout argument i.e input.Capture(timeout=15000) and it was working fine.

We are able to do object detection using detectnet/detectnet.py or video-viewer/video-viewer.py but faced the above issue while working with RTSP stream with jetson inference python API.

detectnet.py / video-viewer.py use the same jetson.inference Python API, so if you start from those examples, it should still be working.

We have used the timeout argument i.e input.Capture(timeout=15000) and it was working fine.

Do you mean that it is working fine for you now with timeout=15000?

We are able to do object detection using detectnet/detectnet.py or video-viewer/video-viewer.py but faced the above issue while working with RTSP stream with jetson inference python API.

detectnet.py / video-viewer.py use the same jetson.inference Python API, so if you start from those examples, it should still be working.

We have used the timeout argument i.e input.Capture(timeout=15000) and it was working fine.

Do you mean that it is working fine for you now with timeout=15000?

Yup, we are checking whether we are getting input frames in between 15 sec and if not we are rebooting the Jetson.

Has there been any solution to this?
I have a similar  issue and running into stability problems while trying to start and stop the video-viewer application. If i have to restart video-viewer for any reason, I must reboot the xavier. Iv also noticed that letting the application run for 12+ hours the frame rates degrades due to increased capture timeouts being issued. Im not sure if this is a gstreamer thing or nvargus-daemon thing.

Hey @dusty-nv ,
I am on the latest origin and have checkout to nvmm-disabled. Still getting this error
Allocating new output: 1280x720 (x 16), ThumbnailMode = 0 OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1280, nFrameHeight = 720 [gstreamer] gstDecoder -- end of stream (EOS)

Allocating new output: 1280x720 (x 16), ThumbnailMode = 0 OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1280, nFrameHeight = 720 [gstreamer] gstDecoder -- end of stream (EOS)

That isn't an error persay (well, at least not from jetson.utils) - it gets triggered when the stream source ends.  Are you able to play the stream in a standalone GStreamer pipeline to check that it's working?


urllib3.exceptions.MaxRetryError: HTTPSConnectionPool

What happened:
Run command: opta apply -c flyte/opta/aws/env.yaml failed, see error below.
Error
ERROR: HTTPSConnectionPool(host='04803a22277127da2dff766d486c4519.gr7.us-east-1.eks.amazonaws.com', port=443): Max retries exceeded with url: /api/v1/services (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa6a3f10580>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Traceback (most recent call last):
  File "urllib3/connection.py", line 174, in _new_conn
  File "urllib3/util/connection.py", line 72, in create_connection
  File "socket.py", line 918, in getaddrinfo
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 703, in urlopen
  File "urllib3/connectionpool.py", line 386, in _make_request
  File "urllib3/connectionpool.py", line 1040, in _validate_conn
  File "urllib3/connection.py", line 358, in connect
  File "urllib3/connection.py", line 186, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fa6a3f10580>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "opta/cli.py", line 66, in <module>
  File "click/core.py", line 1128, in __call__
  File "click/core.py", line 1053, in main
  File "click/core.py", line 1659, in invoke
  File "click/core.py", line 1395, in invoke
  File "click/core.py", line 754, in invoke
  File "opta/commands/apply.py", line 105, in apply
  File "opta/commands/apply.py", line 323, in _apply
  File "opta/commands/apply.py", line 210, in _apply
  File "opta/core/generator.py", line 84, in gen
  File "opta/layer.py", line 383, in gen_tf
  File "modules/aws_k8s_base/aws_k8s_base.py", line 45, in process
    self._process_nginx_extra_ports(self.module.data)
  File "modules/base.py", line 396, in _process_nginx_extra_ports
    service_port_mapping = reconcile_nginx_extra_ports(update_config_map=False)
  File "modules/base.py", line 651, in reconcile_nginx_extra_ports
    services = kubernetes.list_services()
  File "opta/core/kubernetes.py", line 566, in list_services
  File "kubernetes/client/api/core_v1_api.py", line 17764, in list_service_for_all_namespaces
  File "kubernetes/client/api/core_v1_api.py", line 17867, in list_service_for_all_namespaces_with_http_info
  File "kubernetes/client/api_client.py", line 348, in call_api
  File "kubernetes/client/api_client.py", line 180, in __call_api
  File "kubernetes/client/api_client.py", line 373, in request
  File "kubernetes/client/rest.py", line 239, in GET
  File "kubernetes/client/rest.py", line 212, in request
  File "urllib3/request.py", line 74, in request
  File "urllib3/request.py", line 96, in request_encode_url
  File "urllib3/poolmanager.py", line 375, in urlopen
  File "urllib3/connectionpool.py", line 813, in urlopen
  File "urllib3/connectionpool.py", line 813, in urlopen
  File "urllib3/connectionpool.py", line 813, in urlopen
  File "urllib3/connectionpool.py", line 785, in urlopen
  File "urllib3/util/retry.py", line 592, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='04803a22277127da2dff766d486c4519.gr7.us-east-1.eks.amazonaws.com', port=443): Max retries exceeded with url: /api/v1/services (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa6a3f10580>: Failed to establish a new connection: [Errno -2] Name or service not known'))

What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
opta_crash_report (2).zip
Environment:

Opta version (use opta version): v0.24.3
Cloud provider (or hardware configuration for local): AWS
OS (e.g: cat /etc/os-release): Ubuntu 20.04
Kernel (e.g. uname -a):
Install tools:
Others:

@anmyachev did this happen aftr destroying the environment and recreating it?

@juandiegopalomino yes, in addition, the same problem is observed by my colleague who works in a different region, but on the same account.

OK, this is an issue due to caching of the kubeconfig. It has been fixed here https://github.com/run-x/opta/pull/622, and should be out on the next release. In the mean time do the following command to fix it: rm -r ~/.opta/kubeconfigs


Build Script & General updates

Multiple Updates:

Create node script to handle pre and post build processes instead of using OS commands
Move location of script to download omega_edit. Also made it a static script instead of one that is compiled.
Remove run-script-os
Create artifact class

Closes #121

Is this just waiting on another +1?

Yes, I think just waiting for a 2nd reviewer.


idle time out for refresh token

Hi team,
I idle time out for refresh token is enabled on auth server side. It is said that, if the user is inactive on application for >=30 minutes, the refresh token will be revoked due to idle time out.
But it has been observed that , it is not happening when the application is idle for >=30 minutes, it is not applying , but it is applied when the system is idle for >=30 minutes.
Could you please suggest me . what could be the reason for this behaviour ? do we have any option to enable idle time out timer for  refresh token ?

The underlying library oidc-client-ts is responsible for this. See https://github.com/authts/oidc-client-ts/issues/251


[WIP][Feedback Needed] - Add endpoint to allow changing the ownership of content items

We have recently migrated some taxonomy-related tools from collections-publisher into content-tagger. Since some of the Taxons have been created on collections-publisher, we now need to update their ownership in order to be able to update those content items from content-tagger.
As things stand, we cannot update the publishing_app attribute of content items via the API. There is a validator that prevents us from doing that.
This could be done via a rake task (I wrote that in a separate branch here ).
However, my suggestion is to add an endpoint that allows us to change the ownership of content items without adding more logic to the validator, leaving the put_content flow intact.
Would this be useful and/or does it make sense?
If that's not the case, I will close this PR and open the one with the rake task.
Note: this was a very rough version to see if it would work, it's lacking tests and robustness.

Closing in favour of the rake task as discussed on slack.


Add environment information to issue template

For some errors knowing exact operating system, node and npm version is crucial. Thus, we should ask for this information in issue template.

Good idea. @bonustrack, should we spec node 6+ and call it a day?

@relativityboy what's wrong with node 6-?


Framework for Impala C++ UDFs/UDAFs in Ibis

Addresses #262 and #195. Replaces previous PR

@laserson can you and @megvuyyuru make sure that udfs can be built in Jenkins? We will need to include a guide to setting up the UDF SDK in the Ibis documentation. Does the SDK work on OS X?

I'm OK with adding e2e tests for UDAs in a follow up PR if we address all the other scalar function considerations in this one

We also ought to test "safe" type promotions somewhat more explicitly. For example: passing an Int16Value into a udf expecting Int32Value

When it comes to the testing, all the UDFs we're incorporating are from the Impala repo, no?  If that's the case, my preference would be that we do not include them in the Ibis repo, since we won't be synchronized to any changes they make to those files.  I think it'd be better if the load_test_data.py script would pull the necessary UDFs directly from the Impala repo, build them, and register them.

@laserson the problem is that the impala udf examples are not comprehensive. we need to have a place where we put UDFs that cover all the bases

From a developer workflow point of view, having the build/upload in load_test_data.py isn't great; it would be better to have a Makefile at the base of the repo that builds/refreshes the test UDF library if needed

This looks almost ready to merge.
The last things that are missing are the user usability stuff:

Add a docstring to add_impala_operation
Add add_impala_operation to the ibis namespace (see ibis/__init__.py)
Add a function wrap_impala_udf to the ibis namespace (with a docstring). I would prefer that the users not interact with the UDF* classes directly.
Documentation. If you can write instructions for installing the UDF SDK, building a UDF, and calling it with Ibis to the documentation that would be a big help. This has to get done one way or another prior to release. If you would like we can do the docs in a follow up PR after this prior items are completed.

I would like to avoid exposing any internal module / package structure to the user at this time, so the user documentation shouldn't have any references to any modules other than the top level ibis module.

merged, thanks for all the patience with code reviews!


[gomobile] Api level 30 Calling net.Interface fails (Android 11)

Open Go issue: https://github.com/golang/go/issues/40569
Reason for the issue:
The following is a list of the ways that apps are affected by this change (from Api level 30 onwards):

NetworkInterface.getHardwareAddress() returns null for every interface.
Apps cannot use the bind() function on NETLINK_ROUTE sockets.
The ip command does not return information about interfaces.
Apps cannot send RTM_GETLINK messages.

source (https://developer.android.com/training/articles/user-data-ids#mac-11-plus)
Possible solution
"
SDK 30 prohibits syscall.NetlinkRIB(syscall.RTM_GETADDR, ...) which Go's net.Interfaces uses. Implement an Android specific version of net.Interfaces to use instead.
Passing primitive types across JNI is relatively straightforward, passing a single object of a complex class is annoying but still possible, but passing lists and other more complex data structures is way harder. As such, this commit added a Java routine to render the interface information to a string and pass that across JNI as a primitive type for Go code to parse.
"
PR with a solution: https://github.com/tailscale/tailscale-android/pull/21

This issue has been addressed by creating a new Peernet core repository for Android 11 onwards and supporting potentially changes needed for IOS as well.
Repo link:  https://github.com/PeernetOfficial/Core-Mobile
Change log

[x] Supported network interface for android 11 (https://github.com/PeernetOfficial/Core-Mobile/commit/64fc4bf04ddf4b3203d50daec602ee4c668bdb66).
[x] Fixed atomic misalignment (https://github.com/PeernetOfficial/Core-Mobile/commit/64fc4bf04ddf4b3203d50daec602ee4c668bdb66).
[ ] Fix EOF error for blockchain file store.
[ ] Test for more bugs


Slim v3 does not parse multipart/form-data from PUT requests

When sending a POST, I can fetch all the fields using $request->getParsedBody() and it works perfectly. With a similar PUT request, the body is null hence parsing fails.

This is a long story. Because it is so intertwined with HTTP and streams, I couldn't easily write a failing testcase... :cry:

$app->post('/test', function ($request, $response) {
    var_dump($request->getParsedBody());
});

$app->put('/test', function ($request, $response) {
    var_dump($request->getParsedBody());
});

Requests are sent using Google Chrome and with javascript:
var data = new FormData
data.append('foo', 'bar')

request('POST', '/test', data, function() {
  console.log('POST success')
})

request('PUT', '/test', data, function() {
  console.log('PUT success')
})

request (method, uri, data, callback) {
  var request = new XMLHttpRequest()
  request.open(method, uri, true)
  request.onload = function() {
    if (request.status >= 200 && request.status < 400) {
      callback(request);
    }
  }
  request.send(data)
}

The POST does show an array ['foo' => 'bar'], the PUT is null. Checking php's input (php://input) marks clearly the input is there (also, Chrome devtools show this as expected). As Slim\Http\Body is a slight wrapper around streams, I started digging in Slim\Http\Request::getParsedBody():
public function getParsedBody()
{
    echo "getParsedBody()\n";
    if ($this->bodyParsed) {
        echo "Has  already parsed body\n";
        return $this->bodyParsed;
    }

    if (!$this->body) {
        echo "Has no body\n";
        return;
    }

    $mediaType = $this->getMediaType();
    $body = (string)$this->getBody();

    if (isset($this->bodyParsers[$mediaType]) === true) {
        echo "Has parser\n";
        $parsed = $this->bodyParsers[$mediaType]($body);

        if (!is_null($parsed) && !is_object($parsed) && !is_array($parsed)) {
            throw new RuntimeException('Request body media type parser return value must be an array, an object, or null');
        }
        $this->bodyParsed = $parsed;
    } else {
        echo "Has no parser\n";
    }

    echo "Ready to return body\n";
    return $this->bodyParsed;
}

Output:
// POST: iterating double and 2nd time it has the body parsed?
getParsedBody()
Has no parser
Ready to return body
getParsedBody()
Has  already parsed body

// PUT: no parser, single iteration
getParsedBody()
Has no parser
Ready to return body

OK, so after reading this and digging through, you just find the root cause of it all here laughing:
if ($request->isPost() &&
    in_array($request->getMediaType(), ['application/x-www-form-urlencoded', 'multipart/form-data'])
) {
    // parsed body must be $_POST
    $request = $request->withParsedBody($_POST);
}

Wrong! Actually, any request can have request body data (even GET!) and AFAIK there is no HTTP spec rule which prevents PUT data to send and body.

I think that code is correct: $_POST is empty if the method is not POST.
I think that what's missing is a parser to deal with multipart/form-data data in php://input when the method is not POST.

It should be noted if you are using the _METHOD overloads that, this is not an issue iirc.

@akrabat yeah see my first comment. It just took some time to figure out multipart/form-data is parsed via $_POST for POST requests, but in the end there is no multipart/form-data parser to parse the data for non-POST. Now I am checking out if it's possible to write a parser.
@geggleto well I think for the new FW you shouldn't need to send POST to simulate PUT if you're actually able to send PUT requests ;)

In my opinion it is not worth to implement a custom parser for a multipart/form-data encoded body. Instead, if Slim detects this content type in a PUT request it should return a response with 415 Unsupported Media Type.

If you have non-binary data: Use the more lightweight application/x-www-form-urlencoded, application/json, ...
If you have binary data: Make a PUT request with the binary data in the request body
If you have mixed data: POST/PUT the binary data first, then update the non-binary data with PUT

Anyway, see the rejected parser in Symfony for a possible implementation: https://github.com/symfony/symfony/pull/10381

I think that if someone needs multipart/form-data in a PUT request, then they can write their own media type parser and register it with the Request object.

@micheh kinda weird answer imho. Slim is a general purpose framework, it should be opinionated in the case it does not allow PUT or DELETE requests with multipart/form-data bodies. If you want to support all common HTTP verbs and support all common body encodings, it should be part of Slim.
Either way, I have done like @akrabat said already, it's now a custom parser in my own app. If anyone need this for their own use in the future, just ping me and I'll explain.

@juriansluiman I think it was summarised on that symfony issue as to why we shouldn't be handling this at the framework level here https://github.com/symfony/symfony/pull/10381#issuecomment-38717986

@juriansluiman Can you please explain by creating a blog post about it and sharing the link. I am having issues with parsing put requests in slim v3.

This is like cut->paste on osx. You can do all "mabo jambo" , do entire circus around inside and outside but it does not support simple function like multipart/form-data with PUT.
There are no explanation or discussion for that. You can run but you can't walk slow because it is inefficient.

@tabaktoni PHP doesn't support multipart/form-data for PUT. I'm unconvinced that we should write our own decoder in Slim unless PHP exposes theirs.

if you sending data from put method make sure to set the content type to application/x-www-form-urlencoded

You have to set header request Content-Type: application/x-www-form-urlencoded

application/x-www-form-urlencoded is no good if you want to send binary data...

If nothing else, this should have been described in the documentation. The caveat is not obvious.

We would love a PR!


Bump NDK to 21.4.7075529

Summary
This PR bumps NDK_VERSION to 21.4.7075529, and patches FileUtil.cpp from folly based on patch from https://github.com/facebook/folly/pull/1593. We can remove the patch once PR lands in Folly and bump Folly version in RN.
FYI, NDK 20 is deprecated and 21 is LTS release.
Changelog
[Android] [Changed] - Bump NDK to 21.4.7075529
Test Plan

@Kudo @hramos @ShikaSD please review and merge

I'll fix test_docker once this merged