<input>(0): Error: Signal Segmentation fault in phase Global Optimization -- processing aborte

i tried to make the cuda program on gtx285.But it could’nt make and got the following error .

OS: CentOS 5.3

Cuda Toolkit: 2.2

Cuda SDK: 2.2

[codebox][gtx285 gpu-file]$ make

Signal: Segmentation fault in Global Optimization – Expression Reshaping phase.

(0): Error: Signal Segmentation fault in phase Global Optimization – Expression Reshaping – processing aborted

*** Internal stack backtrace:

/usr/local/cuda/open64/lib//be [0x6a350f]

/usr/local/cuda/open64/lib//be [0x6a4159]

/usr/local/cuda/open64/lib//be [0x6a38ad]

/usr/local/cuda/open64/lib//be [0x6a4af6]

/lib64/libc.so.6 [0x35b7e30280]

/usr/local/cuda/open64/lib//be [0x40f418]

/usr/local/cuda/open64/lib//be [0x411cad]

/usr/local/cuda/open64/lib//be [0x411f65]

/usr/local/cuda/open64/lib//be [0x41201d]

/usr/local/cuda/open64/lib//be [0x4138ee]

/usr/local/cuda/open64/lib//be [0x4df673]

/usr/local/cuda/open64/lib//be [0x4df859]

/usr/local/cuda/open64/lib//be [0x42b956]

/usr/local/cuda/open64/lib//be [0x42bbc0]

/usr/local/cuda/open64/lib//be [0x42bcbd]

/usr/local/cuda/open64/lib//be [0x42c076]

/usr/local/cuda/open64/lib//be [0x42c25d]

/usr/local/cuda/open64/lib//be [0x42167a]

/usr/local/cuda/open64/lib//be [0x47821d]

/usr/local/cuda/open64/lib//be [0x4043a2]

/usr/local/cuda/open64/lib//be [0x40502e]

/usr/local/cuda/open64/lib//be [0x406081]

/usr/local/cuda/open64/lib//be [0x4073ad]

/lib64/libc.so.6(__libc_start_main+0xf4) [0x35b7e1d974]

/usr/local/cuda/open64/lib//be [0x4037ea]

nvopencc INTERNAL ERROR: /usr/local/cuda/open64/lib//be died due to signal 4

make: *** [obj/release/Urgbe_blend.cu.o] error 255

[/codebox]

i could make this program on 9500GS at cuda version 2.0.

Does someone have any clue what is this about?

Thanks.

I am getting the same error when compiling a particular code with CUDA 2.2 on 64 bit Fedora 10, but compiles OK with CUDA 2.1 on OSX 10.5.7 …
Any suggestions?

I need a repro case to be able to give to the compiler team…

I’m not sure if it’s exactly the same thing, but I’ve run into a similar problem. The attached tarball compiles on CUDA2.0, but fails on CUDA 2.2

[font=“Courier New”]$ nvcc --version

nvcc: NVIDIA ® Cuda compiler driver

Copyright © 2005-2009 NVIDIA Corporation

Built on Thu_Apr__9_05:05:52_PDT_2009

Cuda compilation tools, release 2.2, V0.2.1221[/font]
nvccsegfault.tgz.txt (1.19 KB)

Hi,

Here is my example, it compiles OK with “nvcc -c” for CUDA 2.1 but fails for CUDA 2.2

Hope this will give a clue to resolve this issue…
nvcc_error_sample.zip (6.79 KB)

Dear (Tim ?) tmurray,

Is there any news from compiler wizards if there is an easy way of reshaping our code to avoid nvcc 2.2 from crashing?

Thanks,

 Demq

I also have a similar problem. I have whittled the code down to:

[codebox]global void shape_rhs(double *X_quad, double *lrhs, int n)

{

int i,ele;

double func_result[3];

for(i=0; i<3; i++) {

  func_result[i] = 2*(2-1+0.25)*M_PI*cos(0.5*M_PI*X_quad[(ele*6)+2*i]);

  func_result[i] = func_result[i]*cos(M_PI*X_quad[(ele*6)+2*i+1]);

  func_result[i] = func_result[i]+0.5*M_PI*sin(0.5*M_PI*X_quad[(ele*6)+2*i]);

  func_result[i] = -func_result[i];

}

*lrhs=func_result[0];

}

int main(int argc, char **argv) {

double *k_X_quad, *k_lrhs;

int n;

shape_rhs<<<128,128>>>(k_X_quad, k_lrhs, n);

}

