Re: timerfd in FreeBSD jail?

2016-09-08 Thread Martin "eto" Misuth
On Wed, 07 Sep 2016 12:47:17 +0200
Alexander Leidinger  wrote:

> What is implemented as a syscall:
> https://svnweb.freebsd.org/base/head/sys/amd64/linux/syscalls.master?view=markup

Thank you, this is great ! I wonder what function linux_timerfd() does?
Is that older timerfd implementation from [1], it doesn't seem to be related
to timerfd_create()?

[1] https://lwn.net/Articles/251413/

  eto
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-07 Thread Alexander Leidinger
Quoting "Martin \"eto\" Misuth"  (from Tue, 6  
Sep 2016 16:07:31 +0200):



On Tue, 6 Sep 2016 13:19:13 +
Grzegorz Junka  wrote:



How would I know that this is not implemented in the linux
emulation layer rather than disabled on the host?

I would be interested in resource documenting emulated Linux syscall table
(on wiki perhaps) myself, maybe it is buried somewhere in the docs, but I
haven't found it yet.


What is implemented as a syscall:
https://svnweb.freebsd.org/base/head/sys/amd64/linux/syscalls.master?view=markup

But this doesn't include the ioctl's.

There's also (but not up-to-date):
https://wiki.freebsd.org/action/show/linux-kernel?action=show

Bye,
Alexander.

--
http://www.Leidinger.net alexan...@leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.orgnetch...@freebsd.org  : PGP 0x8F31830F9F2772BF


pgpV8x2ij9YK_.pgp
Description: Digitale PGP-Signatur


Re: timerfd in FreeBSD jail?

2016-09-06 Thread Grzegorz Junka


On 06/09/2016 14:07, Martin "eto" Misuth wrote:

On Tue, 6 Sep 2016 13:19:13 +
Grzegorz Junka  wrote:

OK, I was hoping that this is similar to creating ping sockets in jail,
that it needs to be enabled on the host for jail to actually be able to
execute ping.

Well unfortunately that is not the case, as you see.


How would I know that this is not implemented in the linux
emulation layer rather than disabled on the host?

I would be interested in resource documenting emulated Linux syscall table
(on wiki perhaps) myself, maybe it is buried somewhere in the docs, but I
haven't found it yet.

Supposedly SmartOS has similar emulator which is much more recent, I wonder
if FreeBSD masters could reuse some stuff from them. Seems Like emu is
not really top priority (as in supporting most recent stuffs) for FreeBSD
project right now.


And yes, I have the linux environment enabled and set up in the jail and
it mostly works fine. But I didn't put it under any stress yet. I will
see if the dart-sdk package can be somehow compiled without the timer_fd
options.

Third option, if you have time and willforce, is to ditch jail altogether, and
to try running your CentOS install in bhyve hypervisor. That way you will lose
some cycles in emulation, but as full virtual computer is provided, resulting
CentOS install should work same as in any other VM.

On the bright side you can then unload Linux emulation kernel modules from host.

   eto
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


I was planning to use bhyve but it wants to consume an up-front 
specified amount of hard drive and memory. I am running the emulation on 
my laptop with 4GB or RAM and have only limited amount of SSD disk 
available, so running a jail was much lighter on resources.

Grzegorz
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-06 Thread Martin "eto" Misuth
On Tue, 6 Sep 2016 13:19:13 +
Grzegorz Junka  wrote:
> OK, I was hoping that this is similar to creating ping sockets in jail, 
> that it needs to be enabled on the host for jail to actually be able to 
> execute ping. 
Well unfortunately that is not the case, as you see.

> How would I know that this is not implemented in the linux 
> emulation layer rather than disabled on the host?
I would be interested in resource documenting emulated Linux syscall table
(on wiki perhaps) myself, maybe it is buried somewhere in the docs, but I
haven't found it yet.

Supposedly SmartOS has similar emulator which is much more recent, I wonder 
if FreeBSD masters could reuse some stuff from them. Seems Like emu is
not really top priority (as in supporting most recent stuffs) for FreeBSD
project right now.

> 
> And yes, I have the linux environment enabled and set up in the jail and 
> it mostly works fine. But I didn't put it under any stress yet. I will 
> see if the dart-sdk package can be somehow compiled without the timer_fd 
> options.

Third option, if you have time and willforce, is to ditch jail altogether, and
to try running your CentOS install in bhyve hypervisor. That way you will lose
some cycles in emulation, but as full virtual computer is provided, resulting
CentOS install should work same as in any other VM.

On the bright side you can then unload Linux emulation kernel modules from host.

  eto
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-06 Thread Grzegorz Junka


On 06/09/2016 13:30, James Gritton wrote:

On 2016-09-06 07:08, Grzegorz Junka wrote:

On 06/09/2016 12:49, James Gritton wrote:
On 2016-09-06 05:38, Grzegorz Junka 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

Is this a limitation of the jail or I need to enable something to have
it available?
No idea, given that error message and unfamiliarity with the 
source.  Is there a linux system call or at >least library function 
you can narrow it down to?


Yes, this is when compiling sipxecs 
https://github.com/sipXcom/sipxecs, which uses the dart-sdk package 
>(dart_1.9.1-1_amd64.deb). The dart-sdk has been installed as 
instructed in this email (by unpacking a .deb):


https://groups.google.com/forum/#!msg/sipxcom-dev/EeRsfbh32CA/QXalcr0S2p4J 



And the actual file with the error is here (probably not the same 
version):


https://github.com/dart-lang/sdk/blob/master/runtime/bin/eventhandler_linux.cc#L114 



So, the linux call would be timerfd_create


It's not a jail problem, but a linux emulation problem. timerfd_create 
isn't implemented in FreeBSD's linux emulation.  Of note, the "38" is 
linux's ENOSYS errno code.


- Jamie


Oh, great, thanks for pointing that out.
Grzegorz
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-06 Thread James Gritton

On 2016-09-06 07:08, Grzegorz Junka wrote:

On 06/09/2016 12:49, James Gritton wrote:
On 2016-09-06 05:38, Grzegorz Junka 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

Is this a limitation of the jail or I need to enable something to have
it available?
No idea, given that error message and unfamiliarity with the source.  
Is there a linux system call or at >least library function you can 
narrow it down to?


Yes, this is when compiling sipxecs https://github.com/sipXcom/sipxecs, 
which uses the dart-sdk package >(dart_1.9.1-1_amd64.deb). The dart-sdk 
has been installed as instructed in this email (by unpacking a .deb):


https://groups.google.com/forum/#!msg/sipxcom-dev/EeRsfbh32CA/QXalcr0S2p4J

And the actual file with the error is here (probably not the same 
version):


https://github.com/dart-lang/sdk/blob/master/runtime/bin/eventhandler_linux.cc#L114

So, the linux call would be timerfd_create


It's not a jail problem, but a linux emulation problem.  timerfd_create 
isn't implemented in FreeBSD's linux emulation.  Of note, the "38" is 
linux's ENOSYS errno code.


- Jamie
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-06 Thread Grzegorz Junka


On 06/09/2016 12:35, Martin "eto" Misuth wrote:

On Tue, 6 Sep 2016 11:38:23 +
Grzegorz Junka  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
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


OK, I was hoping that this is similar to creating ping sockets in jail, 
that it needs to be enabled on the host for jail to actually be able to 
execute ping. How would I know that this is not implemented in the linux 
emulation layer rather than disabled on the host?


And yes, I have the linux environment enabled and set up in the jail and 
it mostly works fine. But I didn't put it under any stress yet. I will 
see if the dart-sdk package can be somehow compiled without the timer_fd 
options.


Thanks
Grzegorz
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-06 Thread James Gritton

On 2016-09-06 05:38, Grzegorz Junka 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

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


No idea, given that error message and unfamiliarity with the source.  Is 
there a linux system call or at least library function you can narrow it 
down to?


- Jamie
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-06 Thread Grzegorz Junka


On 06/09/2016 12:49, James Gritton wrote:

On 2016-09-06 05:38, Grzegorz Junka 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

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


No idea, given that error message and unfamiliarity with the source.  
Is there a linux system call or at least library function you can 
narrow it down to?


- Jamie


Yes, this is when compiling sipxecs https://github.com/sipXcom/sipxecs, 
which uses the dart-sdk package (dart_1.9.1-1_amd64.deb). The dart-sdk 
has been installed as instructed in this email (by unpacking a .deb):


https://groups.google.com/forum/#!msg/sipxcom-dev/EeRsfbh32CA/QXalcr0S2p4J 



And the actual file with the error is here (probably not the same version):

https://github.com/dart-lang/sdk/blob/master/runtime/bin/eventhandler_linux.cc#L114

So, the linux call would be timerfd_create

Grzegorz
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: timerfd in FreeBSD jail?

2016-09-06 Thread Martin "eto" Misuth
On Tue, 6 Sep 2016 11:38:23 +
Grzegorz Junka  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
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


timerfd in FreeBSD jail?

2016-09-06 Thread Grzegorz Junka
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


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


Grzegorz

___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"