Ticket #1312 (closed defect: fixed)

Opened 10 years ago

Last modified 6 years ago

kmk fails on zfs

Reported by: rmf Owned by: bird
Priority: minor Component: other
Version: VirtualBox Solaris Beta 1 Keywords: zfs kmk
Cc: Guest type: other
Host type: other


You cannot build virtualbox on solaris in a zfs filesystem because kmk will fail attempting to create directories with its builtin mkdir. Apparently, kmk's logic for directory existence is... less than optimal - it seems to try creating directories from /, whether or not they exist (unlike mkdir which tries to create the leaf dir and fails upward). The problem happens when it reaches a ZFS mountpoint, where mkdir(2) will return ENOSYS, instead of its expect EEXIST, causing kmk to bail out.

Only workaround is to build on a ufs filesystem, as kmk will do mkdirs whether or not the target exists.

Change History

comment:1 Changed 10 years ago by bird

  • Owner set to bird
  • Status changed from new to assigned

Thanks for you bug report. I will try fix this later today. It may take little while before a binary gets promoted to VirtualBox usage, so stay tuned.

Just got a deja vu here, and realized that I've already made a similar fix for VirtualBox ( ) where we encountered in on an nfs mount.

About that ENOSYS usage on Solaris. The mkdir man page does not list ENOSYS as a possible errno, at least not in build 81 and 71. The Single UNIX Specification (2004 Edition) doesn't list it either. The ENOSYS definition in SuS can be understood to mean that it should only be used if mkdir isn't implemented at all (see section 2.3). Which is probably why the mkdir code I've borrowed from BSD totally does not expect mkdir to return ENOSYS.

I'm left wondering if this is a problem in Solaris or if it's behaving as designed...

comment:2 Changed 10 years ago by bird

Exactly which solaris version is this? Our Solaris based developers has no problems, so they are very curious about which version/build this is happing on.

comment:3 Changed 10 years ago by rmf

at the time, it was s10u4 ( I think this was before the build requirements were fully out). Having said that, I just tried some quick sanity checks on the problem (ie truss mkdir existing_file_in_zfs) and that returns EEXISTS (as it should). I'm trying to get the build environment working to something that approximates working again (currently having problems with libqt.. sigh). Sun may have fixed this in a kernel patch. I'll look into this and follow up.

btw, it would be helpful if the email out would put a more bogus reply address so you know you have to go to the web page....

comment:4 Changed 8 years ago by Technologov

Is this still relevant for VBox 3.2.6 ?


comment:5 Changed 6 years ago by frank

  • Status changed from assigned to closed
  • Resolution set to fixed

No response, closing.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use