Open sidesteps opened 9 months ago
Does /tmp exist?
yes
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)
test.js
import { realpathSync } from 'fs'
import { tmpdir } from 'os'
console.log(realpathSync(tmpdir()))
works fine on bun 1.0.25
on 1.0.26-debug, when running bun/build/bun-debug test.js
I get:
[SYS] read(3[/mnt/ssd/bun/build/bun-debug], 4096) = 4096 (0.135ms)
[fs] close(3[/mnt/ssd/bun/build/bun-debug])
[SYS] openat(-100, /mnt/ssd/bunfig.toml) = 18446744073709551614
[SYS] openat(-100, test.js) = 3
[SYS] fstat(3[/mnt/ssd/test.js]) = 0
[fs] close(3[/mnt/ssd/test.js])
[fs] close(4[/])
[fs] close(5[/mnt])
[fs] close(6[/mnt/ssd])
[SYS] openat(-100, /mnt/ssd/test.js) = 12
[fs] openat([invalid_fd], /mnt/ssd/test.js) = 12
[fs] close(12[/mnt/ssd/test.js])
[alloc] new() = src.bun.js.node.node_fs_binding.NodeJSFS@20000321400
[alloc] new() = src.bun.js.node.node_fs_binding.NodeJSFS@20000322800
[SYS] openat(-100, /tmp) = 12
[fs] close(12[/tmp])
[SYS] openat(-100, /mnt/ssd/test.js) = 12
[fs] openat([invalid_fd], /mnt/ssd/test.js) = 12
[fs] close(12[/mnt/ssd/test.js])
1 |
2 | import { realpathSync } from 'fs'
3 | import { tmpdir } from 'os'
4 | console.log(realpathSync(tmpdir()))
^
ENOENT: No such file or directory
errno: -2
syscall: "readlink"
path: "/tmp"
at /mnt/ssd/test.js:4:13
at asyncFunctionResume (:1:21)
at promiseReactionJobWithoutPromiseUnwrapAsyncContext (:1:21)
at promiseReactionJob (:1:21)
/proc/self/fd also exists?
stat /proc/self/fd
File: /proc/self/fd
Size: 3 Blocks: 0 IO Block: 1024 directory
Device: 0,21 Inode: 93950 Links: 2
Access: (0500/dr-x------) Uid: ( 1000/ sstep) Gid: ( 1000/ sstep)
Access: 2024-02-04 19:22:50.646543239 +0100
Modify: 2024-02-04 19:22:50.646543239 +0100
Change: 2024-02-04 19:22:50.646543239 +0100
Birth: -
Does /tmp exist?
did you run the test mentioned?
What version of Bun is running?
[SYS] read(3[/mnt/ssd/bun/build/bun-debug], 4096) = 4096 (0.417ms) [fs] close(3[/mnt/ssd/bun/build/bun-debug]) 1.0.26-debug+c3faf4228
What platform is your computer?
Linux 6.7.1-arch1-1 x86_64 unknown
What steps can reproduce the bug?
when runing sqlite tests:
./build/bun-debug test test/js/bun/sqlite/
What is the expected behavior?
test passing
What do you see instead?
Additional information
My bun source code is on a symlinked dir. Maybe that has something to do with it.