Skip to content

stream on sliced Bunfile doesn't work #18192

Open
@koakuma-chan

Description

@koakuma-chan

What version of Bun is running?

1.2.6-canary.59+5bedf1546

What platform is your computer?

Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 unknown

What steps can reproduce the bug?

dd if=/dev/zero of=zeroes bs=768K count=1 \
  && bun -e 'await Bun.readableStreamToText(Bun.file("zeroes").slice(0, 1).stream())'

What is the expected behavior?

Process exits.

What do you see instead?

Process hangs.

Additional information

Stream hangs if file is bigger than 640K.

Works.

dd if=/dev/zero of=zeroes bs=512K count=1 \
  && bun -e 'await Bun.readableStreamToText(Bun.file("zeroes").slice(0, 1).stream())'

Works.

dd if=/dev/zero of=zeroes bs=768K count=1 \
  && bun -e 'await Bun.readableStreamToText(Bun.file("zeroes").stream())'

Does not work.

dd if=/dev/zero of=zeroes bs=768K count=1 \
  && bun -e 'await Bun.readableStreamToText(Bun.file("zeroes").slice(0, 1).stream())'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbun.jsSomething to do with a Bun-specific APIbun:fs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions