Re: CONFIG_PREEMPT and JFFS2 oops

Orjan Friberg
2012-01-26T10:15:27Z

On 01/25/2012 10:18 PM, Paul Walmsley wrote:
> - If your oopses are consistently in the same places, add some debugging
> to that code to determine which line is actually causing the oops.

(CC:d linux-mtd.)

They are semi-consistent I'd say. The oops trace I posted is by far the
most common.

> problem to mysteriously disappear. Doing this analysis should provide a
> good clue as to where to look next. I personally would be rather
> suspicious of that
>
> ri->data_crc = cpu_to_je32(crc32(0, comprbuf, cdatalen));
>
> in jffs2_write_inode_range().

That is indeed the place where crc32 is called from . I'll see it I can
track the use of comprbuf.

> - Try turning on JFFS2 debugging and seeing if you can reproduce it.
> The output might provide a clue as to where the problem would be.

Here are two examples (immediately preceding the oops):

jffs2_reserve_space(): Requested 0x30 bytes
jffs2_reserve_space(): alloc sem got
[JFFS2 DBG] (1189) jffs2_do_reserve_space: minsize=48 , jeb->free=46852
,summary->size=16586 , sumsize=29
jffs2_do_reserve_space(): Giving 0x75f4 bytes at 0x3d48fc
jffs2_write_dirent(ino #1, name at *0xdea7b93c "file1"->ino #111,
name_crc 0x58c597f8)

jffs2_write_begin()
jffs2_read_inode_range: ino #12, range 0x00000000-0x00001000
Filling non-frag hole from 0-4096
end write_begin(). pg->flags 9
jffs2_write_end(): ino #12, page at 0x0, range 0-800, flags d
jffs2_write_inode_range(): Ino #12, ofs 0x0, len 0x320
jffs2_reserve_space(): Requested 0xc4 bytes
jffs2_reserve_space(): alloc sem got
[JFFS2 DBG] (1454) jffs2_do_reserve_space: minsize=196 ,
jeb->free=123148 ,summary->size=1567 , sumsize=18
jffs2_do_reserve_space(): Giving 0x1dab0 bytes at 0xf941ef4
calling deflate with avail_in 788, avail_out 788
deflate returned with avail_in 0, avail_out 428, total_in 788, total_out 360
calling deflate with avail_in 12, avail_out 428
deflate returned with avail_in 0, avail_out 414, total_in 800, total_out 374
zlib compressed 800 bytes into 380

I'll take a look at what jffs2_do_reserve_space is up to.

Thanks.

--
Orjan Friberg
FlatFrog Laboratories AB