gs: segfault for gssink
Playing around with the gs-plugin, for the google storage source and sink. Using a valid location URI gives me a segfault. I am building GStreamer from scratch, just like Google Cloud Storage cpp (based on the readme of the gs-plugin).
My whole workflow is included in the Dockerfile that I have attached. It builds Google Cloud Storage and GStreamer: Dockerfile
After copying my service account credentials .json to the docker container and setting 'GOOGLE_APPLICATION_CREDENTIALS', I try to refer to my video in storage. This is the output when using 'gdb':
Starting program: /usr/local/bin/gst-launch-1.0 gssrc location=gs://datastorage-test/videos/test1.mp4
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Setting pipeline to PAUSED ...
[New Thread 0x7f8b48e2b700 (LWP 208)]
[Thread 0x7f8b48e2b700 (LWP 208) exited]
[New Thread 0x7f8b48e2b700 (LWP 209)]
[Thread 0x7f8b48e2b700 (LWP 209) exited]
[New Thread 0x7f8b48e2b700 (LWP 210)]
[Thread 0x7f8b48e2b700 (LWP 210) exited]
Thread 1 "gst-launch-1.0" received signal SIGSEGV, Segmentation fault.
0x00007f8b4af70827 in gst_gs_src_start (basesrc=<optimized out>) at /usr/include/c++/8/bits/hashtable_policy.h:389
389 _Node_const_iterator(__node_type* __p) noexcept
Using a URL that does not exist gives me the following output, which looks like some things work:
root@90f2e355d926:/# gst-launch-1.0 gssrc location=gs://datastorage-test/videos/test1a.mp4
Setting pipeline to PAUSED ...
ERROR: from element /GstPipeline:pipeline0/GstGsSrc:gssrc0: Could not get object metadata (Permanent error in GetObjectMetadata: {
"error": {
"code": 404,
"message": "No such object: datastorage-test/videos/test1a.mp4",
"errors": [
{
"message": "No such object: datastorage-test/videos/test1a.mp4",
"domain": "global",
"reason": "notFound"
}
]
}
}
)
Additional debug info:
../gst-build/subprojects/gst-plugins-bad/ext/gs/gstgssrc.cpp(491): gst_gs_src_start (): /GstPipeline:pipeline0/GstGsSrc:gssrc0:
system error: Success
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstGsSrc:gssrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
../gst-build/subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3557): gst_base_src_start (): /GstPipeline:pipeline0/GstGsSrc:gssrc0:
Failed to start
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
I am aware that the pipeline is not complete, but I get the same SegFault when running a whole pipeline. Anyone who sees what goes wrong? By the way, if you see any mistakes/easy optimizations in the Docker Image, happy to hear them (haven't touched those in quite some time)!
Thanks again, really stoked to see this working! Let me know if any more information is required, the DockerFile should provide a reproducible case though.
Sincerely, Floris Weers