Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#17870 closed bug (fixed)

opendir() on FIFO triggers kernel assertion

Reported by: hoanga Owned by: waddlesplash
Priority: normal Milestone: R1/beta4
Component: System/Kernel Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by hoanga)

hi,

i cannot compile and run tests for the rust nix crate on more recent versions of haiku. haiku support for the nix crate was merged into mainline in https://github.com/nix-rust/nix/pull/1703. with the (recent) https://github.com/nix-rust/nix/releases/tag/v0.25.0 crate release it has also been available as a crate as well.

i am attaching a screenshot of the stack trace that shows up when trying to compile inside of a virtualized instance. when attempting to build on plain hardware, the system just hangs and requires a hard reboot.

i have observed the system crashing on these nightly versions hrev55425 hrev56347 hrev56350

(note that on hrev56040 it seemed to build and run fine)

Steps to Reproduce

  • install haiku and update to a recent nightly
  • install rust (pkgman install rust_bin)
  • checkout nix repo (git clone https://github.com/nix-rust/nix)
  • try to build and run tests (cd nix && cargo build && cargo test)

Attachments (2)

haiku-stack-trace-on-compile-nix.png (1.3 MB ) - added by hoanga 21 months ago.
drive-setup-screenshot.png (210.4 KB ) - added by hoanga 21 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 by hoanga, 21 months ago

Description: modified (diff)

comment:2 by waddlesplash, 21 months ago

Please list what filesystems are mounted on this machine (e.g. BFS, FAT, NTFS, etc.) Most likely one of the filesystem drivers is faulty.

by hoanga, 21 months ago

Attachment: drive-setup-screenshot.png added

comment:3 by hoanga, 21 months ago

there is only a single BFS filesystem mounted in the virtualized system. attached a screenshot of DriveSetup, if there's a suggested method to query/list mounts i can also send that

comment:4 by waddlesplash, 21 months ago

There is definitely more than that because that only lists physical drive mounts; there's at least a packagefs mount also, and probably more.

I added some more debugging prints to this panic in hrev56357. Please test with that, and run the appropriate "dump" command (probably dump_vnode 0x.... with whatever value is listed in the message.) Assuming it's the vnode that you dumped, please also dump_mount 0x... with whatever mount is listed in the vnode dump information; then attach the picture of that KDL session here.

comment:5 by waddlesplash, 21 months ago

Even without the results of that debugging information, I am going to take a guess the problem in question is the FIFO layer, which doesn't provide an opendir() hook at all. I guess we should just add a default implementation in the VFS.

comment:6 by waddlesplash, 21 months ago

Component: - GeneralSystem/Kernel
Owner: changed from nobody to waddlesplash
Status: newassigned

comment:7 by waddlesplash, 21 months ago

Summary: kernel stack trace when compiling nix crateopendir() on FIFO triggers kernel assertion

Confirmed the problem.

comment:8 by waddlesplash, 21 months ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: assignedclosed

Fixed in hrev56360.

comment:9 by hoanga, 21 months ago

confirmed working for myself in hrev56362. thanks for the quick turnaround!

Note: See TracTickets for help on using tickets.