Modify

Opened 8 years ago

Closed 8 years ago

Last modified 3 years ago

#7298 closed defect (fixed)

Cannot edit files in /etc/config due to flash write error

Reported by: kb@… Owned by: developers
Priority: highest Milestone: Backfire 10.03.1
Component: kernel Version: Backfire 10.03
Keywords: flash driver write dirty Cc:

Description

When tried to edit configuration files in /etc/config got errors like below:

Write of 186 bytes at 0x0015a680 failed. returned -30, retlen 0
Not marking the space at 0x0015a680 as dirty because the flash driver returned retlen zero
Write of 206 bytes at 0x0015a680 failed. returned -30, retlen 0
Not marking the space at 0x0015a680 as dirty because the flash driver returned retlen zero
Write of 201 bytes at 0x0015a680 failed. returned -30, retlen 0
Not marking the space at 0x0015a680 as dirty because the flash driver returned retlen zero
Write of 206 bytes at 0x0015a680 failed. returned -30, retlen 0
Not marking the space at 0x0015a680 as dirty because the flash driver returned retlen zero
Write of 201 bytes at 0x0015a680 failed. returned -30, retlen 0
Not marking the space at 0x0015a680 as dirty because the flash driver returned retlen zero
Write of 201 bytes at 0x0015a680 failed. returned -30, retlen 0
Not marking the space at 0x0015a680 as dirty because the flash driver returned retlen zero
Write of 68 bytes at 0x0015a680 failed. returned -30, retlen 0
Not marking the space at 0x0015a680 as dirty because the flash driver returned retlen zero
Unable to handle kernel paging request at virtual address 0000011c, epc == 8004354c, ra == 800370f0
Oops in fault.c::do_page_fault, line 206:
$0 : 00000000 1000fc00 00000002 00000002 00000000 80192284 80182920 8037acc8
$8 : 00000030 801316a0 0000185a 000017fc 801a0000 801a0000 801a0000 ffffffff
$16: 80182920 00000000 ffffffe9 00000000 80d640c0 00000000 0040a570 0049ad04
$24: 00000001 00000005                   80da6000 80da7de8 0049a8dc 800370f0
Hi : 00000000
Lo : 00000000
epc   : 8004354c    Tainted: P 
Status: 1000fc03
Cause : 00000008
PrId  : 00029007
Process rm (pid: 602, stackpage=80da6000)
Stack:    806b21a0 80070668 80191e0c 80da6000 80d640c0 80c9fe20 00000006
 00000006 80c506bc 80061774 80060e4c 80c4fa70 80d22c20 80d22cb0 80c9fe20
 80c506bc 00000006 00000000 80c4fbc0 80c50660 0040a570 80061900 8032e5e0
 00000004 80c50760 80c9ff20 80c50760 80c9ff20 80c50660 ffffffe2 80068808
 800687a8 80c50660 8004ee64 80c50660 00000000 80c50660 80c4fc50 00000000
 80c4fbc0 ...
Call Trace:   [<80070668>] [<80061774>] [<80060e4c>] [<80061900>] [<80068808>]
 [<800687a8>] [<8004ee64>] [<80064760>] [<8004364c>] [<800461cc>] [<80044930>]
 [<80044918>] [<8004489c>] [<80044884>] [<800463e4>] [<80008aa0>] [<8005bd8c>]

Code: 00602021  08010cf6  00c02821 <8c82011c> 04400007  2403ffe6  c082011c  24420001  e082011c 

I'm using official brcm-2.4 build of Backfire 10.03.

Attachments (2)

dmesg-till.txt (5.8 KB) - added by opensource@… 8 years ago.
dmesg of a WRT54G with similiar flash problem
dmesg_cant_write_it_capn.txt (5.9 KB) - added by bersl2@… 8 years ago.
dmesg output from WRT54GL 1.1 with the same problem

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by hauke

We need more information, something is wrong with the flash.

What device are you using?

Please provide us with the full dmesg log.

Changed 8 years ago by opensource@…

dmesg of a WRT54G with similiar flash problem

Changed 8 years ago by bersl2@…

dmesg output from WRT54GL 1.1 with the same problem

comment:2 Changed 8 years ago by bersl2@…

Browsing the list of bugs, I stumbled across newly-filed bug #7437. On the off chance that it would do anything, I ran the suggested

mtd unlock rootfs_data

and suddenly, the thing actually started working again. This actually makes sense, because JFFS2 shouldn't be choking on bad flash cells (if there are actually any in these cases); it should just move to the next one and keep writing.

comment:3 Changed 8 years ago by opensource@…

mtd unlock rootfs_data helps here, too.

comment:4 Changed 8 years ago by johnf@…

I also "resolved" my problem using the mtd unlock command. I checked dmesg and I think that this message is particularly significant:

mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only

Here's the mtd layout:

root@hydrogen:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 "cfe"
mtd1: 003b0000 00010000 "linux"
mtd2: 002a4c00 00010000 "rootfs"
mtd3: 00010000 00010000 "nvram"
mtd4: 00090000 00010000 "rootfs_data"

When I execute the unlock command I am able to modify my filesystem again. I am pretty low on space, but there is some:

/dev/mtdblock/4 576 344 232 60% /overlay

There are a few things I find strange about this situation, one is that on the first boot I was able to edit files and the filesystem mounted normally. I would have thought that the flash partition boundaries would not change after installation.

Let me know if there's anything I can do to help diagnose the problem. I'm running a custom build (just changed the default built in package selection) of backfire, svn rev 21693 . I'm more than willing to perform any tests, reflash the router, whatever.

-JohnF

comment:5 Changed 8 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed by r22377

comment:6 Changed 8 years ago by anonymous

The patch worked perfectly for me (ok, having reviewed the patch, it's hard to see how it could fail, but might as well report my success anyway).

Thanks jow!

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.