~ [/codebox]

When I compile with nvcc -arch sm_13 crashtest.cu -o crashtest, i get the following error:

[codebox]Signal: Segmentation fault in Global Optimization – Expression Reshaping phase.

(0): Error: Signal Segmentation fault in phase Global Optimization – Expression Reshaping – processing aborted

*** Internal stack backtrace:

/usr/local/cuda/open64/lib//be [0x6a350f]

/usr/local/cuda/open64/lib//be [0x6a4159]

/usr/local/cuda/open64/lib//be [0x6a38ad]

/usr/local/cuda/open64/lib//be [0x6a4af6]

/lib/libc.so.6 [0x2b189a686100]

/usr/local/cuda/open64/lib//be [0x40f418]

/usr/local/cuda/open64/lib//be [0x411cad]

/usr/local/cuda/open64/lib//be [0x411f65]

/usr/local/cuda/open64/lib//be [0x41201d]

/usr/local/cuda/open64/lib//be [0x4138ee]

/usr/local/cuda/open64/lib//be [0x4df673]

/usr/local/cuda/open64/lib//be [0x4df859]

/usr/local/cuda/open64/lib//be [0x42b956]

/usr/local/cuda/open64/lib//be [0x42bbc0]

/usr/local/cuda/open64/lib//be [0x42bcbd]

/usr/local/cuda/open64/lib//be [0x42c076]

/usr/local/cuda/open64/lib//be [0x42c25d]

/usr/local/cuda/open64/lib//be [0x42167a]

/usr/local/cuda/open64/lib//be [0x47821d]

/usr/local/cuda/open64/lib//be [0x4043a2]

/usr/local/cuda/open64/lib//be [0x40502e]

/usr/local/cuda/open64/lib//be [0x406081]

/usr/local/cuda/open64/lib//be [0x4073ad]

/lib/libc.so.6(__libc_start_main+0xf4) [0x2b189a6721c4]

/usr/local/cuda/open64/lib//be [0x4037ea]

nvopencc INTERNAL ERROR: /usr/local/cuda/open64/lib//be died due to signal 4[/codebox]

I can avoid this happening either by just compiling with nvcc crashtest.cu -o crashtest, in which case the compilation seems to go OK, or by moving the last statement out of the loop:

[codebox]global void shape_rhs(double *X_quad, double *lrhs, int n)

{

int i,ele;

double func_result[3];

for(i=0; i<3; i++) {

  func_result[i] = 2*(2-1+0.25)*M_PI*cos(0.5*M_PI*X_quad[(ele*6)+2*i]);

  func_result[i] = func_result[i]*cos(M_PI*X_quad[(ele*6)+2*i+1]);

  func_result[i] = func_result[i]+0.5*M_PI*sin(0.5*M_PI*X_quad[(ele*6)+2*i]);

}

for(i=0; i<3; i++)

  func_result[i] = -func_result[i];

*lrhs=func_result[0];

}

int main(int argc, char **argv) {

double *k_X_quad, *k_lrhs;

int n;

shape_rhs<<<128,128>>>(k_X_quad, k_lrhs, n);

}[/codebox]

Then compilation with nvcc -arch sm_13 seems to go well.

I am using the following nvcc version:

nvcc: NVIDIA ® Cuda compiler driver

Copyright © 2005-2009 NVIDIA Corporation

Built on Thu_Apr__9_05:05:52_PDT_2009

Cuda compilation tools, release 2.2, V0.2.1221

I have come across this problem several times now - my general strategy for working round it is to break a loop in to two parts, which usually works. This problem always seems to occur when using automatic arrays and writing to their elements inside a loop. An alternative workaround seems to be to declare func_result as volatile, which also seems to work. Is it possible that the compiler is somehow trying to take the address of a register in this scenario?

Huh? Are you trying to write to host memory (*k_lrhs) from within a device kernel?
Looks like k_lrhs doesn’t even point to anything (no storage allocated).

EDIT: nevermind, you probably didn’t post the full code :)
N.

That’s correct, I just made it as simple as possible to reproduce :-)

I’d like to reproduce it, but I’m stuck with compute capability 1.1 over here <img src=‘http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/crying.gif’ class=‘bbc_emoticon’ alt=‘:’(’ />

N.

You don’t need the card to reproduce this bug, just the compiler. Just use nvcc -arch sm_13 crash.cu -o crash and you should get a segfault.