reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: "Marcin Baczyński" <marbacz@gmail.com>
Cc: reiserfs-devel@vger.kernel.org
Subject: Re: kernel BUG at fs/reiser4/block_alloc.c:151
Date: Wed, 09 Feb 2011 03:37:53 +0100	[thread overview]
Message-ID: <4D51FE01.2040100@gmail.com> (raw)
In-Reply-To: <4D51DB7A.4000408@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]

On 02/09/2011 01:10 AM, Edward Shishkin wrote:
> On 02/09/2011 12:56 AM, Marcin Baczyński wrote:
>> W dniu 8 lutego 2011 23:36 użytkownik Edward Shishkin
>> <edward.shishkin@gmail.com> napisał:
>>> Marcin Baczyński wrote:
>>>>
>>>> Hi,
>>>>
>>>
>>> Hello.
>>>
>>>> I'm attaching a trace of kernel BUG that Firefox hits. It's 100%
>>>> reproducible,
>>>> every time I start the browser it hits the bug within several seconds,
>>>> then
>>>> whole system hangs. However I've never triggered the problem with any
>>>> other
>>>> application.
>>>> I've tested 2.6.37-gentoo-hardened + reiser4 patch,
>>>
>>> "2.6.37-gentoo-hardened" is based on what vanilla kernel (.36 or .37)?
>> It's based on .37.
>>
>>>
>
>
> [<ffffffff81142782>] ? grabbed2flush_reserved_nolock+0x42/0xa0
> [<ffffffff81144c54>] ? jnode_make_dirty_locked+0xe4/0x190
> [<ffffffff81144d31>] ? znode_make_dirty+0x31/0xe0
> [<ffffffff81166a69>] ? find_disk_cluster+0x359/0x390
> [<ffffffff8117511c>] ? do_readpage_ctail+0xdc/0x570
> [<ffffffff81166f7d>] ? prepare_logical_cluster+0x23d/0x760
>
> A set of blocks reserved in prepare_logical_cluster() is exhausted
> at znode_make_dirty() for some reasons. No ideas except inserting
> debugging messages to figure out who is stealing the reservation.


Aaahhh, it seems I understand what's up..
Could you please apply the attached patch, run
Firefox and send me kernel warnings?

Thanks,
Edward.

[-- Attachment #2: reiser4-increase-reservation-with-warn.patch --]
[-- Type: text/plain, Size: 1161 bytes --]

---
 fs/reiser4/estimate.c                  |    2 +-
 fs/reiser4/plugin/file/cryptcompress.c |    5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

--- linux-2.6.37.orig/fs/reiser4/estimate.c
+++ linux-2.6.37/fs/reiser4/estimate.c
@@ -114,7 +114,7 @@ reiser4_block_nr estimate_update_cluster
 */
 reiser4_block_nr estimate_dirty_cluster(struct inode *inode)
 {
-	return cluster_nrpages(inode) + 4;
+	return cluster_nrpages(inode) + 4 + 1000;
 }
 
 /* Make Linus happy.
--- linux-2.6.37.orig/fs/reiser4/plugin/file/cryptcompress.c
+++ linux-2.6.37/fs/reiser4/plugin/file/cryptcompress.c
@@ -2190,6 +2190,11 @@ int find_disk_cluster(struct cluster_han
  out:
 	assert("edward-1339",
 	       get_current_context()->grabbed_blocks >= was_grabbed);
+	if (get_current_context()->grabbed_blocks - was_grabbed < 1000)
+		warning("edward-2222", "file %llu consists of %d fragments",
+			(unsigned long long)get_inode_oid(inode),
+			was_grabbed + estimate_dirty_cluster(inode) -
+			get_current_context()->grabbed_blocks);
 	grabbed2free(get_current_context(),
 		     get_current_super_private(),
 		     get_current_context()->grabbed_blocks - was_grabbed);

  reply	other threads:[~2011-02-09  2:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 22:13 kernel BUG at fs/reiser4/block_alloc.c:151 Marcin Baczyński
2011-02-08 22:36 ` Edward Shishkin
2011-02-08 23:56   ` Marcin Baczyński
2011-02-09  0:10     ` Edward Shishkin
2011-02-09  2:37       ` Edward Shishkin [this message]
2011-02-09 10:15         ` Marcin Baczyński
2011-02-09 15:14           ` Edward Shishkin
2011-02-09  0:20 ` Edward Shishkin

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=4D51FE01.2040100@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=marbacz@gmail.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /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 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 NNTP newsgroup(s).