All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Jander <david@protonic.nl>
To: Matteo Croce <technoboy85@gmail.com>
Cc: linux-ext4@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: ext4: journal has aborted
Date: Tue, 1 Jul 2014 08:26:19 +0200	[thread overview]
Message-ID: <20140701082619.1ac77f1d@archvile> (raw)
In-Reply-To: <CAFnufp3TepsxxX8=WCJ0V=3TELP0rWR-NxFukSL8X=qS1q6Eew@mail.gmail.com>


Hi,

On Mon, 30 Jun 2014 23:30:10 +0200
Matteo Croce <technoboy85@gmail.com> wrote:

> I was web surfing and using gimp when:
> 
> EXT4-fs error (device sda2): ext4_mb_generate_buddy:756: group 199,
> 9414 clusters in bitmap, 9500 in gd; block bitmap corrupt.

I was about to post a related question to this list. I am also seeing these
kind of errors when using ext4 on latest mainline (I began testing with 3.15
where I saw this and now in 3.16-rc3 it is still there).
It happens almost instantly when power-cycling the system (unclean shutdown).
The next time the system boots, I get these errors.

AFAICT, you are using a pretty recent kernel. Which version exactly?

> Aborting journal on device sda2-8.
> EXT4-fs (sda2): Remounting filesystem read-only
> ------------[ cut here ]------------
> WARNING: CPU: 6 PID: 4134 at fs/ext4/ext4_jbd2.c:259
> __ext4_handle_dirty_metadata+0x18e/0x1d0()
> Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek
> snd_hda_codec_generic ecb uvcvideo videobuf2_vmalloc videobuf2_memops
> videobuf2_core videodev ath3k btusb rts5139(C) ctr ccm iTCO_wdt bnep
> rfcomm bluetooth nls_iso8859_1 vfat fat arc4 intel_rapl
> x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm
> snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm
> aesni_intel aes_x86_64 snd_seq_midi snd_seq_midi_event ath9k led_class
> glue_helper ath9k_common lrw gf128mul ath9k_hw ablk_helper cryptd ath
> mac80211 snd_rawmidi snd_seq cfg80211 radeon microcode rfkill
> snd_timer snd_seq_device sr_mod psmouse r8169 snd cdrom i915 lpc_ich
> soundcore ttm mii mfd_core drm_kms_helper drm intel_gtt agpgart
> ehci_pci mei_me xhci_hcd tpm_infineon ehci_hcd video mei wmi tpm
> backlight
> CPU: 6 PID: 4134 Comm: gimp-2.8 Tainted: G         C    3.15.0 #6
>  0000000000000009 ffffffff813acbdd 0000000000000000 ffffffff8103de3d
>  ffff8802365231a0 00000000ffffffe2 0000000000000000 ffff8800b90816c0
>  ffffffff814205a0 ffffffff8118879e 0000000000000005 ffff8802365231a0
> Call Trace:
>  [<ffffffff813acbdd>] ? dump_stack+0x41/0x51
>  [<ffffffff8103de3d>] ? warn_slowpath_common+0x6d/0x90
>  [<ffffffff8118879e>] ? __ext4_handle_dirty_metadata+0x18e/0x1d0
>  [<ffffffff8116e130>] ? ext4_dirty_inode+0x20/0x50
>  [<ffffffff811903e9>] ? ext4_free_blocks+0x539/0xa40
>  [<ffffffff8118468b>] ? ext4_ext_remove_space+0x83b/0xe60
>  [<ffffffff81186a58>] ? ext4_ext_truncate+0x98/0xc0
>  [<ffffffff8116c985>] ? ext4_truncate+0x2b5/0x300
>  [<ffffffff8116d3d8>] ? ext4_evict_inode+0x3d8/0x410
>  [<ffffffff81114a46>] ? evict+0xa6/0x160
>  [<ffffffff81109346>] ? do_unlinkat+0x186/0x2a0
>  [<ffffffff8110e51e>] ? SyS_getdents+0xde/0x100
>  [<ffffffff8110e1d0>] ? fillonedir+0xd0/0xd0
>  [<ffffffff813b2626>] ? system_call_fastpath+0x1a/0x1f
> ---[ end trace 795411398e41fbcb ]---
> EXT4: jbd2_journal_dirty_metadata failed: handle type 5 started at
> line 241, credits 91/91, errcode -30
> EXT4: jbd2_journal_dirty_metadata failed: handle type 5 started at
> line 241, credits 91/91, errcode -30<2>EXT4-fs error (device sda2) in
> ext4_free_blocks:4867: Journal has aborted
> EXT4-fs error (device sda2): ext4_ext_rm_leaf:2731: inode #8257653:
> block 6520936: comm gimp-2.8: journal_dirty_metadata failed: handle
> type 5 started at line 241, credits 91/91, errcode -30
> EXT4-fs error (device sda2) in ext4_ext_remove_space:3018: Journal has
> aborted EXT4-fs error (device sda2) in ext4_ext_truncate:4666: Journal has
> aborted EXT4-fs error (device sda2) in ext4_reserve_inode_write:4877: Journal
> has aborted
> EXT4-fs error (device sda2) in ext4_truncate:3788: Journal has aborted
> EXT4-fs error (device sda2) in ext4_reserve_inode_write:4877: Journal
> has aborted
> EXT4-fs error (device sda2) in ext4_orphan_del:2684: Journal has aborted
> EXT4-fs error (device sda2) in ext4_reserve_inode_write:4877: Journal
> has aborted

