[PATCH] mgmt module: fix build

2016-06-26 Thread Nadav Har'El
Recent changes to move ifconfig.so out of the main OSv makefile broke the "mgmt" module build. This patch makes "scripts/build image=mgmt" work again. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- module.py| 1 + usr.manifest | 4 ++-- 2 files changed, 3

Re: OSv page cache

2016-07-24 Thread Nadav Har'El
On Sun, Jul 24, 2016 at 1:28 PM, Benoît Canet wrote: > > But, Benoit, is it possible that ZFS *is* trying to coalesce writes, just >> somehow misconfigured to aim at the wrong size? What I mean is, if you do >> write() operations of 10 bytes, will you see 10-byte

Re: OSv exits saying "vfork() stubbed"

2016-08-02 Thread Nadav Har'El
On Tue, Aug 2, 2016 at 12:51 PM, wrote: > Hi Team, > I'm trying to build an OSv application. I have successfully build the same > using capstan. But when I ran the application it prints the following logs > and exits. > > ~/bin/capstan run > Created instance: test >

[PATCH 2/3] libc: improve pthread_getaffinity_np()

2016-08-03 Thread Nadav Har'El
migration lock - so let's start using it. Refs #776. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- include/osv/sched.hh | 1 + libc/pthread.cc | 13 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/osv/sched.hh b/include/osv/sched.hh index 2

Re: [PATCH v2] sched: make sched_getaffinity accept arbitrary pid/tid

2016-08-03 Thread Nadav Har'El
On Mon, Jul 4, 2016 at 10:27 AM, Justin Cinkelj wrote: > Signed-off-by: Justin Cinkelj > --- > libc/pthread.cc | 53 - > 1 file changed, 28 insertions(+), 25 deletions(-) > > diff --git

[PATCH] sockets: fix recvmsg() function

2016-08-03 Thread Nadav Har'El
this code :-) This patch also adds a test for this bug, which passes on Linux, failed on OSv before this patch, and now passes on OSv too. Fixes #775 Signed-off-by: Nadav Har'El <n...@scylladb.com> --- bsd/sys/kern/uipc_syscalls_wrap.cc | 8 +++ tests/tst-uio.cc

[PATCH] Drop unneeded include statement

2016-07-20 Thread Nadav Har'El
Signed-off-by: Nadav Har'El <n...@scylladb.com> --- core/mempool.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/core/mempool.cc b/core/mempool.cc index 0fbd857..50c938f 100644 --- a/core/mempool.cc +++ b/core/mempool.cc @@ -11,7 +11,6 @@ #include #include #include -#i

[PATCH] Do not use enum class as constructor priority

2016-07-20 Thread Nadav Har'El
enum, which do have conversion to int. Put this enum inside a namespace so we can still use names like init_prio::sched and don't need to change any of the callers. Fixes #769 Signed-off-by: Nadav Har'El <n...@scylladb.com> --- include/osv/prio.hh | 4 +++- 1 file changed, 3 insertions

[PATCH] Avoid a warning with -Wno-tautological-compare

2016-07-20 Thread Nadav Har'El
Needed on gcc 6 for one of the files Signed-off-by: Nadav Har'El <n...@scylladb.com> --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 63427bf..530e9a5 100644 --- a/Makefile +++ b/Makefile @@ -502,6 +502,8 @@ $(out)/bsd/sys/netinet/in_rmx.o:

[PATCH] libc: stub implementation of register_printf_*() functions

2016-07-17 Thread Nadav Har'El
be enough for applications which want to use libquadmath (for example) for calculations but do not intend to use its printf extensions. Refs issue #765 (this issue should not be closed until we have a full implementation of these functions, or make a decision that we never will). Signed-off-by: Nadav

[PATCH 2/5] sched: make export_runtime() idempotent

2016-07-19 Thread Nadav Har'El
Allow running export_runtime() twice without ill-effect. A following patch will allow migrating sleeping threads, and migrating it again before it got to run is possible. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- core/sched.cc | 6 -- 1 file changed, 4 insertions(+), 2 del

[PATCH 1/5] sched: ignore thread in wrong wakeup queue

2016-07-19 Thread Nadav Har'El
with a wake() of the same thread, resulting in the thread remaining on the old cpu's wakeup queues, and we better ignore it there. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- core/sched.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/sched.cc b/core/sched.cc index 7

Re: [PATCH v3] Return list of all threads in given application

2016-07-05 Thread Nadav Har'El
On Tue, Jul 5, 2016 at 9:56 AM, Justin Cinkelj wrote: > Signed-off-by: Justin Cinkelj > --- > Makefile | 1 + > core/osv_c_wrappers.cc | 33 + > include/osv/osv_c_wrappers.h | 27

Re: [PATCH v2 2/2] Return list of all threads in given application

