GNOME Bugzilla – Bug 620197
[xvimagesink] occasional buffer metadata writable warnings
Last modified: 2011-06-26 19:03:35 UTC
When playing a movie, somewhere in the middle: Program received signal SIGINT, Interrupt. 0x00007ffff16fc123 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=200) at ../sysdeps/unix/sysv/linux/poll.c:87 87 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory. in ../sysdeps/unix/sysv/linux/poll.c (gdb) break g_logv if log_level == G_LOG_LEVEL_WARNING Breakpoint 1 at 0x7ffff25adb50: file /tmp/buildd/glib2.0-2.24.1/glib/gmessages.c, line 430. (gdb) c Continuing. [Thread 0x7fffd1a44710 (LWP 4284) exited]
+ Trace 222178
Thread 140736830711568 (LWP 4281)
(gdb) print *buffer $1 = {mini_object = {instance = {g_class = 0xb41070}, refcount = 2, flags = 0, _gst_reserved = 0x0}, data = 0x7fffd11f3000 "0001222334456667667888889;;;:778;=?@@?ABDDEFGGHHFFFGGHHILLKKLLLNMMMNOOOPPQRRSSTUTUWXXZZZ[\\^^_acdddefgf_YZekmnppprsttstvxwxwyyz|~}~~\200\201\202\202\201\202\203\204\205\206\206\207\207\212\211\212\211\212\213\214\214\216\216\217\217\217\220\221\222\220\220\222\221\223\217\210cFCA@?>=<<;::::999988889999::::;:"..., size = 329472, timestamp = 613904958333, duration = 41708333, caps = 0x1925800, offset = 14719, offset_end = 18446744073709551615, malloc_data = 0x0, free_func = 0x7ffff25ac2d0 <IA__g_free>, parent = 0x0, _gst_reserved = {0x0, 0x0}}
Created attachment 162438 [details] [review] xvimagesink: Make sure that the buffer metadata is writable before changing it Fixes bug #620197.
This should fix it but I'm not sure if this interferes somehow with the xvimagesink buffer subclassing. Also, the buffers should all have a refcount of 1 at that point because they're either newly allocated or from the freed xvimagesink buffer pool.
Because of that last sentence I'd reject this patch. The ref count must be 1 and working around that case does solve the warning, but not the bug. That said, I have absolutely no idea why the refcount would be != 1. For that we'd need more refcount debugging output. A rough guess is a race somewhere, where some code refs the buffer immediately after unreffing it. Is that thing reproducible? Does it only happen for certain types of files?
Setting as NEEDINFO because there's not enough information to debug this.
Well, it still happens occasionally, and almost always at the end of a movie. Hard to believe no one else has seen this. But sure, not enough info. Probably some refcounting issue in gst-ffmpeg.