Thomas-Tsai / partclone

Partclone provides utilities to backup a partition smartly and it is designed for higher compatibility of the file system by using existing library.
GNU General Public License v2.0
320 stars 105 forks source link

partclone F2FS critical error - SIGSEGV (Address boundary error) #251

Closed TheDcoder closed 1 week ago

TheDcoder commented 3 weeks ago

Hi, partclone.f2fs seems to have a major bug in it because it exits almost immediately with this error:

# partclone.f2fs --clone --source /dev/sdb2 --output 'root.f2fs.partclone'
Partclone v0.3.32 http://partclone.org
Starting to clone device (/dev/sdb2) to image (root.f2fs.partclone)
Reading Super Block
fish: Job 1, 'partclone.f2fs --clone --source…' terminated by signal SIGSEGV (Address boundary error)

It always errors out at Reading Super Block, I tried this a couple of times. This only happens with F2FS file systems, I was able to successfully clone a FAT32 partition from the same device without any issue.

Thomas-Tsai commented 3 weeks ago

Hi, How do you create F2FS partition? Do you have any debug message for 'terminated by signal SIGSEGV (Address boundary error)', especially memory?

I manually created a raw file, formatted it as F2FS, mounted, copied files, and then cloned successfully.

Could you give us more information about your test to help us fix this issue?

Thank you.

TheDcoder commented 1 week ago

Hey, sorry about the late response, I forgot to reply.

I created it with the usual mkfs.f2fs utility, I am not exactly sure what options I used but I did pick some non-default options taking inspiration from the Arch Linux wiki.

Does it help if I still have access to this partition? I can send you the header/metadata block of the partition via email if it helps you.

Do you have any debug message for 'terminated by signal SIGSEGV (Address boundary error)', especially memory?

I tried to reproduce it again but now it magically started working! So I checked if there was any update to my partclone package and indeed there was:

upgraded partclone (0.3.32-1 -> 0.3.32-1.1)

It's a minor point release from the distro. I use CachyOS's repo with Arch so I guess they changed some compile option and rebuilt it, which fixed the bug.

Unfortunately I couldn't find what they actually changed.

Thomas-Tsai commented 1 week ago

Thank you.

It's good to know you can do cloning successfully.