-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tar stream closes early on large stream (44+Gb) #111
Comments
does the pipeline end with no error? |
Yes - no error when the pipeline ends. Also the tar is not corrupt - It's just missing files. Is there a way to get errors out per file? If there is an issue does the file get skipped? Edit - also worth noting, quite often it seems like it is a subdirectory that gets skipped, which in this case - is 11Gb. Thanks |
If you only tar that one folder does it work? ie anything you can do to reduce the problem down helps us fix it. try not using any http stream also, just tar-fs on that folder and see if thats broken also |
Yes - that folder does tar successfully. Okay so I've narrowed it down somewhat. I have a feeling it is some sort of timing issue and something to do with the subdirectory getting walked and stat ran for each file, which I'm sure takes time - being that it is 5.5k files and 11Gb. If I add the subdirectory as an entry before the main directory, the entire tar get sent successfully. (I've only tested it once so far, but will continue testing) Some examples: Here is how I'm adding the directories: const folders = [
'blocks',
'chainstate',
'determ_zelnodes',
];
workflow.push(tar.pack(base, {
entries: folders,
})); If the entries are added in this order (they are all directories with files) then quite often, but not always, the index dir is empty - note there is an
If the entries are added in this order, it works fine and files / dirs are only added once:
if the entries are added in this order, the files can sometimes be doubled up, depending on if the blocks entry loads the files from the index subdir:
I'll try eliminate the http stream and see what happens |
Some info on what is being tarred root@banana:/home/davew/.flux# du -h blocks chainstate determ_zelnodes
11G blocks/index
34G blocks
415M chainstate
7.6G determ_zelnodes
root@banana:/home/davew/.flux# find . -type f | wc -l
10191
root@banana:/home/davew/.flux# |
nice, thanks, so you are saying its when the folder with tons of small files are at the end it becomes an issue? |
Yes, it seems the ordering is important, I get a good result if I put folders with lots of small files, before folders with big files. As well as explictly including child folders as entries with lots of files before the parent folder. Tested this several times now - getting good results by changing the order. Edit: This is the ordering I'm using now: const folders = [
'determ_zelnodes',
'blocks/index',
'chainstate',
'blocks',
]; |
I was wrong with the above statement. If I add both the So as far as I can tell I'm back to the initial timing issue... sometimes it adds the index folder, sometimes it doesn't. Here is more detail about the blocks folder. 175 dat files, each 128Mb
|
If you run this
Does it give a different result everytime? |
I get the same result each time. davew@banana:~/zelflux$ node test_stream.js
44020073472
davew@banana:~/zelflux$ node test_stream.js
44020073472
davew@banana:~/zelflux$ node test_stream.js
44020073472
davew@banana:~/zelflux$ node test_stream.js
44020073472
davew@banana:~/zelflux$ node test_stream.js
44020073472 However, something that is important that I forgot to mention, is that there is a service running while the tar is in progress, which can change the size of a few of the files (they have the latest timestamps in the leveldb) This is what it looks like while the process is running, it's still picking up the
|
ohhhhhhh thats prop the issue, you are prop corrupting the tar as you are producing it then cause the header is written first in tar so if the file shrinks during the stat that creates issues |
Hi there,
I'm having an issue with tar-fs and I don't even know where to start debugging it. Any pointer on how I can debug this would be great.
It could even have something to do with the underlying system running out of memory and swapping. (Plenty of swap space though) It quite often ends up swapping, but this shouldn't cause the stream to end.
It's pretty consistent, I get around 30-40Gb transferred, then the stream just ends - with no errors raised.
Here is how I am using it:
I addd a
stream.PassThrough()
in there to see how many bytes are being written - and when the stream ends, it hasn't written all the bytes.The text was updated successfully, but these errors were encountered: