Ask / Submit
9

btrfs recovery segfaults when trying to repair root partition

asked 2014-08-10 19:47:48 +0300

ulric.spn gravatar image

updated 2014-12-16 17:24:36 +0300

eric gravatar image

Please read the article before attempting Recovery Mode!
https://jolla.zendesk.com/hc/en-us/articles/202208763
You should or should not perform certain operations within Recovery Mode depending on your SFOS version.

This phone is stuck on the Jolla logo.

In the main recovery screen, recovery version 0.2.7, I press option 5 for

5) Try btrfs recovery if your device is in bootloop

and I get the error:

Segmentation fault
Connection closed by foreign host.

When I try entering the root shell with option 4, I enter the following command:

btrfs check --repair /dev/mmcblk0p28

It failed:

enabling repair mode
Checking filesystem on /dev/mmcblk0p28
UUID: 0f8a2490-53ed-4ff6-ba34-b81df3430387
checking extents
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
Csum didn't match
owner ref check failed [145289216 4096]
repair deleting extent record: key 145289216 168 4096
adding new tree backref on start 145289216 len 4096 parent 268 root 268
repaired damaged extent references
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
checksum verify failed on 145289216 found 82788729 wanted 9224F9AE
Csum didn't match
Segmentation fault

Here is the error from dmesg:

[  945.821608] btrfs: unhandled page fault (11) at 0x000000b8, code 0x017
[  945.821608] pgd = eb0f4000
[  945.821638] [000000b8] *pgd=b10ce831, *pte=00000000, *ppte=00000000
[  945.821638] 
[  945.821669] Pid: 274, comm:                btrfs
[  945.821669] CPU: 1    Tainted: G      D W     (3.4.91.20140612.1 #1)
[  945.821699] PC is at 0x1fda8
[  945.821699] LR is at 0x20a68
[  945.821699] pc : [<0001fda8>]    lr : [<00020a68>]    psr: 800f0010
[  945.821699] sp : bed7b850  ip : bed7bbe0  fp : 00000001
[  945.821730] r10: bed7bbe0  r9 : 00001000  r8 : 08a8f000
[  945.821730] r7 : 028fc6f0  r6 : 00000000  r5 : bed7bbe4  r4 : 00000000
[  945.821760] r3 : bed7bbe4  r2 : 00000000  r1 : bed7bbe0  r0 : 00000000
[  945.821760] Flags: Nzcv  IRQs on  FIQs on  Mode USER_32  ISA ARM  Segment user
[  945.821791] Control: 10c5787d  Table: b10f406a  DAC: 00000015
[  945.821821] [<c010cabc>] (unwind_backtrace+0x0/0x11c) from [<c0110b18>] (__do_user_fault+0x7c/0xc4)
[  945.821821] [<c0110b18>] (__do_user_fault+0x7c/0xc4) from [<c08b6a68>] (do_page_fault+0x374/0x3c0)
[  945.821852] [<c08b6a68>] (do_page_fault+0x374/0x3c0) from [<c01002d4>] (do_DataAbort+0x134/0x1a8)
[  945.821882] [<c01002d4>] (do_DataAbort+0x134/0x1a8) from [<c08b52b4>] (__dabt_usr+0x34/0x40)
[  945.821913] Exception stack(0xeede1fb0 to 0xeede1ff8)
[  945.821913] 1fa0:                                     00000000 bed7bbe0 00000000 bed7bbe4
[  945.821944] 1fc0: 00000000 bed7bbe4 00000000 028fc6f0 08a8f000 00001000 bed7bbe0 00000001
[  945.821944] 1fe0: bed7bbe0 bed7b850 00020a68 0001fda8 800f0010 ffffffff
[  945.821974] btrfs(274) send signal 11 to btrfs(274)

When I mount the root partition with:

mount /dev/mmcblk0p28 /mnt

It shows no errors.

When I use option 1 in the recovery menu, I get the following output. Still won't boot after this however:

[CLEANUP] Starting cleanup!
[CLEANUP] Umounting top volume...
[CLEANUP] Deleting /mnt
[CLEANUP] Cleanup done.
Mounting /dev/mmcblk0p28 on /mnt
sh: unlock: unknown operand

Type your devicelock code and press [ENTER] key:
(please note that the typed numbers won't be shown for security reasons)
[OK] Code accepted.
sh: unlock: unknown operand
sh: shell: unknown operand
[OK] Factory snapshots found.
Resetting procedure started!
Backing up current root and home subvolumes. If the backup fails, the old data will be deleted to let the recovery process continue.
[Done]
Restoring factory subvolumes...
Create a snapshot of '/mnt/factory-@' in '/mnt/@'
Create a snapshot of '/mnt/factory-@home' in '/mnt/@home'
[Done]
FSSync '/mnt'
Checking swap subvolume
[OK] Swap subvolume found, no need to recreate it.
[DONE] Swap is ok.
Running flashing scripts from recovered snapshot ...
Running /var/lib/platform-updates/flash-bootimg-sbj.sh ... 
1491+0 records in
1491+0 records out
6107136 bytes (6.1 MB) copied, 0.279841 s, 21.8 MB/s
[OK]
Running /var/lib/platform-updates/flash-platform-images-sbj.sh ... 
23+1 records in
23+1 records out
96168 bytes (96 kB) copied, 0.00753853 s, 12.8 MB/s
30+1 records in
30+1 records out
124588 bytes (125 kB) copied, 0.00763009 s, 16.3 MB/s
88+1 records in
88+1 records out
364360 bytes (364 kB) copied, 0.0279261 s, 13.0 MB/s
47+1 records in
47+1 records out
194360 bytes (194 kB) copied, 0.0128796 s, 15.1 MB/s
31+1 records in
31+1 records out
129180 bytes (129 kB) copied, 0.00906455 s, 14.3 MB/s
482+1 records in
482+1 records out
1978248 bytes (2.0 MB) copied, 0.178514 s, 11.1 MB/s
11360+1 records in
11360+1 records out
46532096 bytes (47 MB) copied, 2.09702 s, 22.2 MB/s
dd: writing to `/dev/mmcblk0p10': No space left on device
8193+0 records in
8192+0 records out
4194304 bytes (4.2 MB) copied, 0.481673 s, 8.7 MB/s
dd: writing to `/dev/mmcblk0p11': No space left on device
8193+0 records in
8192+0 records out
4194304 bytes (4.2 MB) copied, 0.467114 s, 9.0 MB/s
2048+0 records in
2048+0 records out
8388608 bytes (8.4 MB) copied, 0.336396 s, 24.9 MB/s
[OK]
[DONE] flashing script succeeded.
Deleting old subvolumes
Delete subvolume '/mnt/rec-19700101_002719_@home'
Delete subvolume '/mnt/rec-19700101_002719_@'
Recovery procedure terminated SUCCESSFULLY! Now cleaning up...
[CLEANUP] Starting cleanup!
[CLEANUP] Umounting top volume...
[CLEANUP] Umounting /mnt
Segmentation fault
[CLEANUP] Deleting /mnt
[CLEANUP] Cleanup done.


[DONE] DEVICE RECOVERED!

Basically, I've tried all of the solutions from similar threads but it still doesn't work. Does anyone have any other ideas?

Thanks!!!!

edit retag flag offensive close delete

Comments

How long did the btrfs hang before it errs? I selected that option from my linux console but it is still waiting for the control back. It's been like 5 minutes.

dgolcher ( 2014-11-01 06:29:13 +0300 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2015-03-12 01:08:53 +0300

bokal gravatar image

I'm having the exact same problem.

Have you been able to solve it?

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2014-08-10 19:47:48 +0300

Seen: 2,157 times

Last updated: Mar 12 '15