Bug#842796: ogg123 always segfaults after playing file
Ian Jackson
ian.jackson at eu.citrix.com
Tue Nov 1 13:39:33 UTC 2016
Petter Reinholdtsen writes ("Re: Bug#842796: ogg123 always segfaults after playing file"):
> [Ian Jackson]
> > It works fine under valgrind (!).
>
> How strange. It ran without crashing here too, for what that is worth.
> Were there any messages at all from valgrind? Uninitialized memory or
> anything vagely related?
No. But I ran it under helgrind and that produced a lot of output.
The final error "Thread #1 unlocked a not-locked lock at 0x805D6CC"
mentions
==32253== by 0x805125C: status_reset_output_lock (in /usr/bin/ogg123)
which corresponds to:
> #3 0x0805125d in status_reset_output_lock () at status.c:342
Ian.
mariner:d> valgrind --tool=helgrind ogg123 -d null Example.ogg
==32253== Helgrind, a thread error detector
==32253== Copyright (C) 2007-2013, and GNU GPL'd, by OpenWorks LLP et al.
==32253== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==32253== Command: ogg123 -d null Example.ogg
==32253==
Audio Device: Null output
Playing: Example.ogg
==32253== ---Thread-Announcement------------------------------------------
==32253==
==32253== Thread #1 is the program's root thread
==32253==
==32253== ---Thread-Announcement------------------------------------------
==32253==
==32253== Thread #2 was created
==32253== at 0x42E0CF5: clone (clone.S:100)
==32253== by 0x413216D: do_clone.constprop.2 (createthread.c:75)
==32253== by 0x413351A: create_thread (createthread.c:245)
==32253== by 0x413351A: pthread_create@@GLIBC_2.1 (pthread_create.c:606)
==32253== by 0x402E570: pthread_create_WRK (hg_intercepts.c:270)
==32253== by 0x804B937: buffer_thread_start (in /usr/bin/ogg123)
==32253== by 0x804F7D1: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253==
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during read of size 4 at 0x49F386C by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C38C: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253==
==32253== This conflicts with a previous write of size 4 by thread #2
==32253== Locks held: none
==32253== at 0x804B320: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253== Address 0x49f386c is 188 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
Ogg Vorbis stream: 2 channel, 44100 Hz
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during write of size 4 at 0x49F386C by thread #2
==32253== Locks held: none
==32253== at 0x804B320: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253==
==32253== This conflicts with a previous read of size 4 by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C38C: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f386c is 188 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during read of size 4 at 0x49F386C by thread #2
==32253== Locks held: none
==32253== at 0x804B2F7: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253==
==32253== This conflicts with a previous write of size 4 by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C3BF: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f386c is 188 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during read of size 4 at 0x4A14E0C by thread #2
==32253== Locks held: none
==32253== at 0x804B302: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253==
==32253== This conflicts with a previous write of size 4 by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C381: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x4a14e0c is 4 bytes inside a block of size 20 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B229: malloc_action (in /usr/bin/ogg123)
==32253== by 0x804C335: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during read of size 4 at 0x4A14E08 by thread #2
==32253== Locks held: none
==32253== at 0x804B309: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253==
==32253== This conflicts with a previous write of size 4 by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C384: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x4a14e08 is 0 bytes inside a block of size 20 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B229: malloc_action (in /usr/bin/ogg123)
==32253== by 0x804C335: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during read of size 4 at 0x4A14E18 by thread #2
==32253== Locks held: none
==32253== at 0x804B31D: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253==
==32253== This conflicts with a previous write of size 4 by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C3BF: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x4a14e18 is 16 bytes inside a block of size 20 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B229: malloc_action (in /usr/bin/ogg123)
==32253== by 0x804C335: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during read of size 4 at 0x4A14F8C by thread #2
==32253== Locks held: none
==32253== at 0x804B335: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253==
==32253== This conflicts with a previous write of size 4 by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C381: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x4a14f8c is 4 bytes inside a block of size 20 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B229: malloc_action (in /usr/bin/ogg123)
==32253== by 0x804C335: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== ----------------------------------------------------------------
==32253==
==32253== Lock at 0x49F37BC was first observed
==32253== at 0x402F398: pthread_mutex_init (hg_intercepts.c:518)
==32253== by 0x804B803: buffer_reset (in /usr/bin/ogg123)
==32253== by 0x804F7C5: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x49f37bc is 12 bytes inside a block of size 136,275 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B68D: buffer_create (in /usr/bin/ogg123)
==32253== by 0x804AB88: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== Possible data race during read of size 4 at 0x4A14F88 by thread #2
==32253== Locks held: none
==32253== at 0x804B340: execute_actions (in /usr/bin/ogg123)
==32253== by 0x804C048: buffer_thread_func (in /usr/bin/ogg123)
==32253== by 0x402E6B2: mythread_wrapper (hg_intercepts.c:234)
==32253== by 0x4132EFA: start_thread (pthread_create.c:309)
==32253== by 0x42E0D0D: clone (clone.S:129)
==32253==
==32253== This conflicts with a previous write of size 4 by thread #1
==32253== Locks held: 1, at address 0x49F37BC
==32253== at 0x804C384: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Address 0x4a14f88 is 0 bytes inside a block of size 20 alloc'd
==32253== at 0x402A3AC: malloc (vg_replace_malloc.c:296)
==32253== by 0x804B229: malloc_action (in /usr/bin/ogg123)
==32253== by 0x804C335: buffer_append_action_at_end (in /usr/bin/ogg123)
==32253== by 0x804F4B8: display_statistics (in /usr/bin/ogg123)
==32253== by 0x804FBC6: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Block was alloc'd by thread #1
==32253==
==32253== ----------------------------------------------------------------(EOS)
==32253==
==32253== Thread #1: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==32253== at 0x402D255: pthread_cond_signal_WRK (hg_intercepts.c:936)
==32253== by 0x804BABA: buffer_thread_kill (in /usr/bin/ogg123)
==32253== by 0x804FA11: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253==
==32253== ----------------------------------------------------------------(EOS)
==32253==
==32253== Thread #1 unlocked a not-locked lock at 0x805D6CC
==32253== at 0x402F936: pthread_mutex_unlock (hg_intercepts.c:707)
==32253== by 0x805125C: status_reset_output_lock (in /usr/bin/ogg123)
==32253== by 0x804FA48: play (in /usr/bin/ogg123)
==32253== by 0x804AC27: main (in /usr/bin/ogg123)
==32253== Lock at 0x805D6CC was first observed
==32253== at 0x402F604: pthread_mutex_lock (hg_intercepts.c:593)
==32253== by 0x80514FB: status_message (in /usr/bin/ogg123)
==32253== by 0x804F62B: print_audio_devices_info (in /usr/bin/ogg123)
==32253== by 0x804AAFC: main (in /usr/bin/ogg123)
==32253== Address 0x805d6cc is 0 bytes inside data symbol "output_lock"
==32253==
==32253==
Done.
==32253==
==32253== For counts of detected and suppressed errors, rerun with: -v
==32253== Use --history-level=approx or =none to gain increased speed, at
==32253== the cost of reduced accuracy of conflicting-access information
==32253== ERROR SUMMARY: 17 errors from 10 contexts (suppressed: 3900 from 100)
mariner:d>
More information about the pkg-xiph-maint
mailing list