public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31502]  New: gcc/g++ randomly seg faults, sometimes freezes the entire machine
@ 2007-04-07 11:45 ye dot patrick at gmail dot com
  2007-04-07 14:31 ` [Bug c++/31502] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ye dot patrick at gmail dot com @ 2007-04-07 11:45 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5439 bytes --]

Machine info:
  CPU: AMD 4200+ (64 bit)
  RAM: 3G DDR

OS info:
  Type: Linux
  Distro: Ubuntu Edgy 6.10
  Kernel: 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006 i686 GNU/Linu
  Bit: 32 bit OS

Overview of the problem: gcc and g++ would frequently and randomly seg faults,
and this would sometimes freeze the machine and force the "reset" button to be
pressed.

Code on which these errors have occurred: mplayer 1.0pre8, Blender.

Example of compilation command that produces the error:

gcc -c -O3 -g  -Wdeclaration-after-statement -Wall -Wno-switch
-DHAVE_AV_CONFIG_H -I..
-I/home/jingy/install/blender/cvs_new/blender/extern/ffmpeg/libavutil
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -DHAVE_AV_CONFIG_H
-DMOZ_NOT_NET snow.c -o
/home/jingy/install/blender/cvs_new/blender/obj/linux-glibc2.4-i386/extern/ffmpeg/libavcodec/snow.o


Output of the compiler:

---

snow.c: In function ‘pred_mv’:
snow.c:1961: warning: suggest parentheses around + or - inside shift
snow.c:1962: warning: suggest parentheses around + or - inside shift
snow.c:1963: warning: suggest parentheses around + or - inside shift
snow.c:1964: warning: suggest parentheses around + or - inside shift
snow.c:1965: warning: suggest parentheses around + or - inside shift
snow.c:1966: warning: suggest parentheses around + or - inside shift
snow.c: In function ‘encode_q_branch’:
snow.c:1994: warning: initialization discards qualifiers from pointer target
type
snow.c:1995: warning: initialization discards qualifiers from pointer target
type
snow.c:1996: warning: initialization discards qualifiers from pointer target
type
snow.c:1997: warning: initialization discards qualifiers from pointer target
type
snow.c: In function ‘encode_q_branch2’:
snow.c:2221: warning: initialization discards qualifiers from pointer target
type
snow.c:2222: warning: initialization discards qualifiers from pointer target
type
snow.c: In function ‘decode_q_branch’:
snow.c:2274: warning: initialization discards qualifiers from pointer target
type
snow.c:2275: warning: initialization discards qualifiers from pointer target
type
snow.c: In function ‘pred_block’:
snow.c:2497: warning: suggest parentheses around && within ||
snow.c: In function ‘ff_snow_inner_add_yblock’:
snow.c:2538: warning: left shift count is negative
snow.c: In function ‘add_yblock_buffered’:
snow.c:2567: warning: unused variable ‘y’
snow.c:2567: warning: unused variable ‘x’
snow.c:2555: warning: unused variable ‘dst’
snow.c: In function ‘add_yblock’:
snow.c:2809: warning: initialization discards qualifiers from pointer target
type
snow.c:2821: warning: left shift count is negative
snow.c: In function ‘predict_slice_buffered’:
snow.c:2896: warning: passing argument 5 of ‘add_yblock_buffered’ discards
qualifiers from pointer target type
snow.c: In function ‘get_block_bits’:
snow.c:3028: warning: initialization discards qualifiers from pointer target
type
snow.c:3029: warning: initialization discards qualifiers from pointer target
type
snow.c: In function ‘get_block_rd’:
snow.c:3065: warning: unused variable ‘obmc’
snow.c: In function ‘get_4block_rd’:
snow.c:3182: warning: passing argument 2 of ‘add_yblock’ discards qualifiers
from pointer target type
snow.c:3168: warning: unused variable ‘b_height’
snow.c: In function ‘common_init’:
snow.c:3872: warning: assignment from incompatible pointer type
snow.c:3872: warning: assignment from incompatible pointer type
snow.c:3873: warning: assignment from incompatible pointer type
snow.c:3873: warning: assignment from incompatible pointer type
snow.c:3874: warning: assignment from incompatible pointer type
snow.c:3874: warning: assignment from incompatible pointer type
snow.c:3875: warning: assignment from incompatible pointer type
snow.c:3875: warning: assignment from incompatible pointer type
snow.c: At top level:
snow.c:1327: warning: ‘spatial_compose53i’ defined but not used
snow.c:1494: warning: ‘spatial_compose97i’ defined but not used
snow.c: In function ‘get_dc’:
snow.c:3021: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[3]: ***
[/home/jingy/install/blender/cvs_new/blender/obj/linux-glibc2.4-i386/extern/ffmpeg/libavcodec/snow.o]
Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1

---

The output of the preprocessor (snow.i) can be downloaded from:

http://www.csse.unimelb.edu.au/~jingy/download/snow.i


Sometimes these errors would be immediately followed by a kernel warning
stating  some memory protection has failed. Sometimes these errors would be so
severe that no other processes can be run.

Please feel free to contact me for further information.

Thanks a lot.

Patrick


-- 
           Summary: gcc/g++ randomly seg faults, sometimes freezes the
                    entire machine
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ye dot patrick at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/31502] gcc/g++ randomly seg faults, sometimes freezes the entire machine
  2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
@ 2007-04-07 14:31 ` pinskia at gcc dot gnu dot org
  2007-04-07 14:43 ` ye dot patrick at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-07 14:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-04-07 15:30 -------
If GCC is causing your machine to freeze, there is only one possibility, your
machine is over heating and this is not a GCC bug.  I think you need to check
your hardware.  Also if you are getting messages from the kernel, it shoulds
like you really need to check your hardware.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/31502] gcc/g++ randomly seg faults, sometimes freezes the entire machine
  2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
  2007-04-07 14:31 ` [Bug c++/31502] " pinskia at gcc dot gnu dot org
@ 2007-04-07 14:43 ` ye dot patrick at gmail dot com
  2007-04-07 15:29 ` bangerth at dealii dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ye dot patrick at gmail dot com @ 2007-04-07 14:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ye dot patrick at gmail dot com  2007-04-07 15:43 -------
I did think overheating was an issue, but then I turned off the computer for
half an hour then turned it back on to compile the same code and the same error
occurred. The temperature of my room at the time was below 20 degrees, so I'm
not totally convinced that this is an overheating issue.

I'm willing to accept this as an hardware/OS issue, but then am I really that
unlikely to be the only person having this kind of problem? In other words, has
this type of problems been seen before and if so, how were they resolved?

Any help would be greatly appreciated.

Thanks a lot.

Patrick


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/31502] gcc/g++ randomly seg faults, sometimes freezes the entire machine
  2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
  2007-04-07 14:31 ` [Bug c++/31502] " pinskia at gcc dot gnu dot org
  2007-04-07 14:43 ` ye dot patrick at gmail dot com
@ 2007-04-07 15:29 ` bangerth at dealii dot org
  2007-04-08  3:39 ` ye dot patrick at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2007-04-07 15:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bangerth at dealii dot org  2007-04-07 16:29 -------
(In reply to comment #2)
> I'm willing to accept this as an hardware/OS issue, but then am I really that
> unlikely to be the only person having this kind of problem? In other words, has
> this type of problems been seen before and if so, how were they resolved?

There's an easy way to figure out whether it's the compiler's fault or that
of your machine: does the error always happen on the same file, with the
exact same error message? Since gcc is a deterministic program, it would have
to cause the same problem every time you compile the same file.

On the other hand, if the error appears randomly even though you compile
the same set of files, then this clearly can't be gcc's fault.

It certainly sounds like a hardware problem (memory, overheating, disk, ...)
W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/31502] gcc/g++ randomly seg faults, sometimes freezes the entire machine
  2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
                   ` (2 preceding siblings ...)
  2007-04-07 15:29 ` bangerth at dealii dot org
@ 2007-04-08  3:39 ` ye dot patrick at gmail dot com
  2007-05-07  1:54 ` bgoodr+gccbugzilla at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ye dot patrick at gmail dot com @ 2007-04-08  3:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ye dot patrick at gmail dot com  2007-04-08 04:39 -------
The error occurs extremely often on the same files, but not all the time. For
example, if I was to compile snow.c (the file that generated the error in my
initial report) 10 times, it would have the same error 6-8 times.

Furthermore, if you read the bottom of the error message, it says:

"The bug is not reproducible, so it is likely a hardware or OS problem."

I'm willing to accept this as an OS problem, and I'm just wondering if anyone
else has reported the same problem and if so, what the solution was.

Thanks a lot.

Patrick


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/31502] gcc/g++ randomly seg faults, sometimes freezes the entire machine
  2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
                   ` (3 preceding siblings ...)
  2007-04-08  3:39 ` ye dot patrick at gmail dot com
@ 2007-05-07  1:54 ` bgoodr+gccbugzilla at gmail dot com
  2007-05-07  2:00 ` pinskia at gcc dot gnu dot org
  2007-05-07  3:19 ` bgoodr+gccbugzilla at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: bgoodr+gccbugzilla at gmail dot com @ 2007-05-07  1:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from bgoodr+gccbugzilla at gmail dot com  2007-05-07 02:53 -------
(In reply to comment #4)
> I'm willing to accept this as an OS problem, and I'm just wondering if anyone
> else has reported the same problem and if so, what the solution was.

This is happening for me too. It is notable that this is happening on a
different distribution and hardware/CPU combination:

My machine and OS info:

Machine info:
  CPU: AMD Athlon 1200.063Mhz from /proc/cpuinfo
  RAM: MemTotal:       775600 kB from /proc/meminfo

OS Info:
  Type: Linux
  Distro: Fedora Core release 5 (Bordeaux)
  Kernel: Linux 2.6.20-1.2307.fc5 #1 Sun Mar 18 20:44:48 EDT 2007 i686 athlon
i386 GNU/Linux
  Bit: 32 bit OS

Version of GCC I'm using: gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)

I have not seen GCC hang the entire system as Patrick had reported on his
system.

Note that he reported this problem against mplayer and Blender, and I have seen
the regression against BOTH of those software packages as well.  

I've seen a few other failures in both mplayer and Blender source that
disappeared when I retried building them, but there is a file in both source
trees that _consistently_ fail with the segmentation fault.

I too am not convinced it is a GCC problem, but I would like to know if anyone
else has seen this issue as well.

For Blender, for my system, the failure that is consistent is:

Compiling ==> 'export_Plugin.cpp'
source/blender/yafray/intern/export_Plugin.cpp: In member function 'virtual
void yafrayPluginRender_t::writeShader(const std::string&, Material*, const
std::string&)':
source/blender/yafray/intern/export_Plugin.cpp:890: error: unrecognizable insn:
(insn 14404 14402 14405 2146 (UnKnown Unknown) -1 (nil)
    (nil))
source/blender/yafray/intern/export_Plugin.cpp:890: internal compiler error: in
extract_insn, at recog.c:2084
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
scons: ***
[/home/brentg/blender_build_dir/build/linux2/source/blender/yafray/intern/export_Plugin.o]
Error 1
scons: building terminated because of errors.

For mplayer, the error for the file that consistently fails is:

cc   -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_ISOC9X_SOURCE -I.. -I.. -I../libavutil -Wdeclaration-after-statement
-fno-PIC -O4 -march=athlon -mtune=athlon -pipe -ffast-math -fomit-frame-pointer
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include 
-I/usr/include/kde/artsc  -I/usr/include/cdda -I/usr/include/freetype2
-I/usr/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -c -o mpegaudiodec.o
mpegaudiodec.c
mpegaudiodec.c: In function 'ff_mpa_synth_filter':
mpegaudiodec.c:917: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[1]: *** [mpegaudiodec.o] Error 1



Other failures I have seen, but that were not reproduceable:


--- Blender ---
source/blender/blenkernel/intern/subsurf_ccg.c: In function
'subsurf_make_derived_from_derived':
source/blender/blenkernel/intern/subsurf_ccg.c:2440: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
scons: ***
[/home/brentg/blender_build_dir/build/linux2/source/blender/blenkernel/intern/subsurf_ccg.o]
Error 1



source/blender/yafray/intern/export_File.cpp: In member function 'virtual void
yafrayFileRender_t::writeTextures()':
source/blender/yafray/intern/export_File.cpp:656: error: unrecognizable insn:
(insn 11442 8280 6565 842 (UnKnown Unknown) -1 (nil)
    (nil))
source/blender/yafray/intern/export_File.cpp:656: internal compiler error: in
extract_insn, at recog.c:2084
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.




--- mplayer ---

mpegvideo.c: In function 'MPV_decode_mb':
mpegvideo.c:4116: error: unrecognizable insn:
(insn 1667 1665 1668 191 (UnKnown Unknown) -1 (nil)
    (nil))
mpegvideo.c:4116: internal compiler error: in extract_insn, at recog.c:2084
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.


I will be happy to provide additional info as needed.

Thanks,
Brent Goodrick


-- 

bgoodr+gccbugzilla at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bgoodr+gccbugzilla at gmail
                   |                            |dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/31502] gcc/g++ randomly seg faults, sometimes freezes the entire machine
  2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
                   ` (4 preceding siblings ...)
  2007-05-07  1:54 ` bgoodr+gccbugzilla at gmail dot com
@ 2007-05-07  2:00 ` pinskia at gcc dot gnu dot org
  2007-05-07  3:19 ` bgoodr+gccbugzilla at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-07  2:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-05-07 03:00 -------
compiling software always taxes the system more than any thing else as it is
using more of the CPU time and memory and disk than most other software.  So if
you have an over heating machine or bad memory, you will get random failures. 
I was getting random failures while the AC is turned off while bootstrapping
GCC all time and now I don't once the company I work for keeps it on during the
weekends.  Of course this was only on my x86 machine and on my PS3, it would
not crash or fail, meaning the PS3 was build to with stand the heat while the
x86 machine was not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/31502] gcc/g++ randomly seg faults, sometimes freezes the entire machine
  2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
                   ` (5 preceding siblings ...)
  2007-05-07  2:00 ` pinskia at gcc dot gnu dot org
@ 2007-05-07  3:19 ` bgoodr+gccbugzilla at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: bgoodr+gccbugzilla at gmail dot com @ 2007-05-07  3:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bgoodr+gccbugzilla at gmail dot com  2007-05-07 04:19 -------
(In reply to comment #6)
> compiling software always taxes the system more than any thing else as it is
> using more of the CPU time and memory and disk than most other software.  ...

Thanks Andrew.  I'm coming around to that conclusion myself, as I attempted
several times to rebuild from scratch using GCC 3.2.3 "compat" libraries:

gcc32 (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-56.fc5)

and am getting random internal compiler errors again.  My conclusion for now is
that it is not likely to be GCC 4.1.1 at fault.  It might be time for a system
upgrade.

Thanks!
Brent


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31502


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-05-07  3:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-07 11:45 [Bug c++/31502] New: gcc/g++ randomly seg faults, sometimes freezes the entire machine ye dot patrick at gmail dot com
2007-04-07 14:31 ` [Bug c++/31502] " pinskia at gcc dot gnu dot org
2007-04-07 14:43 ` ye dot patrick at gmail dot com
2007-04-07 15:29 ` bangerth at dealii dot org
2007-04-08  3:39 ` ye dot patrick at gmail dot com
2007-05-07  1:54 ` bgoodr+gccbugzilla at gmail dot com
2007-05-07  2:00 ` pinskia at gcc dot gnu dot org
2007-05-07  3:19 ` bgoodr+gccbugzilla at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).