Skip to content

libgreen/rustuv cant write huge files #13130

Closed
@tfogal

Description

@tfogal

It seems libgreen cannot write large files. See the gist at:

https://gist.github.com/tfogal/9762303#file-simple-rs

See specifically the 'dumpf32' implementation.

When running with rust from 2014-03-21 (2014032104056eae7dfsaucy) on Ubuntu, the output file in this example is only 2147479552 bytes, whereas it should be exactly 4000000000 bytes.

This was fixed on 2014-03-25 in 2014032104056eae7dfsaucy. However, one can induce failure by forcing libgreen, via:

extern crate green;
extern crate rustuv;
...
#[start]
fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }

The 'rustuv' is critical to prevent an early crash calling "Result::unwrap() on an Err value, but it limits the output file size as above.

From talking with @huonw and @eddyb on IRC, this appears to be an issue with libuv. eddyb pinpointed it to:

https://github.com/mozilla/rust/blob/master/src/librustuv/uvll.rs#L371-L384

the issue appears to be a mismatch in the type given and taken to/by libuv.

@eddyb pinged the libuv folks, who said this aspect has recently changed and Rust should upgrade before working around the current code. uv_fs_write apparently takes an array of buffers now, in particular.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions