oddity in virtualbox-ose-additions

Dag-Erling Smørgrav des at des.no
Mon Jul 13 17:48:11 UTC 2015


While trying to build $subj on 10.2, I noticed an oddity in the
Makefile:

	cd ${WRKSRC} && ${SH} env.sh && \
	    ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}

the last two lines are wrong - env.sh sets environment variables and
needs to be sourced into the shell before kmk is invoked, like
virtualbox-ose des:

	cd ${WRKSRC} && \
	    ${SH} -c '. env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}'

although I don't think it will fix the problem, which is that kmk just
hangs on wait channel umtxn.  I changed the Makefile so it reads:

	cd ${WRKSRC} && (. env.sh && ktrace -di env \
	    ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS})

"make build" now shows:

===>  Building for virtualbox-ose-additions-4.3.30
cd /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.3.30 && (. env.sh && ktrace -di env  VBOX_LIBPATH_X11=/usr/local /usr/local/bin/kmk )
Config.kmk:2463: /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.3.30/out/freebsd.amd64/release/DynamicConfig.kmk: No such file or directory
Config.kmk:5741: /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.3.30/out/freebsd.amd64/release/revision.kmk: No such file or directory

ktracing kmk shows:

 81309 kmk      0.384439 CALL  stat(0x7fffffffce80,0x7fffffffcf30)
 81309 kmk      0.384447 NAMI  "/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.3.30/kBuild/footer-pass2-compiling-targets.kmk"
 81309 kmk      0.384512 STRU  struct stat {dev=3814390055, ino=155726, mode=0100644, nlink=1, uid=0, gid=0, rdev=4294967295, atime=1436807940, stime=1422469074, ctime=1436807971.046414138, birthtime=1436807945.809426477, size=36256, blksize=36352, blocks=25, flags=0x800 }
 81309 kmk      0.384520 RET   stat 0
 81309 kmk      0.384530 CALL  open(0x801840658,0<O_RDONLY>,<unused>0x1b6)
 81309 kmk      0.384538 NAMI  "/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.3.30/kBuild/footer-pass2-compiling-targets.kmk"
 81309 kmk      0.384597 RET   open 7
 81309 kmk      0.384606 CALL  fcntl(0x7,F_SETFD,FD_CLOEXEC)
 81309 kmk      0.384614 RET   fcntl 0
 81309 kmk      0.384644 CALL  fstat(0x7,0x7fffffffd1e0)
 81309 kmk      0.384664 STRU  struct stat {dev=3814390055, ino=155726, mode=0100644, nlink=1, uid=0, gid=0, rdev=4294967295, atime=1436807940, stime=1422469074, ctime=1436807971.046414138, birthtime=1436807945.809426477, size=36256, blksize=36352, blocks=25, flags=0x800 }
 81309 kmk      0.384672 RET   fstat 0
 81309 kmk      0.384683 CALL  fstat(0x7,0x7fffffffd090)
 81309 kmk      0.384691 STRU  struct stat {dev=3814390055, ino=155726, mode=0100644, nlink=1, uid=0, gid=0, rdev=4294967295, atime=1436807940, stime=1422469074, ctime=1436807971.046414138, birthtime=1436807945.809426477, size=36256, blksize=36352, blocks=25, flags=0x800 }
 81309 kmk      0.384698 RET   fstat 0
 81309 kmk      0.384707 CALL  read(0x7,0x801b7a000,0x9000)
 81309 kmk      0.384856 GIO   fd 7 read 4096 bytes
 81309 kmk      0.384866 RET   read 36256/0x8da0
 81309 kmk      0.385414 CALL  mmap(0,0x400000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffffffff,0)
 81309 kmk      0.385432 RET   mmap 34389098496/0x801c00000
 81309 kmk      0.388062 CALL  _umtx_op(0x800ad9330,UMTX_OP_MUTEX_WAIT,0,0,0)
 81309 kmk      11.962347 RET   _umtx_op RESTART
 81309 kmk      11.962581 PSIG  SIGINT caught handler=0x8008c3f30 mask=0x0 code=SI_KERNEL
 81309 kmk      11.962640 CALL  sigreturn(0x7fffffffa460)
 81309 kmk      11.962667 RET   sigreturn JUSTRETURN
 81309 kmk      11.962692 CALL  _umtx_op(0x800ad9330,UMTX_OP_MUTEX_WAIT,0,0,0)

It ignores the SIGINT and remains stuck in the backgrounf until I
SIGKILL it (pkill -9 kmk).

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-emulation mailing list