Skip to content
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

Can't download files with >2Gb size #38

Closed
ofry opened this issue Feb 3, 2016 · 16 comments
Closed

Can't download files with >2Gb size #38

ofry opened this issue Feb 3, 2016 · 16 comments

Comments

@ofry
Copy link

ofry commented Feb 3, 2016

I can't download from my 3ds file with size more than 2147476592 bytes (it's near 2 Gb).

@ofry
Copy link
Author

ofry commented Feb 3, 2016

I use v2.1.

@profi200
Copy link

profi200 commented Feb 3, 2016

That should be a limitation of newlib. It only allows 32 bit offsets but the os supports bigger files. Fixing this would require switching to the native fs API.

@ofry
Copy link
Author

ofry commented Feb 3, 2016

Is it possible in FW < 9.2?

@profi200
Copy link

profi200 commented Feb 3, 2016

It is not a firmware limitation. It is a limitation of the fs API used in this app. I would wait and see what the author wants to do to fix it or if he wants to fix it at all.

@mtheall
Copy link
Owner

mtheall commented Feb 3, 2016

Looks like newlib was built with 32-bit offsets. I will try enabling 64-bit offsets and see if that fixes it.

@mtheall
Copy link
Owner

mtheall commented Feb 3, 2016

I was able to download a 2GB file without enabling 64-bit offsets. Maybe you had a different problem, or maybe your destination filesystem doesn't support large files?

@ofry
Copy link
Author

ofry commented Feb 3, 2016

Can you test smth with 2.1Gb file? I think 2Gb file will download normal, but 2Gb + some bytes will fail to download.

@mtheall
Copy link
Owner

mtheall commented Feb 3, 2016

I made a change in a92b041 but that actually might make the situation temporarily worse (printing a negative size). The next release of devkitARM and rebuilding libctru against that should make offsets to be 64-bit, and so you won't get negative sizes anymore. After that I would revisit this issue. I have an old 3DS and it took about 50 minutes to download the 2GB file.

@mtheall
Copy link
Owner

mtheall commented Feb 3, 2016

I'm trying again (with the old code) with a 2GB+1MB file.

@mtheall
Copy link
Owner

mtheall commented Feb 3, 2016

Okay the 2GB+1MB file worked as well. What client are you using?

@ofry
Copy link
Author

ofry commented Feb 4, 2016

FileZilla 3.15.0.

@ofry
Copy link
Author

ofry commented Feb 4, 2016

I checked some more...

Downloading of big files failing quite often :(

Sample log part:

REST 13633936
502 unavailable

@mtheall
Copy link
Owner

mtheall commented Feb 5, 2016

So have you been getting this error all along? Is this just a problem with the REST command?

@ofry
Copy link
Author

ofry commented Feb 5, 2016

Maybe. I use https://github.com/mtheall/ftpd/releases/tag/v2.1 this version of ftpd.

Can you make 2.2 release based on current commit? Thanks.

@mtheall
Copy link
Owner

mtheall commented Feb 5, 2016

I'm not going to make a v2.2 release until devkitARM/libctru are released with the code that I am using. In the meantime, try out this build:

ftpd.3dsx.zip

@ofry
Copy link
Author

ofry commented Feb 7, 2016

This version working fine :) Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants