Skip to content

pyav was blocked on av.container.InputContainer.decode() #615

Closed

Description

@woodenwatcher

I set timeout parameter as follow, but still blocked on decode function
container = av.open(uri, 'r', timeout=(5, 5))

python call stack:

File "/home/admin/miniconda/envs/python/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "/home/admin/miniconda/envs/python/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/admin/miniconda/envs/python/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/admin/miniconda/envs/python/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/home/admin/miniconda/envs/python/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/home/admin/miniconda/envs/python/lib/python3.6/site-packages/pyvideo/living_service.py", line 168, in getframes
    for frame in video.decode(stream):

c/c++ call stack:

Thread 14 (Thread 0x7f7db3fff700 (LWP 107258)):
#0  0x00007f7f473ab995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f7f2c921ab3 in avpriv_slicethread_execute () from /home/admin/code/ffmpeg-4.2.2/libavutil.so.56
#2  0x00007f7f2b51e5a3 in ?? () from /home/admin/code/ffmpeg-4.2.2/libavcodec.so.58
#3  0x00007f7f2b35bd88 in ?? () from /home/admin/code/ffmpeg-4.2.2/libavcodec.so.58
#4  0x00007f7f2b197f8b in ?? () from /home/admin/code/ffmpeg-4.2.2/libavcodec.so.58
#5  0x00007f7f2b198c58 in avcodec_send_packet () from /home/admin/code/ffmpeg-4.2.2/libavcodec.so.58
#6  0x00007f7f31453a4d in __pyx_f_2av_5codec_7context_12CodecContext__send_packet_and_recv (__pyx_v_self=0x7f7e6503a288, __pyx_v_packet=0x7f7e65037688) at src/av/codec/context.c:5486
#7  0x00007f7f31456dca in __pyx_f_2av_5codec_7context_12CodecContext_decode (__pyx_v_self=0x7f7e6503a288, __pyx_skip_dispatch=0, __pyx_optional_args=0x7f7db3ffdae0) at src/av/codec/context.c:6821
#8  0x00007f7f2ec24fc5 in __pyx_pf_2av_6stream_6Stream_10decode (__pyx_v_self=0x7f7e6db7c708, __pyx_v_packet=0x7f7e65037688) at src/av/stream.c:4017
#9  0x00007f7f2ec24e4c in __pyx_pw_2av_6stream_6Stream_11decode (__pyx_v_self=0x7f7e6db7c708, __pyx_args=0x7f7e65151710, __pyx_kwds=0x0) at src/av/stream.c:3992
#10 0x000055d92a1d4336 in PyCFunction_Call () at /tmp/build/80754af9/python_1540319457073/work/Objects/methodobject.c:98
#11 0x00007f7f363f90f8 in __Pyx_PyObject_Call (func=0x7f7e54104168, arg=0x7f7e65151710, kw=0x0) at src/av/packet.c:5493
#12 0x00007f7f363f94f2 in __Pyx__PyObject_CallOneArg (func=0x7f7e54104168, arg=0x7f7e65037688) at src/av/packet.c:5561
#13 0x00007f7f363f9608 in __Pyx_PyObject_CallOneArg (func=0x7f7e54104168, arg=0x7f7e65037688) at src/av/packet.c:5580
#14 0x00007f7f363f30ba in __pyx_pf_2av_6packet_6Packet_8decode (__pyx_v_self=0x7f7e65037688) at src/av/packet.c:3086
#15 0x00007f7f363f2ee3 in __pyx_pw_2av_6packet_6Packet_9decode (__pyx_v_self=0x7f7e65037688, unused=0x0) at src/av/packet.c:3051
--
#31 0x000055d92a2553fb in _PyFunction_FastCall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:4919
#32 _PyFunction_FastCallDict () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:5021
#33 0x000055d92a1d179f in _PyObject_FastCallDict () at /tmp/build/80754af9/python_1540319457073/work/Objects/abstract.c:2310
#34 0x000055d92a1d6303 in _PyObject_Call_Prepend () at /tmp/build/80754af9/python_1540319457073/work/Objects/abstract.c:2373
#35 0x000055d92a1d11de in PyObject_Call () at /tmp/build/80754af9/python_1540319457073/work/Objects/abstract.c:2261
#36 0x000055d92a2d10a6 in t_bootstrap () at /tmp/build/80754af9/python_1540319457073/work/Modules/_threadmodule.c:998
#37 0x00007f7f473a7e25 in start_thread () from /lib64/libpthread.so.0
#38 0x00007f7f470d1bad in clone () from /lib64/libc.so.6

Activity

  1. choice17 commented on Jan 27, 2021

    @choice17

    out of the topic : how do you trace the stack in c/c++ while you are using python pyav ?

  2. woodenwatcher commented on Feb 1, 2021

    @woodenwatcher
    Author

    out of the topic : how do you trace the stack in c/c++ while you are using python pyav ?

    pstack pid

  3. jlaine commented on Mar 26, 2022

    @jlaine
    Member

    Unless we have a specific URL to investigate this I don't see this issue going anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions