public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/57436] New: Linux kernel gives file system corruption when built with gcc 4.8.0
@ 2013-05-27 17:18 a.radke at arcor dot de
  2013-05-28  6:29 ` [Bug middle-end/57436] " steven at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: a.radke at arcor dot de @ 2013-05-27 17:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57436
           Summary: Linux kernel gives file system corruption when built
                    with gcc 4.8.0
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: a.radke at arcor dot de

Our ArchLinux distribution gives sort of reproducable file system corruption
with all kernels built with gcc 4.8.0 (currently at snapshot 20130502). The
same kernel built with gcc 4.7.3 is stable. glibc is 2.17, binutils 2.23.2.
Architecture is x86_64. I'm testing only stable long term kernel 3.0.xx branch
but kernel 3.8 showed the same error.

Our default flags:
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"

The kernel builds well with gcc 4.8.0, the bug I'm running into is this: My
server running such a bad compiled kernel hosts a NFSv4 share on a XFS
formatted partition. On the same drive my dovecot imap server stores all mails.
When marking lots of small files on any fast client as read/unread the server
currupts the xfs file system with such messages:

imap(andyrtr):
Error:maildir_file_do(/mnt/share/andyrtr/Mail/.Mailinglisten.Linux-stable/cur/msg.MFVZBC:2,):
Filename keeps changing

Usually these are ACL related messages. After a reboot the related mail files
are sometimes gone and sometimes can be fixed with xfs_repair.

Any idea what this could be and how to track this down? It's a pretty nasty bug
in gcc it seems to me. I can provide further info if needed.


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

* [Bug middle-end/57436] Linux kernel gives file system corruption when built with gcc 4.8.0
  2013-05-27 17:18 [Bug c/57436] New: Linux kernel gives file system corruption when built with gcc 4.8.0 a.radke at arcor dot de
@ 2013-05-28  6:29 ` steven at gcc dot gnu.org
  2013-11-10  8:05 ` pinskia at gcc dot gnu.org
  2013-11-10 19:13 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: steven at gcc dot gnu.org @ 2013-05-28  6:29 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steven at gcc dot gnu.org

--- Comment #1 from Steven Bosscher <steven at gcc dot gnu.org> ---
(In reply to Andreas Radke from comment #0)
> Any idea what this could be and how to track this down? It's a pretty
> nasty bug in gcc it seems to me.

Jumping to conclusions like that isn't helpful (but unfortunately
typical for kernel folk): It *may* be a bug in gcc, but it may just
as well be a bug in the kernel. Relying on undefined behavior or
stuff like that.

Have you looked at some of the caveats in the GCC 4.8 relase notes?
(See http://gcc.gnu.org/gcc-4.8/changes.html).  The problem you're
seeing could be related to the aggressive loop optimizations that
GCC 4.8 has enabled.  You could try -fno-aggressive-loop-optimizations.
(IIRC it's enabled by default in recent linux kernel configurations,
but I'm not sure.)

Another common problem is alias violations. You could try compiling
with -Wstrict-aliasing=2 and see if there are any real alias rules
violations.

If that all fails, you could try compile individual files (or all of
XFS, perhaps) with -O1 or even just -O0, try to isolate the file that
causes the breakage, and start comparing assembly. All that, assuming
you have a file system you can repeatedly wreck, of course :-)


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

* [Bug middle-end/57436] Linux kernel gives file system corruption when built with gcc 4.8.0
  2013-05-27 17:18 [Bug c/57436] New: Linux kernel gives file system corruption when built with gcc 4.8.0 a.radke at arcor dot de
  2013-05-28  6:29 ` [Bug middle-end/57436] " steven at gcc dot gnu.org
@ 2013-11-10  8:05 ` pinskia at gcc dot gnu.org
  2013-11-10 19:13 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-10  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-11-10
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Waiting on a testcase.


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

* [Bug middle-end/57436] Linux kernel gives file system corruption when built with gcc 4.8.0
  2013-05-27 17:18 [Bug c/57436] New: Linux kernel gives file system corruption when built with gcc 4.8.0 a.radke at arcor dot de
  2013-05-28  6:29 ` [Bug middle-end/57436] " steven at gcc dot gnu.org
  2013-11-10  8:05 ` pinskia at gcc dot gnu.org
@ 2013-11-10 19:13 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-10 19:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andreas Radke from comment #3)
> note: we had a similar issue in libdrm. maybe it's related or not. this one
> is now fixed:
> http://cgit.freedesktop.org/mesa/drm/commit/
> ?id=482abbfafb56cbceaf5355c026434e638cddd0f1

That is undefined behavior.  If that happens to be the same issue in XFS then
it is a bug in the source of XFS and not GCC.

Closing as invalid.


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

end of thread, other threads:[~2013-11-10 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-27 17:18 [Bug c/57436] New: Linux kernel gives file system corruption when built with gcc 4.8.0 a.radke at arcor dot de
2013-05-28  6:29 ` [Bug middle-end/57436] " steven at gcc dot gnu.org
2013-11-10  8:05 ` pinskia at gcc dot gnu.org
2013-11-10 19:13 ` pinskia at gcc dot gnu.org

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).