#943335 aeolus throws std::bad_alloc on first launch

Package:
aeolus
Source:
aeolus
Description:
Synthesised pipe organ emulator
Submitter:
Francesco Ariis
Date:
2019-12-15 15:48:04 UTC
Severity:
important
#943335#5
Date:
2019-10-23 15:20:40 UTC
From:
To:
Dear Maintainer,

when run `aeolus -A` I see:
1. the GUI being displayed fine
2. stops being rendered/calculated (flashing each button for a brief time,
   once).

While "2." is running (towards the end of it) this error is shown on
the command line and aeolus exits

	f@x60s:~$ aeolus -A
	Warning: can't run ALSA thread in RT mode.
	Warning: can't run midi thread in RT mode.
	Warning: can't run model thread in RT mode.
	Reading '/usr/share/aeolus/stops/Aeolus/definition'
	Reading '/home/f/.aeolus-presets'
	terminate called after throwing an instance of 'std::bad_alloc'
	  what():  std::bad_alloc
	Aborted

Let me know if I can provide further info
-F

#943335#10
Date:
2019-12-15 15:36:57 UTC
From:
To:
Dear Maintainer,
I tried to have a look at this issue. I got this also on amd64 [2].

It looks like this is related to aeolus requesting its
memory never getting swapped out. [1]
Without this line a process does not give this fault.

But there is a "max locked memory" of 65536 kbytes
in place (ulimit -a).
Unfortunately aeolus need this limit at least raised
to 85000 kbytes.


I tested to raise this limit by doing following changes:

    /etc/security/limits.conf
        *                -       memlock         100000

    /etc/pam.d/common-session
        session required pam_limits.so


Kind regards,
Bernhard


[1] main.cc:195     if (mlockall (MCL_CURRENT | MCL_FUTURE)) fprintf (stderr, "Warning: memory lock failed.\n");

[2]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007f185578f535 in __GI_abort () at abort.c:79
#2  0x00007f1855b57983 in __gnu_cxx::__verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007f1855b5d8c6 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x00007f1855b5d901 in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x00007f1855b5db34 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7f1855c40690 <typeinfo for std::bad_alloc>, dest=0x7f1855b5be60 <std::bad_alloc::~bad_alloc()>) at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:95
#6  0x00007f1855b5e01c in operator new (sz=sz@entry=13004) at /build/gcc-8-Ev0Tjh/gcc-8-8.3.0/build/x86_64-linux-gnu/libstdc++-v3/include/bits/exception.h:63
#7  0x00007f1855b5e075 in operator new[] (sz=sz@entry=13004) at ../../../../src/libstdc++-v3/libsupc++/new_opv.cc:32
#8  0x0000561c3ea56477 in Pipewave::genwave (this=this@entry=0x7f18526c44a8, D=D@entry=0x7f1854328010, n=<optimized out>, fsamp=fsamp@entry=48000, fpipe=<optimized out>) at rankwave.cc:225
#9  0x0000561c3ea5771b in Rankwave::gen_waves (this=0x7f1854269010, D=0x7f1854328010, fsamp=48000, fbase=263.181396, scale=0x561c3ec5e2e0 <scale_meanquart>) at rankwave.cc:414
#10 0x0000561c3ea5015c in Slave::thr_main (this=0x561c40190d00) at slave.cc:53
#11 0x00007f1855f9ba3a in P_thread_entry_point (arg=<optimized out>) at p_thread.cc:38
#12 0x00007f1855c5dfa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#13 0x00007f18558664cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95