[OpenIndiana-discuss] Fwd: Comments, please! problem with ffmpeg that seems to be a problem with OI at driver or basic library level

Hans J. Albertsson hans.j.albertsson at branneriet.se
Wed May 22 15:16:09 UTC 2013


(The below is a conversation between me and a former colleague from Sun)
Published here in an anonymous form.

--------
This is what I got from first (by mistake) truss -T pollsys and then 
(intended) truss -T poll

ff_network_wait_fd_timeout() + 8c.... What's that??? Must be in ffmpeg 
somewhere, judging by its name.

hans at klaus%64%11:24> ps -fe | grep ffmpeg
     hans 29998 26978   1 11:24:56 pts/6       0:14 ffmpeg -i 
http://svtplay10i-f.akamaihd.net/i/se/open/20130510/1283828-004A/ENDE
     hans 29961     1   0   maj 15 ?           1:04 
/usr/local/bin/ffmpeg -i 
http://svtplay10i-f.akamaihd.net/i/se/open/20130510/12
     hans     7 22527   0 11:27:49 pts/4       0:00 grep ffmpeg
hans at klaus%65%11:27> ptree 29998
3153  /usr/sbin/gdm-binary
   3668  /usr/lib/gdm-simple-slave --display-id 
/org/gnome/DisplayManager/Displa
     3794  /usr/lib/gdm-session-worker
       3801  gnome-session
         4012  gnome-terminal --sm-client-id 
108f7b70c3cc7f14f013637904873352500
           26978 tcsh
             29998 ffmpeg -i 
http://svtplay10i-f.akamaihd.net/i/se/open/20130510
hans at klaus%66%11:28> truss -T pollsys -p 29998
pollsys(0x08046798, 1, 0x08046748, 0x00000000)    = 0
hans at klaus%67%11:28>
hans at klaus%67%11:28>
hans at klaus%67%11:28>
hans at klaus%67%11:28> pstack 29998
29998:    ffmpeg -i 
http://svtplay10i-f.akamaihd.net/i/se/open/20130510/1283828-
  fef141f5 pollsys  (8046798, 1, 8046748, 0)
  feea4fa6 poll     (8046798, 1, 64, fef01058, 5, 0) + 4c
  fd2db96c ff_network_wait_fd_timeout () + 8c
hans at klaus%68%11:29>
hans at klaus%68%11:29> truss -T poll -p 29998
pollsys(0x08046798, 1, 0x08046748, 0x00000000)    = 0
pollsys(0x08046798, 1, 0x08046748, 0x00000000)    = 0
hans at klaus%69%11:30> pstack 29998
29998:    ffmpeg -i 
http://svtplay10i-f.akamaihd.net/i/se/open/20130510/1283828-
  fef141f5 pollsys  (8046798, 1, 8046748, 0)
  feea4fa6 poll     (8046798, 1, 64, fef01058, 5, 0) + 4c
  fd2db96c ff_network_wait_fd_timeout () + 8c
hans at klaus%70%11:30>


On 2013-05-15 23:58, XXXXXX wrote:
> Hans,
>
> I'm currently unable to post to the list but I have seen this when the 
> program is not large file aware but is linked with libraries that are 
> large file aware or visa versa. The details escape me but I can check 
> next week when I get home.
>
> If you do truss -T poll of the spinning program so it stops in poll 
> and then run pstack against it will at least tell you where the 
> problem is. That might even remind me of the problem. The solution was 
> a recompile after editing a header file.
>
> Hope this helps
>
> C
>
> Begin forwarded message:
>
>> *From:* "Hans J. Albertsson" <hans.j.albertsson at branneriet.se 
>> <mailto:hans.j.albertsson at branneriet.se>>
>> *Date:* 15 May 2013 10:25:08 PDT
>> *To:* Discussion list for OpenIndiana 
>> <openindiana-discuss at openindiana.org 
>> <mailto:openindiana-discuss at openindiana.org>>
>> *Subject:* *Re: [OpenIndiana-discuss] Comments, please! problem with 
>> ffmpeg that seems to be a problem with OI at driver or basic library 
>> level*
>> *Reply-To:* Discussion list for OpenIndiana 
>> <openindiana-discuss at openindiana.org 
>> <mailto:openindiana-discuss at openindiana.org>>
>>
>> Yes, running in debug mode seems to make it all work ok, at a slight 
>> cost in speed.
>>
>> On 2013-05-15 17:43, Hans J. Albertsson wrote:
>>> One more piece of test data: upping verbosity one step (pressing '+' 
>>> in the terminal running ffmpeg) made it all run to completion with 
>>> minimal time penalty. Worked twice. Will test some more.
>>>
>>> That would seem to suggest a buffering/timing issue.
>>>
>>>
>>> On 2013-05-15 17:37, Colin Ellis wrote:
>>>> I'd suggest trying ffmpeg out with different encodings first to see 
>>>> if it's
>>>> stream-specific.  It might actually be libavcodec giving you the hang.
>>>> I've seen endless loop bugs previously while transcoding audio.
>>>>
>>>>
>>>> On Wed, May 15, 2013 at 8:52 AM, Hans J. Albertsson <
>>>> hans.j.albertsson at branneriet.se 
>>>> <mailto:hans.j.albertsson at branneriet.se>> wrote:
>>>>
>>>>> I just discovered that with most Ubuntu versions and recent 
>>>>> ffmpegs, the
>>>>> same hang happens there.
>>>>>
>>>>> So it isn't just OI.
>>>>>
>>>>> Good. Or bad.. Or something. I will look into it, trussing and 
>>>>> whatever. I
>>>>> mean my ffmpeg is locally compiled and I have the source code for 
>>>>> reference.
>>>>>
>>>>> On 2013-05-15 16:05, Bob Friesenhahn wrote:
>>>>>
>>>>>> On Wed, 15 May 2013, Hans J. Albertsson wrote:
>>>>>>
>>>>>>  I regularly download ( quite legally, I'm told ) HLS streams from
>>>>>>> svtplay.se <http://svtplay.se> using ffmpeg and a stream URL 
>>>>>>> obtained by scraping the
>>>>>>> svtplay.se/ <http://svtplay.se/><show-link> page.
>>>>>>>
>>>>>>> This works very well in Ubuntu and Windows on a separate PC.
>>>>>>>
>>>>>>> Under OI and even in W XP inside a VirtualBox VM it hangs, 
>>>>>>> seemingly at
>>>>>>> random positions in the stream. The ffmpeg process is totally 
>>>>>>> inert upon
>>>>>>> hanging, and one must kill it by two consecutive ^C. It doesn't 
>>>>>>> respond to
>>>>>>> the on the fly command language at all.
>>>>>>>
>>>>>>> The hang is in pollsys, as demonstrated by the following truss 
>>>>>>> -f output
>>>>>>> excerpt from the hanging ffmpeg process.
>>>>>>>
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>> 29961:    pollsys(0x08046768, 1, 0x08046718, 0x00000000)    = 0
>>>>>>>
>>>>>>>
>>>>>>> I guess that the fact it happens in the W XP in vbox the same as 
>>>>>>> in OI
>>>>>>> itself indicates the problem somehow involves code residing 
>>>>>>> under the Vbox
>>>>>>> VM, even, and that it's some sort of incompatibility that only will
>>>>>>> actually have an effect under some sort of race or race-like 
>>>>>>> condition.
>>>>>>>
>>>>>>> I'd appreciate any insight any of you could offer into what this 
>>>>>>> entails
>>>>>>>
>>>>>> I see similar issues with the VLC player which decides that 
>>>>>> 'mplayer' is
>>>>>> too slow and not able to keep up.  Without taking time to 
>>>>>> diagnose, my
>>>>>> first guess would be a buffering issue which causes the hang. 
>>>>>>  The software
>>>>>> is developed under Linux and may have certain buffering (e.g. pipe
>>>>>> buffering) expectations. Confusion between the buffering and any 
>>>>>> locking
>>>>>> (or even just the buffering) might cause a deadlock in the software.
>>>>>>
>>>>>> To diagnose, try using 'pstack' on the processes which are 
>>>>>> hanging and
>>>>>> see where they are hung.
>>>>>>
>>>>>> Bob
>>>>>>
>>>>>
>>>>> ______________________________**_________________
>>>>> OpenIndiana-discuss mailing list
>>>>> OpenIndiana-discuss@**openindiana.org 
>>>>> <http://openindiana.org><OpenIndiana-discuss at openindiana.org 
>>>>> <mailto:OpenIndiana-discuss at openindiana.org>>
>>>>> http://openindiana.org/**mailman/listinfo/openindiana-**discuss<http://openindiana.org/mailman/listinfo/openindiana-discuss> 
>>>>> <http://openindiana.org/**mailman/listinfo/openindiana-**discuss%3Chttp://openindiana.org/mailman/listinfo/openindiana-discuss%3E> 
>>>>>
>>>>>
>>>> _______________________________________________
>>>> OpenIndiana-discuss mailing list
>>>> OpenIndiana-discuss at openindiana.org 
>>>> <mailto:OpenIndiana-discuss at openindiana.org>
>>>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>>
>>>
>>> _______________________________________________
>>> OpenIndiana-discuss mailing list
>>> OpenIndiana-discuss at openindiana.org 
>>> <mailto:OpenIndiana-discuss at openindiana.org>
>>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>
>>
>> _______________________________________________
>> OpenIndiana-discuss mailing list
>> OpenIndiana-discuss at openindiana.org 
>> <mailto:OpenIndiana-discuss at openindiana.org>
>> http://openindiana.org/mailman/listinfo/openindiana-discuss



More information about the OpenIndiana-discuss mailing list