I did not get these errors. I suspect this may be a consequence of FS
corruption due to a bug in etx4.

Here's why I suspect a bug:

I am running latest git head (3.16-rc3+ as of yesterday) on an ARM system with
eMMC flash. The eMMC is formatted in SLC mode ("enhanced" mode according to
eMMC 4.41) and "reliable-writes" are enabled, so power-cycling should not
cause FS corruption in presence of a journal.

I can format the eMMC device either as EXT3 or EXT4 for the test. After
formatting and writing the rootfs to the partition I can boot successfully in
either situation. Once booted from eMMC, I start bonnie++ (to just stress the
FS for a while), and after a minute or so the board is power-cycled while
bonnie++ is still running.

Next time I boot the situation is this:

With EXT3: All seems fine, journal is replayed, no errors. I can repeat this as
many times as I want, FS stays consistent.

With EXT4: After just one power cycle I start getting this:

[    7.603871] EXT4-fs error (device mmcblk0p2): ext4_mb_generate_buddy:757: group 1, 8542 clusters in bitmap, 8550 in gd; block bitmap corrupt.
[    7.616743] JBD2: Spotted dirty metadata buffer (dev = mmcblk0p2, blocknr = 0). There's a risk of filesystem corruption in case of system crash.

If I continue the test, it doesn't take long and serious corruption starts
occurring.

Again, with EXT3 I am unable to detect any problems.

Best regards,

-- 
David Jander
Protonic Holland.

  reply	other threads:[~2014-07-01  6:56 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 21:30 ext4: journal has aborted Matteo Croce
2014-07-01  6:26 ` David Jander [this message]
2014-07-01  8:00   ` Matteo Croce
2014-07-01  8:42   ` Darrick J. Wong
2014-07-01  8:55     ` Matteo Croce
2014-07-02 13:49       ` Dmitry Monakhov
2014-07-03 13:43       ` Theodore Ts'o
2014-07-03 14:15         ` David Jander
2014-07-03 14:46           ` Theodore Ts'o
2014-07-03 14:57           ` Dmitry Monakhov
2014-07-03 14:58           ` Dmitry Monakhov
2014-07-04  9:40             ` David Jander
2014-07-04 10:17               ` Dmitry Monakhov
2014-07-04 11:28                 ` David Jander
2014-07-04 12:20                   ` Theodore Ts'o
2014-07-04 12:38                     ` Dmitry Monakhov
2014-07-04 13:45                     ` David Jander
2014-07-04 18:45                       ` Theodore Ts'o
2014-07-04 22:46                         ` Dave Chinner
2014-07-05  2:30                         ` Dmitry Monakhov
2014-07-05 20:36                         ` Theodore Ts'o
2014-07-07 12:17                         ` David Jander
2014-07-07 15:53                           ` Theodore Ts'o
2014-07-07 22:31                             ` Darrick J. Wong
2014-07-07 22:56                             ` Theodore Ts'o
2014-07-10 18:57                               ` Eric Whitney
2014-07-10 20:01                                 ` Darrick J. Wong
2014-07-10 21:31                                   ` Matteo Croce
2014-07-10 22:32                                     ` Theodore Ts'o
2014-07-11  0:13                                       ` Darrick J. Wong
2014-07-11  0:45                                         ` Eric Whitney
2014-07-11  8:50                                           ` Jaehoon Chung
2014-07-11 11:43                                           ` Theodore Ts'o
2014-07-15  6:31                                           ` David Jander
2014-07-10 23:29                                 ` Azat Khuzhin
2014-07-04 11:04               ` Jaehoon Chung
2014-07-04 11:32                 ` David Jander
2014-07-01 12:07     ` Jaehoon Chung
2014-07-01 13:50       ` David Jander
2014-07-01 15:58       ` Theodore Ts'o
2014-07-01 16:14         ` Lukáš Czerner
2014-07-01 16:36         ` Eric Whitney
2014-07-02  8:34           ` Matteo Croce
2014-07-02 10:17           ` David Jander
2014-07-02 10:19             ` Matteo Croce
2014-07-03 17:14               ` Eric Whitney
2014-07-03 23:17                 ` Theodore Ts'o
2014-07-04 20:48                   ` Eric Whitney
2014-07-02  9:44         ` David Jander
2014-07-01  9:02   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140701082619.1ac77f1d@archvile \
    --to=david@protonic.nl \
    --cc=linux-ext4@vger.kernel.org \
    --cc=technoboy85@gmail.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.