[Bug 693996] New: basetransform: audioresample shutdown unit test fails with 'gst_audio_info_from_caps: caps != NULL' in transform_size

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat Feb 16 14:59:30 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=693996
  GStreamer | gst-plugins-base | git

           Summary: basetransform: audioresample shutdown unit test fails
                    with 'gst_audio_info_from_caps: caps != NULL'  in
                    transform_size
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: t.i.m at zen.co.uk
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


1575  outcaps = gst_pad_get_current_caps (trans->srcpad);

in default_prepare_output_buffer() can return NULL if the source pad has been
de-activated already, so check for that and bail out if needed.

This occasionally made the audioresample test_shutdown unit test fail like
this:


Starting program:
/home/tpm/gst/glib-git/gst-plugins-base/tests/check/elements/.libs/lt-audioresample 
Running suite(s): audioresample

** (lt-audioresample:25861): CRITICAL **: gst_audio_info_from_caps: assertion
`caps != NULL' failed

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x2aaaae1cd700 (LWP 25863)]
g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>,
args=args at entry=0x2aaaae1cc438) at gmessages.c:981
981          g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) thread apply all bt

Thread 3 (Thread 0x2aaaae1cd700 (LWP 25863)):
#0  g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, format=<optimized
out>, args=args at entry=0x2aaaae1cc438) at gmessages.c:981
#1  0x00002aaaabdd2a32 in g_log (log_domain=log_domain at entry=0x0,
log_level=log_level at entry=G_LOG_LEVEL_CRITICAL,
format=format at entry=0x2aaaabe3e33a "%s: assertion `%s' failed") at
gmessages.c:1010
#2  0x00002aaaabdd2a59 in g_return_if_fail_warning
(log_domain=log_domain at entry=0x0,
pretty_function=pretty_function at entry=0x2aaaaaf0ff90
"gst_audio_info_from_caps", expression=expression at entry=0x2aaaaaf0fceb "caps !=
NULL")
    at gmessages.c:1019
#3  0x00002aaaaaee6935 in gst_audio_info_from_caps
(info=info at entry=0x2aaaae1cc7e0, caps=caps at entry=0x0) at audio-info.c:183
#4  0x00002aaaad98dfd4 in gst_audio_resample_transform_size (base=0x68d010,
direction=GST_PAD_SINK, caps=<optimized out>, size=2048, othercaps=0x0,
othersize=0x2aaaae1cc9b8) at gstaudioresample.c:508
#5  0x00002aaaab154dcb in gst_base_transform_transform_size
(othersize=0x2aaaae1cc9b8, othercaps=0x0, size=<optimized out>, caps=0x69f630,
trans=0x68d010, direction=<optimized out>) at gstbasetransform.c:641
#6  default_prepare_output_buffer (trans=0x68d010, inbuf=0x6d27f0,
outbuf=0x2aaaae1ccae8) at gstbasetransform.c:1580
#7  0x00002aaaab1570eb in gst_base_transform_handle_buffer
(trans=trans at entry=0x68d010, inbuf=inbuf at entry=0x6d27f0,
outbuf=outbuf at entry=0x2aaaae1ccae8) at gstbasetransform.c:2031
#8  0x00002aaaab157aea in gst_base_transform_chain (pad=<optimized out>,
parent=<optimized out>, buffer=0x6d27f0) at gstbasetransform.c:2167
#9  0x00002aaaab5edbfa in gst_pad_chain_data_unchecked (data=0x6d27f0,
type=<optimized out>, pad=0x678750) at gstpad.c:3655
#10 gst_pad_push_data (pad=0x678520, type=type at entry=4112, data=<optimized
out>) at gstpad.c:3872
#11 0x00002aaaab5f4476 in gst_pad_push (pad=<optimized out>, buffer=<optimized
out>) at gstpad.c:3975
#12 0x00002aaaab157c1a in gst_base_transform_chain (pad=<optimized out>,
parent=<optimized out>, buffer=<optimized out>) at gstbasetransform.c:2203
#13 0x00002aaaab5edbfa in gst_pad_chain_data_unchecked (data=0x6d27f0,
type=<optimized out>, pad=0x6782f0) at gstpad.c:3655
#14 gst_pad_push_data (pad=pad at entry=0x6780c0, type=type at entry=4112,
data=<optimized out>) at gstpad.c:3872
#15 0x00002aaaab5f4476 in gst_pad_push (pad=pad at entry=0x6780c0,
buffer=<optimized out>) at gstpad.c:3975
#16 0x00002aaaab14f755 in gst_base_src_loop (pad=0x6780c0) at gstbasesrc.c:2723
#17 0x00002aaaab61bbc1 in gst_task_func (task=0x692000) at gsttask.c:316
#18 0x00002aaaabdefba2 in g_thread_pool_thread_proxy (data=<optimized out>) at
gthreadpool.c:309
#19 0x00002aaaabdef365 in g_thread_proxy (data=0x2aaab0002990) at gthread.c:798
#20 0x00002aaaac0afb50 in start_thread (arg=<optimized out>) at
pthread_create.c:304
#21 0x00002aaaac39fa7d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#22 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x2aaaadfcc700 (LWP 25862)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216
#1  0x00002aaaabe0ae55 in g_cond_wait_until (cond=cond at entry=0x623568,
mutex=mutex at entry=0x623560, end_time=end_time at entry=1005871549461) at
gthread-posix.c:859
#2  0x00002aaaabda1681 in g_async_queue_pop_intern_unlocked (queue=0x623560,
wait=wait at entry=1, end_time=1005871549461) at gasyncqueue.c:424
#3  0x00002aaaabda1d28 in g_async_queue_timeout_pop_unlocked (queue=<optimized
out>, timeout=timeout at entry=500000) at gasyncqueue.c:572
#4  0x00002aaaabdefaaa in g_thread_pool_wait_for_new_task (pool=0x623500) at
gthreadpool.c:264
#5  g_thread_pool_thread_proxy (data=<optimized out>) at gthreadpool.c:298
#6  0x00002aaaabdef365 in g_thread_proxy (data=0x67bd90) at gthread.c:798
#7  0x00002aaaac0afb50 in start_thread (arg=<optimized out>) at
pthread_create.c:304
#8  0x00002aaaac39fa7d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x2aaaad53a920 (LWP 25861)):
#0  __lll_lock_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x00002aaaac0b2354 in _L_lock_997 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00002aaaac0b21b7 in __pthread_mutex_lock (mutex=0x66e160) at
pthread_mutex_lock.c:82
#3  0x00002aaaab155f20 in gst_base_transform_activate
(trans=trans at entry=0x68d010, active=active at entry=0) at gstbasetransform.c:2300
#4  0x00002aaaab15610e in gst_base_transform_sink_activate_mode (pad=<optimized
out>, parent=<optimized out>, mode=GST_PAD_MODE_PUSH, active=0) at
gstbasetransform.c:2333
#5  0x00002aaaab5f11a3 in gst_pad_activate_mode (pad=pad at entry=0x678750,
mode=mode at entry=GST_PAD_MODE_PUSH, active=active at entry=0) at gstpad.c:1060
#6  0x00002aaaab5f1b1e in gst_pad_set_active (pad=0x678750, active=0) at
gstpad.c:949
#7  0x00002aaaab5d4fe3 in activate_pads (vpad=<optimized out>,
ret=0x7fffffffb890, active=0x7fffffffb8ec) at gstelement.c:2676
#8  0x00002aaaab5e4634 in gst_iterator_fold (it=it at entry=0x690ab0,
func=func at entry=0x2aaaab5d4fc0 <activate_pads>, ret=ret at entry=0x7fffffffb890,
user_data=user_data at entry=0x7fffffffb8ec) at gstiterator.c:614
#9  0x00002aaaab5d51e5 in iterator_activate_fold_with_resync
(iter=iter at entry=0x690ab0, user_data=user_data at entry=0x7fffffffb8ec,
func=0x2aaaab5d4fc0 <activate_pads>) at gstelement.c:2696
#10 0x00002aaaab5d7078 in gst_element_pads_activate
(element=element at entry=0x68d010, active=active at entry=0) at gstelement.c:2740
#11 0x00002aaaab5d73cc in gst_element_change_state_func (element=0x68d010,
transition=<optimized out>) at gstelement.c:2804
#12 0x00002aaaab5d910c in gst_element_change_state
(element=element at entry=0x68d010, transition=<optimized out>) at
gstelement.c:2591
#13 0x00002aaaab5d9ae1 in gst_element_set_state_func (element=0x68d010,
state=GST_STATE_READY) at gstelement.c:2547
#14 0x00002aaaab5c1469 in gst_bin_element_set_state (next=GST_STATE_READY,
current=GST_STATE_PAUSED, start_time=439791, base_time=1005871055932229,
element=0x68d010, bin=0x670100) at gstbin.c:2292
#15 gst_bin_change_state_func (element=0x670100,
transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstbin.c:2594
#16 0x00002aaaab5f7968 in gst_pipeline_change_state (element=0x670100,
transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstpipeline.c:471
#17 0x00002aaaab5d910c in gst_element_change_state
(element=element at entry=0x670100, transition=<optimized out>) at
gstelement.c:2591
#18 0x00002aaaab5d95df in gst_element_continue_state
(element=element at entry=0x670100, ret=ret at entry=GST_STATE_CHANGE_SUCCESS) at
gstelement.c:2302
#19 0x00002aaaab5d918f in gst_element_change_state
(element=element at entry=0x670100, transition=<optimized out>) at
gstelement.c:2628
#20 0x00002aaaab5d9ae1 in gst_element_set_state_func (element=0x670100,
state=GST_STATE_NULL) at gstelement.c:2547
#21 0x00000000004051a4 in test_shutdown (__i__=<optimized out>) at
elements/audioresample.c:440
#22 0x00002aaaab385bb3 in tcase_run_tfun_nofork (i=0, tc=0x66e2b0, sr=0x6151e0,
tfun=<optimized out>) at check_run.c:314
#23 srunner_iterate_tcase_tfuns (tc=0x66e2b0, sr=<optimized out>) at
check_run.c:181
#24 srunner_run_tcase (tc=0x66e2b0, sr=0x6151e0) at check_run.c:302
#25 srunner_iterate_suites (sr=0x6151e0, print_mode=<optimized out>) at
check_run.c:150
#26 srunner_run_all (sr=sr at entry=0x6151e0,
print_mode=print_mode at entry=CK_NORMAL) at check_run.c:561
#27 0x00002aaaab38065d in gst_check_run_suite (suite=suite at entry=0x62d6f0,
name=name at entry=0x407409 "audioresample", fname=fname at entry=0x4072b4
"elements/audioresample.c") at gstcheck.c:663
#28 0x0000000000402c61 in main (argc=1, argv=0x7fffffffc0e8) at
elements/audioresample.c:1115
(gdb) thread 3
[Switching to thread 3 (Thread 0x2aaaae1cd700 (LWP 25863))]
#0  g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, format=<optimized
out>, args=args at entry=0x2aaaae1cc438) at gmessages.c:981
981          g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) up
#1  0x00002aaaabdd2a32 in g_log (log_domain=log_domain at entry=0x0,
log_level=log_level at entry=G_LOG_LEVEL_CRITICAL,
format=format at entry=0x2aaaabe3e33a "%s: assertion `%s' failed") at
gmessages.c:1010
1010      g_logv (log_domain, log_level, format, args);
(gdb) up
#2  0x00002aaaabdd2a59 in g_return_if_fail_warning
(log_domain=log_domain at entry=0x0,
pretty_function=pretty_function at entry=0x2aaaaaf0ff90
"gst_audio_info_from_caps", expression=expression at entry=0x2aaaaaf0fceb "caps !=
NULL")
    at gmessages.c:1019
1019      g_log (log_domain,
(gdb) up
#3  0x00002aaaaaee6935 in gst_audio_info_from_caps
(info=info at entry=0x2aaaae1cc7e0, caps=caps at entry=0x0) at audio-info.c:183
183      g_return_val_if_fail (caps != NULL, FALSE);
(gdb) up
#4  0x00002aaaad98dfd4 in gst_audio_resample_transform_size (base=0x68d010,
direction=GST_PAD_SINK, caps=<optimized out>, size=2048, othercaps=0x0,
othersize=0x2aaaae1cc9b8) at gstaudioresample.c:508
508      ret &= gst_audio_info_from_caps (&out, othercaps);
(gdb) print *base->srcpad
$2 = {object = {object = {g_type_instance = {g_class = 0x613e90}, ref_count =
1, qdata = 0x0}, lock = {p = 0x68d960, i = {6871392, 0}}, name = 0x68d9d0
"src", parent = 0x68d010, flags = 288, control_bindings = 0x0, 
    control_rate = 100000000, last_sync = 18446744073709551615, _gst_reserved =
0x0}, element_private = 0x0, padtemplate = 0x6739e0, direction = GST_PAD_SRC,
stream_rec_lock = {p = 0x68da00, i = {0, 0}}, task = 0x0, block_cond = {
    p = 0x68d990, i = {0, 0}}, probes = {seq_id = 1, hook_size = 72, is_setup =
1, hooks = 0x0, dummy3 = 0x0, finalize_hook = 0x2aaaabdbc010
<default_finalize_hook>, dummy = {0x0, 0x0}}, mode = GST_PAD_MODE_NONE, 
  activatefunc = 0x2aaaab5f1c30 <gst_pad_activate_default>, activatedata = 0x0,
activatenotify = 0, activatemodefunc = 0x2aaaab156000
<gst_base_transform_src_activate_mode>, activatemodedata = 0x0,
activatemodenotify = 0, 
  peer = 0x678bb0, linkfunc = 0, linkdata = 0x0, linknotify = 0, unlinkfunc =
0, unlinkdata = 0x0, unlinknotify = 0, chainfunc = 0, chaindata = 0x0,
chainnotify = 0, chainlistfunc = 0x2aaaab5ee060 <gst_pad_chain_list_default>, 
  chainlistdata = 0x0, chainlistnotify = 0, getrangefunc = 0x2aaaab157970
<gst_base_transform_getrange>, getrangedata = 0x0, getrangenotify = 0,
eventfunc = 0x2aaaab155ad0 <gst_base_transform_src_event>, eventdata = 0x0, 
  eventnotify = 0, offset = 0, queryfunc = 0x2aaaad98ef00
<gst_audio_resample_query>, querydata = 0x0, querynotify = 0, iterintlinkfunc =
0x2aaaab5ee750 <gst_pad_iterate_internal_links_default>, iterintlinkdata = 0x0, 
  iterintlinknotify = 0, num_probes = 0, num_blocked = 0, priv = 0x678b90,
_gst_reserved = {0x0, 0x0, 0x0, 0x0}}


(Just dumping it here for posteriority/context, in case anyone thinks it should
be solved differently.)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list