Bug#925553: audacity: segfault in NumericTextCtrl::ValueToControls() ()

2019-03-28 Thread Bernhard Übelacker
Control: retitle 925553 audacity: with ssh X-forwarding: 
PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' failed.



Hello Jeff Cliff,
I looked at this backtrace without deeper knowledge of
audacity and the problem might not be a segfault in
mentioned funciton, instead a SIGABRT from pulseaudio.

Instead I guess it is in the first backtrace of yours,
showing in libportaudio.so.2.

By the way, installing the debug symbols [1] would be helpful
for the maintainers to get an idea of where the problem is.
In this case package libportaudio2-dbgsym.

Having audacity running in gdb with an active breakpoint
at PaAlsaStreamComponent_BeginPolling and just continuing
a few times leads to such a backtrace.
(But my "network" connection was just into a VM on the same host.)

Did you also debug audacity or did you let it run freely?
Is your ssh connection over a slow network link?

Should this bug be reassigned to pulseaudio?

Kind regards,
Bernhard


[1] https://wiki.debian.org/HowToGetABacktrace#Installing_the_debugging_symbols


(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x73661535 in __GI_abort () at abort.c:79
#2  0x7366140f in __assert_fail_base (fmt=0x7fffe92021d2 "%s%s%s:%u: 
%s%sZusicherung »%s« nicht erfüllt.\n%n", assertion=0x77d7a66e "ret == 
self->nfds", file=0x77d74038 "src/hostapi/alsa/pa_linux_alsa.c", line=3641, 
function=) at assert.c:92
#3  0x7366f0f2 in __GI___assert_fail 
(assertion=assertion@entry=0x77d7a66e "ret == self->nfds", 
file=file@entry=0x77d74038 "src/hostapi/alsa/pa_linux_alsa.c", 
line=line@entry=3641, function=function@entry=0x77d7abe0 
<__PRETTY_FUNCTION__.12102> "PaAlsaStreamComponent_BeginPolling") at 
assert.c:101
#4  0x77d5c1c3 in PaAlsaStreamComponent_BeginPolling (pfds=, self=) at src/hostapi/alsa/pa_linux_alsa.c:3641
#5  0x77d69e85 in PaAlsaStreamComponent_BeginPolling (pfds=, self=) at src/hostapi/alsa/pa_linux_alsa.c:3931
#6  PaAlsaStream_WaitForFrames (self=self@entry=0x56867c00, 
framesAvail=framesAvail@entry=0x7fffe8007720, 
xrunOccurred=xrunOccurred@entry=0x7fffe800771c) at 
src/hostapi/alsa/pa_linux_alsa.c:3802
#7  0x77d6a63e in CallbackThreadFunc (userData=0x56867c00) at 
src/hostapi/alsa/pa_linux_alsa.c:4274
#8  0x73b34fa3 in start_thread (arg=) at 
pthread_create.c:486
#9  0x7373882f in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

# Buster amd64 qemu VM 2019-03-28

apt update
apt dist-upgrade





apt install dpkg-dev devscripts systemd-coredump alsa-utils audacity pulseaudio 
libportaudio2-dbgsym gdb elfutils elfutils-dbgsym libelf1-dbgsym strace 
binutils mc


$ ssh -X -p benutzer@$LOCALIP
benutzer@debian:~$ audacity
-> record -> no crash -> cursor is moving as usual


##


cp -a /usr/lib/x86_64-linux-gnu/libportaudio.so.2.0.0 /tmp/libportaudio.so.2.0.0
cp -a /usr/lib/debug/.build-id/4d/7ecbcc022ad848e4da5356dfeaf76b5230731d.debug 
/tmp/7ecbcc022ad848e4da5356dfeaf76b5230731d.debug
LANG=C eu-unstrip --force /tmp/libportaudio.so.2.0.0 
/tmp/7ecbcc022ad848e4da5356dfeaf76b5230731d.debug
eu-unstrip: cannot write output file: invalid section alignment
# Doh!

mkdir /home/benutzer/source/elfutils/orig -p
cd/home/benutzer/source/elfutils/orig
apt source elfutils
cd

mkdir /home/benutzer/source/libc6/orig -p
cd/home/benutzer/source/libc6/orig
apt source libc6
cd

grep "invalid section alignment" . -rn

grep "ELF_E_INVALID_SHENTSIZE_IDX" . -rn

grep "ELF_E_INVALID_SHENTSIZE" . -rn

gdb -q -ex 'set width 0' -ex 'set pagination off' -ex 'directory 
/home/benutzer/source/elfutils/orig/elfutils-0.176/libelf' -ex 'b 
elf32_updatenull.c:399' -ex 'run' --args eu-unstrip --force 
/tmp/libportaudio.so.2.0.0 /tmp/7ecbcc022ad848e4da5356dfeaf76b5230731d.debug

(gdb) bt
#0  __libelf_seterrno (value=value@entry=36) at elf_error.c:336
#1  0x77fb3f7a in __elf64_updatenull_wrlock 
(elf=elf@entry=0x55564f30, change_bop=change_bop@entry=0x7fffd2ec, 
shnum=shnum@entry=35) at elf32_updatenull.c:215
#2  0x77fb2fb0 in elf_update (elf=0x55564f30, cmd=ELF_C_WRITE) at 
elf_update.c:209
#3  0xbb67 in copy_elided_sections (unstripped=, 
stripped=, stripped_ehdr=, bias=) 
at unstrip.c:2070
#4  0xc1a3 in handle_file (output_file=0x0, create_dirs=, stripped=0x55563900, stripped_ehdr=0x7fffe200, 
unstripped=0x55564f30) at unstrip.c:2132
#5  0xc3b9 in handle_explicit_files (output_file=0x0, 
create_dirs=, force=) at unstrip.c:2223
#6  0x6c81 in main (argc=, argv=0x7fffe558) at 
unstrip.c:2558

1: x/i $pc
=> 0x77faa520 <__libelf_seterrno>:  push   %rbx


##




mkdir /home/benutzer/source/libportaudio2/orig -p
cd/home/benutzer/source/libportaudio2/orig
apt source libportaudio2
cd




script -c "gdb -q -ex 'set width 0' -ex 'set pagination off' -ex 'b main' -ex 
'run' --args audacity" -a gdb-dissassemble_$(date 

Bug#925553: audacity: segfault in NumericTextCtrl::ValueToControls() ()

2019-03-26 Thread Jeff Cliff
Package: audacity
Version: 2.2.2-1+b1
Severity: normal

Dear Maintainer,

What I did:

ssh -X (hostname)  //ssh'd to remote host on network
audacity   // ran audacity on remote host with broadcast of UI to 
local host
recorded audio // hit red record button

What happened:

segfault/crash

recording host was using the following hardware:

*-multimedia
 description: Multimedia audio controller
 product: 82801G (ICH7 Family) AC'97 Audio Controller
 vendor: Intel Corporation
 physical id: 1e.2
 bus info: pci@:00:1e.2
 version: 01
 width: 32 bits
 clock: 33MHz
 capabilities: pm bus_master cap_list
 configuration: driver=snd_intel8x0 latency=0
 resources: irq:23 ioport:ec00(size=256) ioport:e8c0(size=64) 
memory:feabfa00-feabfbff memory:feabf900-feabf9ff

Audacity crashed/segfaulted in the following stack frames:

(gdb) 
(gdb) bt
#0  0x7f02396718bb in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:50
#1  0x7f023965c535 in __GI_abort () at abort.c:79
#2  0x7f023965c40f in __assert_fail_base
(fmt=0x7f02397beee0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
assertion=0x7f023dd7566e "ret == self->nfds", file=0x7f023dd6f038 
"src/hostapi/alsa/pa_linux_alsa.c", line=3641, function=) at 
assert.c:92
#3  0x7f023966a0f2 in __GI___assert_fail
(assertion=0x7f023dd7566e "ret == self->nfds", file=0x7f023dd6f038 
"src/hostapi/alsa/pa_linux_alsa.c", line=3641, function=0x7f023dd75be0 
"PaAlsaStreamComponent_BeginPolling") at assert.c:101
#4  0x7f023dd571c3 in  () at /usr/lib/x86_64-linux-gnu/libportaudio.so.2
#5  0x7f023dd64e85 in  () at /usr/lib/x86_64-linux-gnu/libportaudio.so.2
#6  0x7f023dd6563e in  () at /usr/lib/x86_64-linux-gnu/libportaudio.so.2
#7  0x7f0239b2ffa3 in start_thread (arg=) at 
pthread_create.c:486
#8  0x7f023973382f in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread 2
[Switching to thread 2 (Thread 0x7f022e9a7700 (LWP 13226))]
bt
#0  0x7f0239b39bf0 in __GI___nanosleep (requested_time=0x7f022e9a65b0, 
remaining=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
28  ../sysdeps/unix/sysv/linux/nanosleep.c: No such file or directory.
(gdb) bt
#0  0x7f0239b39bf0 in __GI___nanosleep (requested_time=0x7f022e9a65b0, 
remaining=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x7f023cfe3fdc in wxMicroSleep(unsigned long) () at 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2  0x55d080a4e662 in AudioThread::Entry() ()
#3  0x7f023cfd8d72 in wxThread::CallEntry() () at 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4  0x7f023cfe2374 in  () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#5  0x7f0239b2ffa3 in start_thread (arg=) at 
pthread_create.c:486
#6  0x7f023973382f in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread 3
[Switching to thread 3 (Thread 0x7f022f1a8700 (LWP 13225))]
#0  0x7f0239b39bf0 in __GI___nanosleep (requested_time=0x7f022f1a75b0, 
remaining=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
28  in ../sysdeps/unix/sysv/linux/nanosleep.c
(gdb) bt
#0  0x7f0239b39bf0 in __GI___nanosleep (requested_time=0x7f022f1a75b0, 
remaining=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x7f023cfe3fdc in wxMicroSleep(unsigned long) () at 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2  0x55d080a482ef in MidiThread::Entry() ()
#3  0x7f023cfd8d72 in wxThread::CallEntry() () at 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4  0x7f023cfe2374 in  () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#5  0x7f0239b2ffa3 in start_thread (arg=) at 
pthread_create.c:486
#6  0x7f023973382f in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread 4
[Switching to thread 4 (Thread 0x7f022ffa9600 (LWP 13219))]
#0  0x55d080a0f5d0 in void std::__cxx11::basic_string, std::allocator 
>::_M_construct(wchar_t*, wchar_t*, std::forward_iterator_tag) ()
(gdb) bt
#0  0x55d080a0f5d0 in void std::__cxx11::basic_string, std::allocator 
>::_M_construct(wchar_t*, wchar_t*, std::forward_iterator_tag) ()
#1  0x55d080e19255 in NumericTextCtrl::ValueToControls() ()
#2  0x55d080e19330 in NumericTextCtrl::SetValue(double) ()
#3  0x55d080d7461b in SelectionBar::ValuesToControls() ()
#4  0x55d080b1f9ff in AudacityProject::TP_DisplaySelection() ()
#5  0x55d080dc7b56 in PlayIndicatorOverlay::OnTimer(wxCommandEvent&) ()
#6  0x7f023d00a7ae in 
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, 
wxEvtHandler*, wxEvent&) ()
at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7  0x7f023d00ab2a in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () at 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8  0x7f023d00abc0 in wxEvtHandler::TryHereOnly(wxEvent&) () at 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9