2016-07-05 Thread Nadav Har'El
glibc functions in OSv - they all are supposed to have C linkage, but the the "extern C" is almost always in the header file, not the .c file. Maybe the prototype is not exactly identical? I'll take a look at your patch. > BR Justin > > On 07/04/2016 06:54 PM, Nadav Har'El wrote:

Re: [PATCH v2 1/2] app: execute function on all threads of one application

2016-07-04 Thread Nadav Har'El
Thanks. Nitpick (but I'll commit anyway as-is): I think you could have used a const reference to the thread th1 instead of a regular reference. -- Nadav Har'El n...@scylladb.com On Mon, Jul 4, 2016 at 7:26 PM, Justin Cinkelj <justin.cink...@xlab.si> wrote: > Application is identifi

Re: [PATCH v2 2/2] Return list of all threads in given application

2016-07-04 Thread Nadav Har'El
Hi, thanks. Looks mostly good but some comments below. On Mon, Jul 4, 2016 at 7:26 PM, Justin Cinkelj wrote: > Signed-off-by: Justin Cinkelj > --- > Makefile | 1 + > core/osv_c_wrappers.cc | 39

Re: Build failed in Jenkins: osv-build #1103

2016-08-07 Thread Nadav Har'El
FYI, these tests have been failing for a long time on Jenkins, it's just that a "scripts/build" bug hid this failure (see https://github.com/cloudius-systems/osv/issues/779) On Sun, Aug 7, 2016 at 10:46 PM, wrote: > + exec ./scripts/test.py > TEST java

Re: [PATCH] Makefile: fix gcc 6 compilation failure due to header order

2016-07-23 Thread Nadav Har'El
Makefile:372: recipe for target 'build/release.x64/loader.o' failed > make: *** [build/release.x64/loader.o] Error 1 > [benoit@scylla osv]$ ^C > [benoit@scylla osv]$ > > > 2016-07-22 20:32 GMT+02:00 Nadav Har'El <n...@scylladb.com>: > >> Starting with gcc 6, som

Re: [PATCH] sched: return list of threads from a single app

2016-07-03 Thread Nadav Har'El
On Thu, Jun 30, 2016 at 8:57 PM, Justin Cinkelj wrote: > Signed-off-by: Justin Cinkelj > --- > core/sched.cc| 45 + > include/osv/sched.hh | 1 + > 2 files changed, 46 insertions(+) > > diff

Re: [RFC v2 4/4] httpserver: report if application did finish

2017-02-01 Thread Nadav Har'El
On Thu, Feb 2, 2017 at 12:12 AM, Nadav Har'El <n...@scylladb.com> wrote: > +sched::with_all_threads([&](sched::thread ) { > >> +if (t.id() == tid && t.get_status() != >> sched::thread::status::terminated) { >

Re: [RFC v2 4/4] httpserver: report if application did finish

2017-02-01 Thread Nadav Har'El
On Tue, Jan 31, 2017 at 11:36 PM, Justin Cinkelj wrote: > Fixes #845. > > Signed-off-by: Justin Cinkelj > --- > modules/httpserver/api-doc/listings/app.json | 26 > ++ > modules/httpserver/api/app.cc| 18

Re: [RFC v2 3/4] httpserver: return thread ID of the started app

2017-02-01 Thread Nadav Har'El
On Wed, Feb 1, 2017 at 7:02 PM, Justin Cinkelj wrote: > > > > > Amnon, if we're changing the return value of the app/command REST API in > > OSv from always returning a null string to returning a string with > numbers > > in it, are we supposed to modify some API

[PATCH] sched::with_thread_by_id()

2017-02-01 Thread Nadav Har'El
::with_thread_by_id() which runs a given function on the thread with the given id - while holding a mutex which prevents threads (including this one) from exiting. Because it holds this mutex, the function should typically be very short - e.g., test something about this thread. Signed-off-by: Nadav

Re: [PATCH 2/3] bsd: xen: place __ffs() into proper header

2017-02-06 Thread Nadav Har'El
On Mon, Feb 6, 2017 at 3:45 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Move x64-specific implementation out of common event channel code > to platform-specific header, where other asm snippets reside. > This will allow aarch64 to reuse common code. > I think we

Re: [PATCH 3/3] osv: xen_intr: use evtchn.h

2017-02-07 Thread Nadav Har'El
After this patch, I can't compile on aarch64: $ make arch=aarch64 ... bsd/sys/xen/evtchn.cc:33:32: fatal error: machine/xen/xen-os.h: No such file or directory #include -- Nadav Har'El n...@scylladb.com On Mon, Feb 6, 2017 at 3:45 PM, 'Sergiy Kibrik' via OSv Development < osv-

Re: [PATCH] httpserver / osv::run_background: Don't keep apps alive forever

2017-02-05 Thread Nadav Har'El
On Thu, Feb 2, 2017 at 5:19 PM, Justin Cinkelj wrote: > > >> I think we can do something similar (at least to 1-3). Instead of my >> previous patch, do something like this: >> >> 1. httpserver uses osv::run_background() to run the background operation, >> and receives

Re: [RFC] jetty build problem on Linux

2017-02-06 Thread Nadav Har'El
On Mon, Feb 6, 2017 at 2:35 AM, 'Quentin Barnes' via OSv Development < osv-dev@googlegroups.com> wrote: > I ran acrossed a problem when building the jetty demo on Linux (RHEL > 7.3). I'm not sure why no one else has hit this problem. That is, > if no one has built this demo on Linux or if

Re: trace call stack

2017-02-06 Thread Nadav Har'El
On Sun, Feb 5, 2017 at 7:42 PM, Vasily A. Sartakov wrote: > Greetings > > I need a tool for tracing call stack. Something very simple: on demand, in > some place, I want to obtain list of previous calls in form of addressed, > maybe some more data, You want to do a

Re: [PATCH] elf.cc: expect .note.osv-mlock section with no strings

2017-01-23 Thread Nadav Har'El
On Mon, Jan 23, 2017 at 11:46 AM, Justin Cinkelj wrote: > Code to remove \0 at end of string tried to copy strlen()-1 data bytes. > It didn't expect the .note.osv-mlock section to contains only 0x00. > This caused attempt to allocate and copy -1 bytes, converted to about

Re: [RFC] aarch64: basic Xen support

2017-01-23 Thread Nadav Har'El
On Mon, Jan 23, 2017 at 12:51 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > hi Roman, > > On 01/20/2017 06:57 PM, Roman Shaposhnik wrote: > >> this is super cool -- I've been very interested in seeing resurrected >> support for OSv on Xen/ARM >> for a different

Re: [PATCH] libc: implement gethostid

2017-01-24 Thread Nadav Har'El
Thanks. Comments inline below: -- Nadav Har'El n...@scylladb.com On Tue, Jan 24, 2017 at 12:22 AM, Justin Cinkelj <justin.cink...@xlab.si> wrote: > MAC address of first "real" ethernet interface is used as uniqeu > typo: unique > host identifier. > > Fixes

[PATCH] httpserver / osv::run_background: Don't keep apps alive forever

2017-01-26 Thread Nadav Har'El
r changing application::start() massively. Fixes #843. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- include/osv/app.hh | 4 core/app.cc| 22 ++ 2 files changed, 26 insertions(+) diff --git a/include/osv/app.hh b/include/osv/app.hh index 3237ebc

[PATCH] app: clear up the osv::run() confusion

2017-01-26 Thread Nadav Har'El
to osv::run_background(). Signed-off-by: Nadav Har'El <n...@scylladb.com> --- include/osv/app.hh| 2 +- core/app.cc | 2 +- modules/httpserver/api/app.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/osv/app.hh b/include/osv/app.hh

[PATCH] header files: don't include

2017-01-30 Thread Nadav Har'El
e inclusion of from . This was added in 741b5563f9045ed07c387bbad63f6c8a9ee75209 and is not actually needed (the caller can include on its own, it doesn't need to do it - see syscall(2)). Signed-off-by: Nadav Har'El <n...@scylladb.com> --- include/api/syscall.h | 1 - include/osv/file.h

Re: [RFC 2/4] app: optionaly return thread ID of newly started app

2017-01-30 Thread Nadav Har'El
On Mon, Jan 30, 2017 at 4:19 PM, Justin Cinkelj wrote: > > > Maybe there is one significant difference between osv_execve() befor/after > Nadav's fixed it, and the code above. > osv_execve() tried to set new thread id in the code executed inside that > new thread. So new

Re: [PATCH 01/10] aarch64: preboot: add magic Linux header

2017-01-22 Thread Nadav Har'El
On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Add Linux-resembling header at the begining of image, > so that it can be recognized and loaded by Xen ARM64 image loader, > and probably some other loaders too. > Thanks. Looks good. I have

Re: [PATCH 05/10] aarch64: mmu: extend device memory range for GIC

2017-01-22 Thread Nadav Har'El
Reviewed-by: Nadav Har'El <n...@scylladb.com> -- Nadav Har'El n...@scylladb.com On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Start device range from 0x300 so that aarch64 Xen guest can map gic. > This seems to

Re: [PATCH 07/10] bsd: xen: add headers for aarch64 support

2017-01-22 Thread Nadav Har'El
Reviewed-by: Nadav Har'El <n...@scylladb.com> -- Nadav Har'El n...@scylladb.com On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Signed-off-by: Sergiy Kibrik <sergiy.kib...@globallogic.com> > --- > bsd/aarc

Re: [PATCH 02/10] bsd: xen: console_io hypercall accepts constant string

2017-01-22 Thread Nadav Har'El
Reviewed-by: Nadav Har'El <n...@scylladb.com> We could have also changed the interface of HYPERVISOR_console_io, but I guess you preferred not to modify that unmodified BSD header? -- Nadav Har'El n...@scylladb.com On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development <

Re: [RFC] aarch64: basic Xen support

2017-01-22 Thread Nadav Har'El
On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > hi OSv developers, > Here let me present you with some little work to allow OSv kernel to be > loaded > under Xen hypervisor on AARCH64 platform. > > This is basic stuff, which allows to

Re: [PATCH 03/10] osv: use __ASSEMBLER__ instead of ASSEMBLER

2017-01-22 Thread Nadav Har'El
Reviewed-by: Nadav Har'El <n...@scylladb.com> Just a typo in the commit message - that's __ASSEMBLY__, not __ASSEMBLER__. -- Nadav Har'El n...@scylladb.com On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > __ASSEMBLER__ def

Re: [PATCH 06/10] aarch64: add Xen hypercalls

2017-01-22 Thread Nadav Har'El
Reviewed-by: Nadav Har'El <n...@scylladb.com> -- Nadav Har'El n...@scylladb.com On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Signed-off-by: Sergiy Kibrik <sergiy.kib...@globallogic.com> > --- > ar

Re: [PATCH 08/10] osv: add Xen console basic driver

2017-01-22 Thread Nadav Har'El
g., in x64, for the "early console" we use console::isa_serial_console::early_init()). -- Nadav Har'El n...@scylladb.com On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Primitive driver that uses HYPERVISOR_console_io hyperca

Re: [PATCH 10/10] aarch64: choose early console driver at runtime

2017-01-22 Thread Nadav Har'El
Hi, Here I have doubts on whether this is the right approach - If we have the pl011_console class and the xen_console class, why can't early_console simply being set to one of them, instead of needing to choose between them on every write()? On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via

Re: [PATCH] httpserver / osv::run_background: Don't keep apps alive forever

2017-01-28 Thread Nadav Har'El
On Sat, Jan 28, 2017 at 1:22 AM, Justin Cinkelj wrote: > One thing confuses me - how/why the original commit worked for Nadav? > Again some compiler difference (gcc 4.8...) > To be honest, I was surprised that the "magic number" was 3, I'm not even sure who holds all

Re: [PATCH 4/8] bsd: xen: add synch_bitops.h and xen-os.h for AARCH64

2017-02-21 Thread Nadav Har'El
On Mon, Feb 20, 2017 at 3:32 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > evtchn and gnttab drivers use these operations extensively. > > Signed-off-by: Sergiy Kibrik > --- > bsd/aarch64/machine/xen/synch_bitops.h | 59

Re: OVA image no longer working on ESX

2017-02-20 Thread Nadav Har'El
Hi, I don't have access to any version of VMware so I can't test this myself, but I can ask you guys questions: On Fri, Feb 10, 2017 at 1:49 PM, wrote: > > Here is what worked for us: > > 1. Download the VMware workstation image from http://downloads.osv.io.s3. >

Re: [PATCH] httpserver: optionaly start app in new ELF namespace

2017-02-19 Thread Nadav Har'El
On Fri, Feb 17, 2017 at 1:15 PM, Justin Cinkelj wrote: > Running multiple instances of same program at the same time (or even > same program multiple times) can fail as ELF object and requied libraries > are already loaded. When program is run for the second time, global

[PATCH] Really fix wake_lock() race

2017-02-21 Thread Nadav Har'El
aiting for the mutex, on a different wr), but when it does wake up, and poll()s all the wr, it will see the woken wr as being woken, as expected. Fixes #824 Signed-off-by: Nadav Har'El <n...@scylladb.com> --- core/sched.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/core/sched.cc b/core/sc

