[Csnd] UDP server crash
Date | 2021-03-27 13:50 |
From | Eduardo Moguillansky |
Subject | [Csnd] UDP server crash |
I get a very consistent crash when sending code via UDP with the following .csd. If I change the instr number from 8800 to 8799 or lower, there is no crash. Any clue about the reason? # udp.csd <CsoundSynthesizer> <CsOptions> -odac --port=9100 </CsOptions> <CsInstruments> sr = 44100 ksmps = 64 nchnls = 2 0dbfs = 1 instr 8800 turnoff endin </CsInstruments> <CsScore> </CsScore> </CsoundSynthesizer> $ csound udp.csd # baz.inc instr baz println "baz" turnoff endin $ cat baz.inc | nc -u localhost 9100 |
Date | 2021-03-27 14:06 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
Nothing comes to mind immediately, but have you tried using a number instrument instrument instead of "baz" and see if it makes any difference?
Prof. Victor Lazzarini
Maynooth University
Ireland
On Mar 27, 2021, at 1:50 PM, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
|
Date | 2021-03-27 14:15 |
From | Eduardo Moguillansky |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
Yes, with numbered instruments there is no crash On 27.03.21 15:06, Victor Lazzarini
wrote:
Nothing comes to mind immediately, but have you tried using a number instrument instrument instead of "baz" and see if it makes any difference? |
Date | 2021-03-27 14:22 |
From | Steven Yi |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
I tested here on Mac (10.14.6, Intel) and did not get any crash. I had just pulled the latest from develop and rebuilt csound prior to testing. What version of Csound are you using? On Sat, Mar 27, 2021 at 10:15 AM Eduardo Moguillansky |
Date | 2021-03-27 14:34 |
From | Eduardo Moguillansky |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
I tested on linux, --Csound version 6.15 (double samples) Mar 27 2021 On 27.03.21 15:22, Steven Yi wrote: > I tested here on Mac (10.14.6, Intel) and did not get any crash. I > had just pulled the latest from develop and rebuilt csound prior to > testing. > > What version of Csound are you using? > > On Sat, Mar 27, 2021 at 10:15 AM Eduardo Moguillansky > |
Date | 2021-03-27 15:09 |
From | John ff |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
Have you run under valgrind? Might give a clue as where to look.
On 27 Mar 2021, at 14:35, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote: I tested on linux, --Csound version 6.15 (double samples) Mar 27 2021 |
Date | 2021-03-27 15:15 |
From | Guillermo Senna |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
On Ubuntu Studio, I also see this problem with: --Csound version 6.14 (double samples) Apr 25
2020 [commit: fb2e61cf2bea6caf5117c30c120430b0fa4ee56c]
On 27/3/21 11:34, Eduardo Moguillansky
wrote:
I tested on linux, --Csound version 6.15 (double samples) Mar 27 2021 |
Date | 2021-03-27 15:38 |
From | Steven Yi |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
I rebuilt on Linux Mint with latest from develop and can reproduce the issue. I rebuilt a debug build and with gdb has this: writing 512 sample blks of 64-bit floats to dac SECTION 1: instr baz uses instrument number 1 Thread 2 "csound" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff599d700 (LWP 9311)] 0x00007ffff7f132a8 in named_instr_assign_numbers (csound=0x55555555b2a0, engineState=0x7ffff0031820) at /home/steven/work/csound/Engine/csound_orc_compile.c:1190 1190 while ((!engineState->instrtxtp[num] || (gdb) bt #0 0x00007ffff7f132a8 in named_instr_assign_numbers (csound=0x55555555b2a0, engineState=0x7ffff0031820) at /home/steven/work/csound/Engine/csound_orc_compile.c:1190 #1 0x00007ffff7f149ed in csoundCompileTreeInternal (csound=0x55555555b2a0, root=0x7ffff00317c0, async=1) at /home/steven/work/csound/Engine/csound_orc_compile.c:1693 #2 0x00007ffff7f155fd in csoundCompileOrcInternal (csound=0x55555555b2a0, str=0x7ffff509c020 "instr baz\n println \"baz\"\n turnoff\nendin\n \n", async=1) at /home/steven/work/csound/Engine/csound_orc_compile.c:1934 #3 0x00007ffff7e0f234 in csoundCompileOrcAsync (csound=0x55555555b2a0, str=0x7ffff509c020 "instr baz\n println \"baz\"\n turnoff\nendin\n \n") at /home/steven/work/csound/Top/threadsafe.c:489 #4 0x00007ffff7e103dc in udp_recv (pdata=0x555555797180) at /home/steven/work/csound/Top/server.c:213 #5 0x00007ffff7bc9609 in start_thread (arg= |
Date | 2021-03-27 15:58 |
From | Eduardo Moguillansky |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
This does not seem related to UDPr. I can reproduce a similar
crash using ctcsound, so it might be some kind of run condition
when assigning numbers to named instruments. import ctcsound orc = """ sr = 44100 ksmps = 64 0dbfs = 1 instr 8700 turnoff endin """ csound = ctcsound.Csound() options = ["-odac"] for opt in options: csound.setOption(opt) csound.compileOrc(orc) csound.start() pt = ctcsound.CsoundPerformanceThread(csound.csound()) pt.play() for i in range(10): csound.compileOrc(fr''' instr foo{i} turnoff endin ''') On 27.03.21 16:38, Steven Yi wrote:
I rebuilt on Linux Mint with latest from develop and can reproduce the issue. I rebuilt a debug build and with gdb has this: writing 512 sample blks of 64-bit floats to dac SECTION 1: instr baz uses instrument number 1 Thread 2 "csound" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff599d700 (LWP 9311)] 0x00007ffff7f132a8 in named_instr_assign_numbers (csound=0x55555555b2a0, engineState=0x7ffff0031820) at /home/steven/work/csound/Engine/csound_orc_compile.c:1190 1190 while ((!engineState->instrtxtp[num] || (gdb) bt #0 0x00007ffff7f132a8 in named_instr_assign_numbers (csound=0x55555555b2a0, engineState=0x7ffff0031820) at /home/steven/work/csound/Engine/csound_orc_compile.c:1190 #1 0x00007ffff7f149ed in csoundCompileTreeInternal (csound=0x55555555b2a0, root=0x7ffff00317c0, async=1) at /home/steven/work/csound/Engine/csound_orc_compile.c:1693 #2 0x00007ffff7f155fd in csoundCompileOrcInternal (csound=0x55555555b2a0, str=0x7ffff509c020 "instr baz\n println \"baz\"\n turnoff\nendin\n \n", async=1) at /home/steven/work/csound/Engine/csound_orc_compile.c:1934 #3 0x00007ffff7e0f234 in csoundCompileOrcAsync (csound=0x55555555b2a0, str=0x7ffff509c020 "instr baz\n println \"baz\"\n turnoff\nendin\n \n") at /home/steven/work/csound/Top/threadsafe.c:489 #4 0x00007ffff7e103dc in udp_recv (pdata=0x555555797180) at /home/steven/work/csound/Top/server.c:213 #5 0x00007ffff7bc9609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #6 0x00007ffff7af0293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Not sure why that would be a problem on Linux but didn't happen on Mac. I did double check on Mac and realized that my first test was off (nc required 127.0.0.1 instead of localhost) but the results was the same with no crash. On Sat, Mar 27, 2021 at 11:15 AM Guillermo Senna <gsenna@gmail.com> wrote:On Ubuntu Studio, I also see this problem with: --Csound version 6.14 (double samples) Apr 25 2020 [commit: fb2e61cf2bea6caf5117c30c120430b0fa4ee56c] On 27/3/21 11:34, Eduardo Moguillansky wrote: I tested on linux, --Csound version 6.15 (double samples) Mar 27 2021 On 27.03.21 15:22, Steven Yi wrote: I tested here on Mac (10.14.6, Intel) and did not get any crash. I had just pulled the latest from develop and rebuilt csound prior to testing. What version of Csound are you using? On Sat, Mar 27, 2021 at 10:15 AM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote: Yes, with numbered instruments there is no crash On 27.03.21 15:06, Victor Lazzarini wrote: Nothing comes to mind immediately, but have you tried using a number instrument instrument instead of "baz" and see if it makes any difference? Prof. Victor Lazzarini Maynooth University Ireland On Mar 27, 2021, at 1:50 PM, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote: *Warning* This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe. I get a very consistent crash when sending code via UDP with the following .csd. If I change the instr number from 8800 to 8799 or lower, there is no crash. Any clue about the reason? # udp.csd <CsoundSynthesizer> <CsOptions> -odac --port=9100 </CsOptions> <CsInstruments> sr = 44100 ksmps = 64 nchnls = 2 0dbfs = 1 instr 8800 turnoff endin </CsInstruments> <CsScore> </CsScore> </CsoundSynthesizer> $ csound udp.csd # baz.inc instr baz println "baz" turnoff endin $ cat baz.inc | nc -u localhost 9100 Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted hereCsound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2021-03-27 17:30 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] UDP server crash |
That’s what I suspected. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 27 Mar 2021, at 15:58, Eduardo Moguillansky |