Some the same commit has been applied twice:
https://github.com/pure-data/pure-data/commit/3539e1d8d4d64149c2507527cfc44428246d34b4
https://github.com/pure-data/pure-data/commit/150858a65e7f580a32b39746338c0fb163faa80b
I also noticed that the ALLOCA macros have been duplicated. Not sure
what happened, but maybe a rebase that went wrong...
Finally, there is no need to define ALLOCA/FREEA in the first place as
we can just include "m_private_utils.h" :)
I've just pushed a fix to develop:
https://github.com/pure-data/pure-data/pull/2433/commits/6710a3441ff5ec73efef84dc2c65bbf9ecaf2c76
Christof
On 24.09.2024 20:32, Miller Puckette wrote:
Wow, you found an 18-monti-old crasher bug, congrats :)
In s_audio_jack.c I see:
FREEA(t_sample, muxbuffer, muxbufsize, MAX_ALLOCA_SAMPLES);
#ifdef THREADSIGNAL
sys_semaphore_post(jack_sem);
#endif
FREEA(t_sample, muxbuffer, muxbufsize, MAX_ALLOCA_SAMPLES);
I think the first of the two FREEA calls needs to be deleted. You can
fix it locally and I'll eithr fix it upstream or wait for Iohannes to :)
Miller
On 9/24/24 8:24 PM, Marco Matteo Markidis wrote:
Dear all,
I am experiencing a strange bug in Pd 0.55.1.
When I launch Pd, it crashes.
Running it with Valgrind, I got the following message:
==83263== Thread 4:
==83263== Invalid free() / delete / delete[] / realloc()
==83263== at 0x48461EF: free (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==83263== by 0x1D9539: jack_polling_callback (s_audio_jack.c:164)
==83263== by 0x4A7AECC: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4A7AB87: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4A97F2F: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4B46731: start_thread (pthread_create.c:447)
==83263== by 0x4BC10FF: clone (clone.S:100)
==83263== Address 0x535b180 is 0 bytes inside a block of size 65,536
free'd
==83263== at 0x48461EF: free (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==83263== by 0x1D9522: jack_polling_callback (s_audio_jack.c:160)
==83263== by 0x4A7AECC: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4A7AB87: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4A97F2F: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4B46731: start_thread (pthread_create.c:447)
==83263== by 0x4BC10FF: clone (clone.S:100)
==83263== Block was alloc'd at
==83263== at 0x48489F3: calloc (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==83263== by 0x188F16: getbytes (m_memory.c:21)
==83263== by 0x1D94F8: jack_polling_callback (s_audio_jack.c:115)
==83263== by 0x4A7AECC: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4A7AB87: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4A97F2F: ??? (in
/usr/lib/x86_64-linux-gnu/libjack.so.0.1.0)
==83263== by 0x4B46731: start_thread (pthread_create.c:447)
==83263== by 0x4BC10FF: clone (clone.S:100)
==83263==
Running it via gdb, I am getting the following message:
Thread 4 "pd" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff74926c0 (LWP 109587)]
__pthread_kill_implementation (threadid=<optimized out>,
signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
Then, I build Pd tag 0.54.1 commit 0259d003 and everything works
fine, while I am getting the same error directly from Pd tag
0.55-0test1 commit 46e3ec2d.
I manage to open Pd in callback mode while avoiding polling.
Here some details about my setup:
Debian 12, Linux kernel 6.10
Jackd2 installed via apt, v 1.9.22
Pd installed via apt, 0.55.1, and then built locally using
--enable-debug --enable-jack as flags for the configuration. Source
code cloned from git.
I also tried to search (randomly) in my local machine where
pthread_kill.c is located, without success. libpthread is in:
/usr/lib/x86_64-linux-gnu/ .
I took a look at recent emails and issues on Github but I do not see
anything relevant with this issue.
My next step is to compare and study the relevant code (starting from
s_audio_jack.c) that differs between 0.54.1 and 0.55.0test1.
If someone has some ideas, they are appreciated.
Additionally, if useful, I can report an issue on Github. Honestly, I
am stuck while understanding if it is an issue on my local machine,
such that an issue may be noise on the main repo.
Best regards,
Marco
---
[email protected] - the Pd developers' mailinglist
https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/[email protected]/message/HEUGAEWO362BTGYTHZAH7KH3QQNL4RHN/__;!!Mih3wA!EpF9MsDcuEQf0-bPANFyZZLIAY-yeYGi9rvLDchKVjuvOsMvMDQtttVud2ReRka7S-ItWE7jgqFNsqCB$
---
[email protected] - the Pd developers' mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/PEYH7KMVTSJSO3VNF3K3W2OP4HOLU6TS/
---
[email protected] - the Pd developers' mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/53JNUQRWCQAPIVSOCWHE6XTESKKDW2BN/