Re: [PATCH 7/8] osv: xen_intr: do not use unmask_evtchn() in IRQ handler

2017-02-21 Thread Nadav Har'El
Hmm, looks reasonable to me, but I am not familar at all with the context, so I have no idea if this change has any downsides. Glauber, maybe you can take a look at this patch? Thanks, Nadav. -- Nadav Har'El n...@scylladb.com On Mon, Feb 20, 2017 at 3:32 PM, 'Sergiy Kibrik' via OSv Development

Re: aarch64: xen event channels support

2017-02-21 Thread Nadav Har'El
On Mon, Feb 20, 2017 at 3:32 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > hi OSv developers, > Let me present patches that allow OSv to work with Xen event channels on > aarch64 platform. > This series contains some clean up work -- to remove unused (and probably >

Re: [PATCH 09/10] aarch64: detect Xen hypervisor

2017-01-22 Thread Nadav Har'El
Reviewed-by: Nadav Har'El <n...@scylladb.com> One nitpick below. On Fri, Jan 20, 2017 at 1:04 PM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Xen crafts and provides a DTB with special node by which we can know > which hypervisor we're using and

[PATCH] pthread: allow unpinning thread

2017-01-18 Thread Nadav Har'El
Allow unpinning a thread with pthread_setaffinity_np() and sched_setaffinity() by setting the CPU mask to all CPUs. We still do not support setting the CPU mask to an arbitrary subset of CPUs - just to either one CPU, or all of them. Fixes #778 Signed-off-by: Nadav Har'El <n...@scylladb.

Re: [PATCH] Changed json formatter to escape strings according to the spec

2017-01-19 Thread Nadav Har'El
Thanks, looks good - also according to https://www.ietf.org/rfc/rfc4627.txt section 2.5. I'll commit it now. -- Nadav Har'El n...@scylladb.com On Thu, Jan 19, 2017 at 6:52 AM, Waldemar Kozaczuk <jwkozac...@gmail.com> wrote: > Changed formatter::to_json methods that format strin

Re: cli not working correctly when run with httpserver.so --ssl enabled

2017-01-19 Thread Nadav Har'El
On Thu, Jan 19, 2017 at 3:02 PM, wrote: > I ran OSv on VMware player with the following modules > (image=httpserver.fg_ssl,java,cli,certs). When I ran cli with almost > commands, it returned the following message: "Unknown response code > closed". But when I run the image

Re: cli not working correctly when run with httpserver.so --ssl enabled

2017-01-19 Thread Nadav Har'El
On Thu, Jan 19, 2017 at 3:32 PM, <mld.priv...@gmail.com> wrote: > Vào 20:11:30 UTC+7 Thứ Năm, ngày 19 tháng 1 năm 2017, Nadav Har'El đã viết: > > On Thu, Jan 19, 2017 at 3:02 PM, <mld.p...@gmail.com> wrote: > > I ran OSv on VMware player with the following modules >

[PATCH] sched::thread: add unpin() method

2017-01-17 Thread Nadav Har'El
not yet change sched_setaffinity() and friends to call the new unpin() method. This will come in a later patch. Refs #778. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- include/osv/sched.hh | 7 +++ core/sched.cc| 36 tests/tst-

Re: [PATCH 2/2] ifup: mark the interface as running

2016-08-21 Thread Nadav Har'El
On Wed, Aug 17, 2016 at 9:54 PM, Benoit Canet < benoit.canet.cont...@gmail.com> wrote: > Signed-of-by: BenoÃt Canet > --- > bsd/porting/networking.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/bsd/porting/networking.cc

Re: [PATCH 1/2] libc: add pthread_getid utility fucntion

2016-08-21 Thread Nadav Har'El
Hi Justin, On Tue, Aug 16, 2016 at 9:50 AM, Justin Cinkelj wrote: > pthread_getid is only a convience function to convert pthread_t to > corresponding thread ID. It is added here to avoid manually casting > pthread_t to osv::pthread at other places. > > Signed-off-by:

Re: [PATCH 1/2] getifaddrs: Make getifaddr return physical interface mac address

2016-08-20 Thread Nadav Har'El
Hi Benoit, On Wed, Aug 17, 2016 at 9:54 PM, Benoit Canet < benoit.canet.cont...@gmail.com> wrote: > This fix a bug in OSv musl that has been fixed in upstream musl > by using netlink. Since OSv does not implement netlink add > a function in if.cc in order to copy and interface mac address >

Re: [PATCH v3] libc: add CPU_COUNT_S

2016-08-20 Thread Nadav Har'El
Thanks Justin. I've been away from civilization for a week (a vacation plus a malfunctioning laptop) so hopefully I'll be able to commit your patch tomorrow. The patch looks good and correct.. -- Nadav Har'El n...@scylladb.com On Thu, Aug 18, 2016 at 3:30 PM, Justin Cinkelj <justin.c

Re: Questions on OSv Makefile or Capstanfile

2016-08-20 Thread Nadav Har'El
On Thu, Aug 18, 2016 at 2:41 PM, Benoît Canet wrote: > > For Makefile they are a well know UNIX mess. > One of the official documentation is here: https://www.gnu.org/ > software/make/manual/make.html but it's not easy to grok. > You will probably end up doing like

[PATCH] RFC: osv::run() do not create a new thread

2016-08-22 Thread Nadav Har'El
this new application::run_and_join(). The osv_execve() suffered from the unnecessary thread in that the actual application code does not run in the thread id returned by it, but rather in a child thread. After this patch, it should return the right thread id. Signed-off-by: Nadav Har'El &l

Re: tst-tls.so failing when running tests in single OSv instance

2017-02-26 Thread Nadav Har'El
On Sun, Feb 26, 2017 at 1:45 PM, Nadav Har'El <n...@scylladb.com> wrote: > > The "-s" option runs all the tests (I assume only the simple C ones, not > more complex tests involving host-side processing, etc.?) on one OSv guest. > We haven't done this in a long while,

Re: tst-feexcept.so unit test failing locally

2017-02-26 Thread Nadav Har'El
Thanks. I can reproduce this on any machine by running on pure qemu without KVM. I opened an issue: https://github.com/cloudius-systems/osv/issues/855 -- Nadav Har'El n...@scylladb.com On Fri, Feb 24, 2017 at 2:31 PM, Waldek Kozaczuk <jwkozac...@gmail.com> wrote: > This test fails con

Re: Build failed in Jenkins: osv-build-nightly #1040

2017-02-28 Thread Nadav Har'El
I opened https://github.com/cloudius-systems/osv/issues/859 on this test failure. I can't reproduce it on my own machine - I tried 1,000 times and it never failed once. -- Nadav Har'El n...@scylladb.com On Tue, Feb 28, 2017 at 3:47 PM, <jenk...@scylladb.com> wrote: >

Re: [PATCH 2/2] app: return main thread id to the caller

2016-08-22 Thread Nadav Har'El
On Tue, Aug 23, 2016 at 12:32 AM, Nadav Har'El <n...@scylladb.com> wrote: > > On Mon, Aug 22, 2016 at 6:51 PM, Justin Cinkelj <justin.cink...@xlab.si> > wrote: > >> Seems that here and there, osv_execve returns with thread_id still at 0, >> instead of containin

[PATCH] RFC: osv_execve() should wait for app_runtime to be set

2016-08-25 Thread Nadav Har'El
r only know use case. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- include/osv/app.hh | 7 +-- core/app.cc| 11 --- core/osv_execve.cc | 23 --- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/include/osv/app.hh b/includ

Re: [PATCH 1/2] x64: 'syscall' instruction support

2016-08-25 Thread Nadav Har'El
Hi Benoit (and Pekka), thanks. Here are some comments and questions: -- Nadav Har'El n...@scylladb.com On Thu, Aug 25, 2016 at 1:07 PM, Benoit Canet < benoit.canet.cont...@gmail.com> wrote: > Enable "fast system calls" via the 'syscall' instruction on OSv. The > ins

Re: [PATCH 2/2] app: return main thread id to the caller

2016-08-25 Thread Nadav Har'El
I just sent another RFC patch which should cause osv_execve to wait until app_runtime() is the new application's. I haven't really tested it much beyond the usual "make check" - can you please try it out? Thanks, Nadav. -- Nadav Har'El n...@scylladb.com On Wed, Aug 24, 2016 at 7:21

Re: [PATCH 1/5] app: Factorize argc and argv construction

2016-09-03 Thread Nadav Har'El
/.gitorderfile (the "renames" thing is unrelated, but also useful) And then in ~/.gitorderfile something like: *.hh *.cc * -- Nadav Har'El n...@scylladb.com On Fri, Sep 2, 2016 at 3:24 PM, Benoit Canet <benoit.canet.cont...@gmail.com > wrote: > The go c-shared object need th

Re: [PATCH 5/5] auxv: Pass the libvdso.so address via auxv

2016-09-03 Thread Nadav Har'El
On Fri, Sep 2, 2016 at 5:35 PM, Benoit Canet wrote: > This will allow go program to get the vdso library address. > > Signed-off-by: Benoît Canet > --- > core/app.cc| 29 ++--- > include/osv/app.hh | 8

Golang and TLS

2016-09-01 Thread Nadav Har'El
does *something* similar to what I want - it seems it has a single TLS variable (in the "initial exec" variant of the ELF TLS standard). On the other hand, I also read it still uses prctl()... So *should* c-shared do what I am looking for? Does it in fact do this currently?

Re: Golang and TLS

2016-09-01 Thread Nadav Har'El
On Fri, Sep 2, 2016 at 12:58 AM, Paweł Dziepak <pdzie...@scylladb.com> wrote: > On 1 September 2016 at 12:05, Nadav Har'El <n...@scylladb.com> wrote: > > BUT, from the code we've inspected, it seems that golang-compiled code >> doesn't use this technique. Instead, it

Re: [PATCH] signal: Make room for 64th signal

2016-08-30 Thread Nadav Har'El
On Tue, Aug 30, 2016 at 4:45 PM, Benoit Canet < benoit.canet.cont...@gmail.com> wrote: > The last signal of the list didn't have enough room for > him because signal numbers start at 1. > Make him some room so sigaction won't fail for him > when go lib execute. > We have a bunch of other places

[PATCH 1/2] syscall: fix indentation mishmash in entry.S

2016-08-29 Thread Nadav Har'El
No functional changes. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- arch/x64/entry.S | 166 --- 1 file changed, 86 insertions(+), 80 deletions(-) diff --git a/arch/x64/entry.S b/arch/x64/entry.S index 48a0a71..e265a30 100644 ---

[PATCH 2/2] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Nadav Har'El
out of the registers saved on the stack, so I took this opportunity to remove some of the useless things we saved (like rax, which will be overwritten by a return value anyway) or saved multiple times (rcx, rsp). Signed-off-by: Nadav Har'El <n...@scylladb.com> -

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Nadav Har'El
On Mon, Aug 29, 2016 at 8:12 PM, Avi Kivity wrote: > > > On 08/29/2016 08:10 PM, Benoît Canet wrote: > > > > On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity wrote: > >> diff --git a/arch/x64/entry.S b/arch/x64/entry.S >> >>> index e265a30..e3be0bc 100644 >>>

Re: Some questions on OSv?

2016-08-30 Thread Nadav Har'El
On Tue, Aug 30, 2016 at 6:08 AM, wrote: > Hello everyone, > I am new to OSv,these days I have done some experiments on OSv,I > found it was a great project,I am interested in it very much.But now I have > some questions to ask,I will appreciate it very much if

[PATCH] syscall: fix (again) gdb support

2016-08-30 Thread Nadav Har'El
should now be possible (I hope) in cases which failed previously. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- arch/x64/entry.S | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/arch/x64/entry.S b/arch/x64/entry.S index 8fdc5a0..dda7358

Re: [PATCH] linux: arch_prctl() system call

2016-08-31 Thread Nadav Har'El
e system call. 3. It's even worse if after a thread does ARCH_SET_FS is calls a function directly, not through a system call. e.g., malloc(). It is possible (???) that Go is aware of this problem and restores the FS_BASE before calling C functions, but if it doesn't, we're in big problems. -- N

Re: [PATCH] golang-example: Use shared and pie compilation flags

2016-08-31 Thread Nadav Har'El
On Wed, Aug 31, 2016 at 4:26 PM, Benoît Canet wrote: > > > Go use it's own tls see: http://blog.altoros.com/golang-internals-part-5- > runtime-bootstrap-process.html > Thanks. Interesting. It is very sad, and surprising, that Go does this: If I understand

Re: [PATCH] golang-example: Use shared and pie compilation flags

2016-08-31 Thread Nadav Har'El
On Wed, Aug 31, 2016 at 4:26 PM, Benoît Canet wrote: > > Buildmode shared alone crash. > > > the flags are |= between them. > This is not what I see in https://golang.org/src/cmd/go/build.go But it seems these two options indeed have a funny interaction between

Re: [PATCH] golang-example: Use shared and pie compilation flags

2016-08-31 Thread Nadav Har'El
static_cast<u64*>(addr) = t->dyn_tabs.lookup(sym)->st_value - > t->tls.size; >break; >case R_X86_64_IRELATIVE: > > > On Wed, Aug 31, 2016 at 4:07 PM, Benoît Canet <ben...@cloudius-systems.com > > wrote: > >> This is what I saw in the code managing th

Re: [PATCH] golang-example: Use shared and pie compilation flags

2016-08-31 Thread Nadav Har'El
On Wed, Aug 31, 2016 at 5:33 PM, Nadav Har'El <n...@scylladb.com> wrote: > I'm more worried about the symbol(sym) part of this code... What if there > is no symbol involved? In this case (again see readelf --relocs for your > object), there is no object... > > I th

Re: [PATCH] linux: arch_prctl() system call

2016-08-31 Thread Nadav Har'El
On Wed, Aug 31, 2016 at 4:04 PM, Benoit Canet < benoit.canet.cont...@gmail.com> wrote: > Needed by libraries produced by the Go compiler. > > With this patch and the golang app the runtime > init crash later because of a vdso issue. > > It can be examinated by insertion an abort() > before osv

Re: [PATCH] Added OpenJDK Zulu compact profile base images and example apps for each profile

2016-09-14 Thread Nadav Har'El
Thanks, I committed these patches. I think that the three separate example apps were not strictly necessary, as one can do something like scripts/build image=openjdk8-zulu-compact1,java-example to build an image with this specific version of Java and the same Java example. -- Nadav Har'El

Re: Support Java 9 minimal runtime on OSv

2016-09-26 Thread Nadav Har'El
On Fri, Sep 23, 2016 at 4:08 PM, Waldek Kozaczuk wrote: > When I build it with java 8 (./scripts/build image=openjdk8-fedora,derby) > and try to run it I get OSv to crash like this (missing PR_CallOnce system > call?): > > OSv v0.24-193-gd64db4a > eth0: 192.168.122.15 >

Re: [PATCH] tcp_input: net channel state fix

2016-09-19 Thread Nadav Har'El
I'm having a hard time understanding this patch. Maybe Avi (CCed) remembers some of the code involved (which he wrote) and might have better comments. Some questions inline below: -- Nadav Har'El n...@scylladb.com On Fri, Sep 9, 2016 at 9:08 PM, Timmons C. Player < timmons.pla...@spirent.

[PATCH] sched: only allocate sched::thread objects on the heap

2016-09-19 Thread Nadav Har'El
d objects in mmap()ed areas. One of the places modified is rcu_flush(), whose on-stack sched::thread objects are what caused issue #790. Fixes #790. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- drivers/virtio-net.hh | 6 ++-- drivers/virtio-rng.hh | 2 +- driver

[PATCH] RFC: force sched::thread to be in heap

2016-09-18 Thread Nadav Har'El
tack sched::thread objects are what caused issue #790 to surface. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- drivers/virtio-net.hh | 6 +-- drivers/virtio-rng.hh | 2 +- drivers/vmxnet3.hh| 4 +- include/osv/dhcp.hh | 2 +- includ

Re: Current State of C++ Unikernels

2016-09-18 Thread Nadav Har'El
On Fri, Sep 16, 2016 at 3:28 AM, Ian Eyberg wrote: Hi All: > > I gave a presentation last night at the ACCU meetup on the 'Current > State of C++ Unikernels'. Dor happened to be around and mentioned that this > list might be interested in seeing the slides I was presenting

Lazy TLB flushing

2016-09-18 Thread Nadav Har'El
dler could then zero it (if not already zero)? Thanks, Nadav. -- Nadav Har'El n...@scylladb.com -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-de

Re: [PATCH] memory: Prevent array overflow in l1 page buffer pool.

2016-09-18 Thread Nadav Har'El
By the way, I wonder if this solves https://github.com/cloudius-systems/osv/issues/755 which features a crash in a similar area of the code. Justin (CC'ed) might be able to confirm if he can still reproduce issue 755. -- Nadav Har'El n...@scylladb.com On Thu, Sep 15, 2016 at 2:18 PM, Player

Re: [PATCH] tcp_input: net channel state fix

2016-09-18 Thread Nadav Har'El
I am guessing that this patch fixes https://github.com/cloudius-systems/osv/issues/726 *Justin* - can you still reproduce this issue? If so, can you please check if this patch fixes it? -- Nadav Har'El n...@scylladb.com On Fri, Sep 9, 2016 at 8:08 PM, Timmons C. Player < timmons.

Re: Current State of C++ Unikernels

2016-09-19 Thread Nadav Har'El
On Mon, Sep 19, 2016 at 2:10 AM, Waldek Kozaczuk wrote: > OSv has already a concept of module but I wonder if its core can be made > modular as well. For example there could be something like osv.base, > osv.io (osv.io.read, osv.io.write, etc), osv.net, etc I do not know >

Re: Lazy TLB flushing

2016-09-19 Thread Nadav Har'El
On Mon, Sep 19, 2016 at 1:11 PM, Gleb Natapov wrote: > > So if I understand correctly, both your and Gleb's sentiment is there is > no > > need not to make the scheduler more forgiving for page table changes, but > > rather require that sched::threads objects live in a mapping

Re: [PATCH] tcp_input: net channel state fix

2016-09-19 Thread Nadav Har'El
On Mon, Sep 19, 2016 at 4:37 PM, Player, Timmons wrote: > Well, KASSERT only actually fails in debug builds, so you’d never see a > problem with a release build > (since NDEBUG is defined in conf/release.mk). > So this patch looks like it is doing reasonable things

Re: [PATCH] memory: Prevent array overflow in l1 page buffer pool.

2016-09-19 Thread Nadav Har'El
Thanks for this patch. Looks serious, and I wonder if it explains https://github.com/cloudius-systems/osv/issues/755 Some comments and questions below. On Fri, Sep 9, 2016 at 8:12 PM, Timmons C. Player < timmons.pla...@spirent.com> wrote: > Under high levels of memory page churn, the array of

Re: [PATCH] epoll: Bump the file reference count while polling.

2016-09-19 Thread Nadav Har'El
On Fri, Sep 9, 2016 at 9:26 PM, Timmons C. Player < timmons.pla...@spirent.com> wrote: > There is a potential lock order inversion issue here. Closing > the file from the network side requires taking the file lock > after taking the socket lock. Conversely, polling a socket from > epoll takes

  1   2   3   4   5   6   7   8   9   10   >