Csound Csound-dev Csound-tekno Search About

[Cs-dev] VC02 segfaulting

Date2006-04-07 00:54
FromIain Duncan
Subject[Cs-dev] VC02 segfaulting
I am also segfaulting on the vco2 opcode. I do not get any messages
about the opcode not being found, just a segfault. The same csd without
vco2 is working fine.

Thanks
Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-07 08:03
From"Steven Yi"
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-07 09:35
FromIstvan Varga
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-07 11:37
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests
Attachmentsvco2.csd  
> I am also segfaulting on the vco2 opcode. I do not get any messages
> about the opcode not being found, just a segfault. The same csd without
> vco2 is working fine.

I have done more tests on this and can't get vco2 to work anymore. I do
not think it is an opcodedir problem because vco and moogvcf are working
fine. I could not get vco2 to work with any settings, both for real time
output and rendering to wave file. Attached is my test csd file, I also
tested with a seperate orc/sco but got the same results. This is from a
fresh checkout and build today. System is Gentoo64 linux. My csound
output is below:

Thanks
Iain

Localisation of messages is disabled, using default language.
time resolution is 1000.000 ns
ALSA real-time audio and MIDI module for Csound by Istvan Varga
JACK real-time audio module for Csound by Istvan Varga
PortAudio real-time audio module for Csound
WARNING: '/csound5/_csnd.so' is not a Csound plugin library
WARNING: '/csound5/libcompress.so' is not a Csound plugin library
0dBFS level = 32768.0
Csound version 5.01.1 beta (float samples) Mar 16 2006
libsndfile-1.0.11
UnifiedCSD:  vco2.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  /tmp/filesFG033.orc
scorename: /tmp/fileBGSfja.sco
rtaudio: ALSA module enabled
orch compiler:
21 lines read
        instr   1
Elapsed time at end of orchestra compile: real: 0.001s, CPU: 0.000s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 0.001s, CPU: 0.000s
Csound version 5.01.1 beta (float samples) Mar 16 2006
displays suppressed
0dBFS level = 32768.0
orch now loaded
audio buffered in 128 sample-frame blocks
ALSA output: total buffer size: 512, period size: 128
writing 512-byte blks of shorts to dac
SECTION 1:
ftable 1:
new alloc for instr 1:
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score.              overall amps:      0.0      0.0
           overall samples out of range:        0        0
0 errors in performance
Elapsed time at end of performance: real: 0.268s, CPU: 0.010s
0 512-byte soundblks of shorts written to dac
Removing temporary file /tmp/fileRh2zyg.srt ...
Removing temporary file /tmp/fileBGSfja.sco ...
Removing temporary file /tmp/filesFG033.orc ...

Date2006-04-07 14:17
FromIstvan Varga
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-07 16:21
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests
> I tested here on a 32-bit system using Csound compiled for doubles and
> your file ran without problems, so I'm guessing it's got something to
> do with the 64bit system.  If you've got the time, I'd recommend
> compiling with noDebug=0 and running with gdb to find out where in the
> code the segfault is happening.

I just tried rebuilding without "build for 64 bit word" and got the same
results. I try with no debug tomorrow. Anyone else have any problems
like this on a 64 bit linux?

Thanks
iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-07 20:44
FromIstvan Varga
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-07 20:45
From"Steven Yi"
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-07 21:46
From"Steven Yi"
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-08 01:47
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests
 > Did vco2 work on your 64 bit machine earlier ? The code was not
changed for
> a long time, so for example if the 5.00 release worked, then it is possible
> that the problems are somewhere in your setup and not in the vco2 code which
> is still the same. A common problem is having some old files from previous
> - especially beta - installations of Csound in the way.

I'm not sure whether I had tested it on this set up yet. I will try
eradicating files again. Which files might be causing problems? Maybe it
would be good to have an uninstaller too! ;)

Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-08 03:28
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests

Istvan Varga wrote:
> On Friday 07 April 2006 17:21, Iain Duncan wrote:
> 
> 
>>>I tested here on a 32-bit system using Csound compiled for doubles and
>>>your file ran without problems, so I'm guessing it's got something to
>>>do with the 64bit system.  If you've got the time, I'd recommend
>>>compiling with noDebug=0 and running with gdb to find out where in the
>>>code the segfault is happening.
>>
>>I just tried rebuilding without "build for 64 bit word" and got the same
>>results. I try with no debug tomorrow. Anyone else have any problems
>>like this on a 64 bit linux?
> 
> 
> Did vco2 work on your 64 bit machine earlier ? The code was not changed for
> a long time, so for example if the 5.00 release worked, then it is possible
> that the problems are somewhere in your setup and not in the vco2 code which
> is still the same. A common problem is having some old files from previous
> - especially beta - installations of Csound in the way.

This does not appear to be the problem. I eradicated everything, and
still the same results.

Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-08 03:29
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests

Istvan Varga wrote:
> On Friday 07 April 2006 09:03, Steven Yi wrote:
> 
> 
>>I tested here on a 32-bit system using Csound compiled for doubles and
>>your file ran without problems, so I'm guessing it's got something to
>>do with the 64bit system.  If you've got the time, I'd recommend
>>compiling with noDebug=0 and running with gdb to find out where in the
>>code the segfault is happening.
> 
> 
> Yes, sending a backtrace would probably be of some help.

I will try this, however I do not know what "running with gdb" means. Is
that the gnu debugger? And how do I use it, what should I report?

Thanks
Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-08 03:53
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests
Thanks Steven and Istvan. Here are the results, with csound built for
noDebug=0

(gdb) r
Starting program: /usr/local/bin/csound vco2.csd
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 22046)]
Localisation of messages is disabled, using default language.
time resolution is 1000.000 ns
WARNING: '/csound5/_csnd.so' is not a Csound plugin library
WARNING: /csound5/_CsoundVST.so: cannot open shared object file: No such
file or directory
WARNING: could not open library '/csound5/_CsoundVST.so' (-1)
WARNING: '/csound5/libcompress.so' is not a Csound plugin library
ALSA real-time audio and MIDI module for Csound by Istvan Varga
JACK real-time audio module for Csound by Istvan Varga
PortAudio real-time audio module for Csound
0dBFS level = 32768.0
Csound version 5.01.1 beta (float samples) Apr  7 2006
libsndfile-1.0.11
UnifiedCSD:  vco2.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  /tmp/fileUd9GDx.orc
scorename: /tmp/fileTSn9HC.sco
rtaudio: ALSA module enabled
orch compiler:
21 lines read
        instr   1
Elapsed time at end of orchestra compile: real: 0.001s, CPU: 0.000s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 0.001s, CPU: 0.000s
Csound version 5.01.1 beta (float samples) Apr  7 2006
displays suppressed
0dBFS level = 32768.0
orch now loaded
audio buffered in 128 sample-frame blocks
ALSA output: total buffer size: 512, period size: 128
writing 512-byte blks of shorts to dac
SECTION 1:
ftable 1:
new alloc for instr 1:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 22046)]
0x0000000000440ed5 in ibfstages (ioptr=0x7055c0, M=9, Utbl=0x800000002,
Ustride=16, NDiffU=64, StageCnt=16) at OOps/fftlib.c:1829
1829    OOps/fftlib.c: No such file or directory.
        in OOps/fftlib.c
(gdb) bt
#0  0x0000000000440ed5 in ibfstages (ioptr=0x7055c0, M=9,
Utbl=0x800000002, Ustride=16, NDiffU=64, StageCnt=16)
    at OOps/fftlib.c:1829
#1  0x0000000000441c5a in ifftrecurs (ioptr=0x6fd590, M=9,
Utbl=0x7055c0, Ustride=0, NDiffU=12, StageCnt=1024)
    at OOps/fftlib.c:2127
#2  0x000000000044482e in csoundInverseRealFFT (csound=0x5b10a0,
buf=0x6fd590, FFTsize=3) at OOps/fftlib.c:3104
#3  0x00002aaaabbd3c87 in vco2_tables_create (csound=0x5b10a0,
waveform=101, base_ftable=32767, tp=0x82000023d0)
    at Opcodes/oscbnk.c:1520
#4  0x00002aaaabbd46f4 in vco2set (csound=0x5b10a0, p=0x61ad20) at
Opcodes/oscbnk.c:1917
#5  0x0000000000416c09 in insert (csound=0x5b10a0, insno=5991240,
newevtp=) at Engine/insert.c:189
#6  0x000000000041a28a in process_score_event (p=0x5b10a0,
evt=, rtEvt=0) at Engine/musmon.c:634
#7  0x000000000041a85d in sensevents (csound=0x41) at Engine/musmon.c:790
#8  0x000000000040452d in csoundPerform (csound=0x5b6c50) at
Top/csound.c:1130
#9  0x0000000000403e8d in main (argc=0, argv=0x200000000) at
frontends/csound/csound_main.c:109
(gdb)



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-08 07:25
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests
> This is interesting. There were some problems in fftlib.c that caused
> crashes on 64 bit platforms, reported almost a year ago, but those were
> believed to be fixed for a long time. Could you also compile with
> noDebug=0 customCCFLAGS="-O0" ? The line numbers do not seem to agree
> with the sources exactly, and gdb is often not reliable when run on
> optimized code.

When I did the above, it worked. For good measure I recompiled again
with out customCCFLAGS="-O0" and it was again broken.

> By the way, did you ever have success using vco2 with a 64 bit build
> on x86_64 ? If yes, it is somewhat odd that it no longer works now.

I probably never had it working. Lost track of what had been tested
since the new install. Please let me know if there is anything else I
can do to help with this issue, and in the meantime I guess I'll use no
optimization!

Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-08 09:30
FromIstvan Varga
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-09 09:29
FromIstvan Varga
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-09 11:55
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests
> So, do you mean the code works OK without optimization, but crashes if
> compiled with optimization ? That sounds like a possible compiler bug;
> what compiler version is used in your current distribution ? You could
> also experiment with various compiler flags to see when the crash occurs
> and when it does not (example customCCFLAGS settings: "-O", "-O2",
> "-O2 -fno-strict-aliasing").

Can you tell me what I should be using for the gcc3opt flags? I really
don't understand what my options are between all those. My gcc version
number gives the following:

Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/specs
Configured with: /var/tmp/portage/gcc-3.4.3-r1/work/gcc-3.4.3/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.3
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib
--disable-checking --disable-werror --disable-libunwind-exceptions
--enable-multilib --disable-libgcj --enable-languages=c,c++,f77
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 3.4.3 20041125 (Gentoo 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)

> But you do have 64 bit machines for a long time, and use vco2 frequently,
> if I recall correctly. Or is it really the first time you tried vco2 on an
> AMD64 build ?

I had it working running 32bit linux on this chip, which was fine. I
have only recently switched to pure 64 bit gentoo ( and you can see why
I waited! ). If I can't get csound performing better than with 32 bit, I
will likely switch back as that's really the only reason for the fast
machine.

Thanks
Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-09 23:08
From"Steven Yi"
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  

Date2006-04-10 03:47
FromIain Duncan
SubjectRe: [Cs-dev] VC02 segfaulting tests
>>>So, do you mean the code works OK without optimization, but crashes if
>>>compiled with optimization ? That sounds like a possible compiler bug;
>>>what compiler version is used in your current distribution ? You could
>>>also experiment with various compiler flags to see when the crash occurs
>>>and when it does not (example customCCFLAGS settings: "-O", "-O2",
>>>"-O2 -fno-strict-aliasing").
>>
>>Can you tell me what I should be using for the gcc3opt flags?
> 
> 
> For debugging, gcc3opt should not be used. Otherwise, the gcc manual
> documents these CPU types for -march:
> 
>     _k8, opteron, athlon64, athlon-fx_
>           AMD K8 core based CPUs with x86-64 instruction set support.
>           (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and
>           64-bit instruction set extensions.)
> 
> Try using one of the above (for example, gcc3opt=k8), and see if that
> works. Or, if these all fail, just add buildRelease=1 or use customCCFLAGS.

Sorry, I'm still confused. Where do I set that option? ( gcc3opt=k8 ) I
assume I set it to 1 in SConstruct, and then in one of the custom.py
options?

Thanks
Iain


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-11 17:44
Fromjjbenham@chicagoguitar.com (Jeremiah Benham)
SubjectRe: [Cs-dev] VC02 segfaulting tests
AttachmentsNone  None  csound-5.01.ebuild