Closed Viterkim closed 6 years ago
Could you publish those files somewhere? I suppose it might be easier for me to debug it if I can reproduce it myself.
Thanks. I can reproduce it, and I'll try to find time to debug it today.
Thank you so much! I'm trying to compare delta solutions and this just randomly popped up. Is it true that the software doesn't support lzma/gzip by the way?
Yep, see #2. It's not like it'd hard to do, I just never had a compelling reason to do it.
Looks like it's getting EFAULT
when trying to write a buffer from mmap()
. I think this is some recent change in kernel and/or glibc that breaks it. I suppose the best way forward would be to stop playing with mmap()
and read the file the old-school way.
Sure, thanks for the update! And I'm unfortunately i don't have the skillset to add the functionality myself, so i guess i'll just use lz4 for now :)
A stupid question: You create deltas with squashdelta file1 file2 delta, but how do you apply the delta file to a file?
You use squashmerge for that. The idea was that merging is easier, so we can write a tool in plain C rather than C++.
Ok. So I've did a big regutting of squashdelta finally, and got rid of mmap I/O. Now the 'bad address' error is replaced by EOF exception. Which means there's either something wrong with the file or the parser, and the whole regutting was entirely unnecessary ;-).
oh feelsbadman I'm sorry if it's the file... I did try it on multiple big files, maybe it's an edge case on the files i produce?
No, I think it's memory corruption somewhere in my code.
I'm making progress. It seems that I failed to account for the possibility of the same block being used in multiple inodes. Furthermore, it seems that there are blocks with zero length which I have to investigate.
Good news is that I've managed to fix the underlying issue. Bad news is that in the meantime I've discovered that LZ4 is unstable, and you can't merge the result anymore since it compressed bigger than the original.
(i.e. the new version reduces compression)
When i try to create a delta between 2 squashfs files compressed with lz4 i get an error (does not happen on smaller files). The difference between the files is around 70Mb.