timerfd in FreeBSD jail?

Martin "eto" Misuth eto.freebsd at ethome.sk
Tue Sep 6 13:07:18 UTC 2016


On Tue, 6 Sep 2016 11:38:23 +0000
Grzegorz Junka <list1 at gjunka.com> wrote:

> I am trying to compile dart-sdk in Centos 6 that's running in a FreeBSD 
> jail. I am getting the following error:
> 
> runtime/bin/eventhandler_linux.cc:114: error: Failed creating timerfd 
> file descriptor: 38

You probably already understand, that this is caused by Linux kernel
specific techology called timerfd (file descriptor acting as timer/clock). 
As far as I know FreeBSD doesn't support many such specifically Linux only
features natively.

Although there is Linux API emulator provided as kernel module, this is not 100%
compatible (it lags a bit behind the times given pace at which Linux rolls).
Usually older software works, but you might have problem with never one.

Second complication is jail, you need to recreate Linux emulation setup
in-jail, if you plan to use "Linux jails".

As you wrote "Centos 6 jail", I guess your jail, is an real Linux jail (you have
Linux emulation enabled on host and expose Linux emulated interfaces in
jail and all other necessery things, and Linux binaries work).

In that case you are out of luck, until FreeBSD Linux emu layer gains timerfd
support (what I guess won't happen anytime soon). 

However things you can still do, is to check whether this dart-sdk codebase
doesn't provides compile time option to use alternative mechanisms for timing,
as config option.

As timerfd is relatively new (circa 2007), codebase might have provisions
for some other mechanism.

> 
> Is this a limitation of the jail or I need to enable something to have 
> it available?
> 
> Grzegorz

This is limitation of Linux emulation.

  eto


More information about the freebsd-jail mailing list