What should I do when (CUDA 7.5's) nvcc/cudafe++ crashes with a segfault?

einpoklum

I was compiling some teplated CUDA code today, when suddenly, I get:

nvcc foo.cu -dc -o foo.o -m64 --std c++11 -gencode arch=compute_30,code=compute_30  -I/usr/local/cuda/include  -I/path/to/includes 
Segmentation fault (core dumped)

This is with CUDA 7.5 and GCC 4.9.3 on Debian Stretch. Boost and CUB are not actually used by the code triggering the segfault.

running gdb, I get:

...
Reading symbols from /usr/local/cuda/bin/cudafe++...(no debugging symbols found)...done.
[New LWP 26725]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `cudafe++ --allow_managed --m64 --gnu_version=40903 --c++11 --parse_templates --'.

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000458b48 in ?? ()
(gdb) bt
#0  0x0000000000458b48 in ?? ()
#1  0x0000000000447989 in ?? ()
#2  0x0000000000449a77 in ?? ()
#3  0x0000000000444d6b in ?? ()
#4  0x00000000004467f1 in ?? ()
#5  0x0000000000446bd5 in ?? ()
#6  0x00000000004536e7 in ?? ()
#7  0x0000000000446c95 in ?? ()
#8  0x00000000004536e7 in ?? ()
#9  0x0000000000446c95 in ?? ()
#10 0x0000000000448403 in ?? ()
#11 0x000000000040b042 in ?? ()
#12 0x00007f3637c17610 in __libc_start_main (main=0x40af50, argc=14, argv=0x7ffd24a32058, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd24a32048) at libc-start.c:291
#13 0x0000000000401769 in ?? ()
#14 0x00007ffd24a32048 in ?? ()
#15 0x000000000000001c in ?? ()
#16 0x000000000000000e in ?? ()
#17 0x00007ffd24a33e7b in ?? ()
#18 0x00007ffd24a33e84 in ?? ()
#19 0x00007ffd24a33e94 in ?? ()
#20 0x00007ffd24a33e9a in ?? ()
#21 0x00007ffd24a33eae in ?? ()
#22 0x00007ffd24a33eb6 in ?? ()
#23 0x00007ffd24a33ec8 in ?? ()
#24 0x00007ffd24a33ed3 in ?? ()
#25 0x00007ffd24a33ee5 in ?? ()
#26 0x00007ffd24a33f16 in ?? ()
#27 0x00007ffd24a33f27 in ?? ()
#28 0x00007ffd24a33f56 in ?? ()
#29 0x00007ffd24a33f6c in ?? ()
#30 0x00007ffd24a33f9b in ?? ()
#31 0x0000000000000000 in ?? ()

So that's not very useful. What can I try doing to avoid this segfault? Or to figure out why it happens?

Edit: I just noticed this similar question - but it doesn't have an answer yet.

einpoklum

It seems like the reason for the crash is failure to prevent an inappropriate use of the using keyword. Here's a non-MCVE (which I might make into an MCVE later):

enum class foo : bool { foolish = false, snafu = true };

template <typename T> class bar {
public:
    using foo::foolish;
    using foo::snafu;
}

This is incorrect C++, and should make the compiler give out an error, but for some reason, and possibly due to combination with more code not in this snippet, that didn't happen. Instead, cudafe++ is tricked into accepting that, gets confused and crashes.

As @talonmies suggested, will try to make a proper bug report to nVIDIA. ...

Edit: It's proving difficult to reproduce now :-(

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

StackApplet crashes when loading stats. What do I do?

From Dev

What should I do when Ubuntu freezes?

From Dev

Why does cudaGraphicsGLRegisterBuffer segfault when I change my cuda kernel?

From Dev

what's wrong with my database? what should i do?

From Dev

What should I do when I get 'There are stopped jobs' error?

From Dev

What should I do when I encounter internal compile error?

From Dev

What should I do with Grunt's node_modules directory when I am publisihing my project to GitHub?

From Dev

What should I do with Grunt's node_modules directory when I am publisihing my project to GitHub?

From Dev

What should I do when users log out?

From Dev

What should I do when inheriting IDisposable with nothing to dispose?

From Dev

what should I do when DocumentFilter not listening for changes?

From Dev

What should I do when someone dereferences my end() iterator?

From Dev

What does <f:facet> do and when should I use it?

From Dev

What should I do when "Package-Requires" are too long?

From Dev

What should I do when <tr> has rowspan

From Dev

What should I do when hard "disk failure is imminent"?

From Dev

What should I do when write returns smaller size?

From Dev

Received DUP when using ping. What should I do?

From Dev

apply patch when asked `File to patch`, what should I do?

From Dev

What does share operator do in RxJava? When should I use it?

From Dev

What should I do to retrieve the hyperlink to Confluence user's home?

From Dev

What constraints should I be aware of when generating mio's Tokens?

From Dev

When installing additional printer 32-bit drivers fails on Windows 7 64-bit I get the error "Selected printer driver not found", what should I do?

From Dev

What kind of hardware do I need to have 4-5 CUDA graphic cards on Windows?

From Dev

If Downcasting Should Be Avoided, What Should I Do?

From Dev

dplyr crashes when using summarise with segfault error

From Dev

How do I recover when Compiz crashes?

From Dev

What should I do when I feel the urge to use object-style polymorphic messaging in Haskell?

From Dev

what should i do to create custom menu appear when i click the marker instead of deleting it

Related Related

  1. 1

    StackApplet crashes when loading stats. What do I do?

  2. 2

    What should I do when Ubuntu freezes?

  3. 3

    Why does cudaGraphicsGLRegisterBuffer segfault when I change my cuda kernel?

  4. 4

    what's wrong with my database? what should i do?

  5. 5

    What should I do when I get 'There are stopped jobs' error?

  6. 6

    What should I do when I encounter internal compile error?

  7. 7

    What should I do with Grunt's node_modules directory when I am publisihing my project to GitHub?

  8. 8

    What should I do with Grunt's node_modules directory when I am publisihing my project to GitHub?

  9. 9

    What should I do when users log out?

  10. 10

    What should I do when inheriting IDisposable with nothing to dispose?

  11. 11

    what should I do when DocumentFilter not listening for changes?

  12. 12

    What should I do when someone dereferences my end() iterator?

  13. 13

    What does <f:facet> do and when should I use it?

  14. 14

    What should I do when "Package-Requires" are too long?

  15. 15

    What should I do when <tr> has rowspan

  16. 16

    What should I do when hard "disk failure is imminent"?

  17. 17

    What should I do when write returns smaller size?

  18. 18

    Received DUP when using ping. What should I do?

  19. 19

    apply patch when asked `File to patch`, what should I do?

  20. 20

    What does share operator do in RxJava? When should I use it?

  21. 21

    What should I do to retrieve the hyperlink to Confluence user's home?

  22. 22

    What constraints should I be aware of when generating mio's Tokens?

  23. 23

    When installing additional printer 32-bit drivers fails on Windows 7 64-bit I get the error "Selected printer driver not found", what should I do?

  24. 24

    What kind of hardware do I need to have 4-5 CUDA graphic cards on Windows?

  25. 25

    If Downcasting Should Be Avoided, What Should I Do?

  26. 26

    dplyr crashes when using summarise with segfault error

  27. 27

    How do I recover when Compiz crashes?

  28. 28

    What should I do when I feel the urge to use object-style polymorphic messaging in Haskell?

  29. 29

    what should i do to create custom menu appear when i click the marker instead of deleting it

HotTag

Archive