Re: [PATCH] Make httpserver configurable to serve arbitrary static content

2017-07-05 Thread Nadav Har'El
Looks reasonable to me, but Amnon, can you please have a look and confirm you didn't have a different way in mind to configure the http server to different paths? -- Nadav Har'El n...@scylladb.com On Thu, Jun 29, 2017 at 10:01 PM, Waldemar Kozaczuk wrote: > Here is the lis

Re: [PATCH] Added new httpserver html5 module that provides HTML5 app acting as command line terminal (aka cli)

2017-07-05 Thread Nadav Har'El
On Thu, Jun 29, 2017 at 10:13 PM, Waldemar Kozaczuk wrote: > Signed-off-by: Waldemar Kozaczuk > --- > modules/httpserver-html5-cli/Makefile| 28 > > modules/httpserver-html5-cli/httpserver.conf | 20 > modules/httpserver-html5-cli/module

Re: Bootable OSv ISO Possibilities?

2017-07-06 Thread Nadav Har'El
On Thu, Jul 6, 2017 at 1:30 AM, Lonnie wrote: > Greetings All, > > I have just recently come across OSv and although I do realize that it is > mainly designed as a minimalist container OS > Hi, "container" is probably the wrong word to use here, because it has other established meanings in this

[PATCH] Return correct errno from socket() on AF_INET6

2017-07-06 Thread Nadav Har'El
redis even assume this when testing for IPv6 support. So in this patch socket() differentiates between an unknown address family (returning EAFNOSUPPORT) and a known address family but unknown socket type or protocol (returning EPROTONOSUPPORT, as before). Fixes #865. Signed-off-by: Nadav Har&#x

Re: Failing to start lighttpd on OSv

2017-07-08 Thread Nadav Har'El
On Sat, Jul 8, 2017 at 2:34 AM, Waldek Kozaczuk wrote: > I have been trying to use existing git repo - > https://github.com/tari/osv-lighttpd - to deploy lighttpd on OSv. It > builds but I am getting this error which seems to indicate that symbol > pcre_free is missing or corresponding so could

Re: Failing to start lighttpd on OSv

2017-07-09 Thread Nadav Har'El
On Sun, Jul 9, 2017 at 1:57 AM, Waldek Kozaczuk wrote: > Running with -V did not yield any interesting behavior. But when I built > an image with httpserver hoping to be able to list content of the /usr/lib > ditrectory (is there any easier way to verify content of built image apart > from mount

[PATCH] Add lighttpd application

2017-07-09 Thread Nadav Har'El
at too includes libpcre.so.1, but not the one in the build machine but rather the one from external/. Signed-off-by: Nadav Har'El --- lighttpd/module.py | 3 +++ lighttpd/Makefile| 48 lighttpd/lighttpd.conf | 13 ++

Re: Failing to start lighttpd on OSv

2017-07-09 Thread Nadav Har'El
ok libpcre.so.1 from the build machine instead of external/ But still, this will not work together with libhttpserver (or module/openssl in general) in the same image, because both try to bring a different version of libpcre.so. -- Nadav Har'El n...@scylladb.com On Sun, Jul 9, 2017 at 1

Re: [PATCH] Added new httpserver html5 module that provides HTML5 app acting as command line terminal (aka cli)

2017-07-09 Thread Nadav Har'El
On Sat, Jul 8, 2017 at 2:25 AM, Waldek Kozaczuk wrote: > Please see my answers below. > > > > >> Also, we already have a "node" module in apps, can we just "require" it >> instead of adding more code to get node? >> There's a difference - the existing node module fetches node's source and >> comp

Re: [PATCH] Split httpserver module into multiple modules to

2017-07-09 Thread Nadav Har'El
ined below. > > On Tue, Jul 4, 2017 at 4:09 PM, Nadav Har'El wrote: > >> Hi, sorry about the long delay in my review. >> >> In general I think your separation makes sense, although I'm not sure who >> would actually want to use httpserver-core, our ad-hoc

Re: [PATCH 1/2] modules: add libcdio

2017-07-11 Thread Nadav Har'El
Thanks. Looks good - I'll commit, none of the comments I have below are important. On Thu, Jun 15, 2017 at 1:31 PM, Justin Cinkelj wrote: > The iso-read from libcdio will be used to read ISO image > (contextualization CD, cloud metadata image). This will allow use of > standard ISO images in OSv

Re: [PATCH 1/2] modules: add libcdio

2017-07-11 Thread Nadav Har'El
Unfortunately, your relink-binary.sh did not work for me: ./relink-binary.sh: line 14: libtool:: command not found I'll prepare a patch to fix that. -- Nadav Har'El n...@scylladb.com On Tue, Jul 11, 2017 at 3:28 PM, Nadav Har'El wrote: > Thanks. Looks good - I'

Re: [PATCH 2/2] cloud-init: support standard ISO images

2017-07-11 Thread Nadav Har'El
On Thu, Jun 15, 2017 at 1:31 PM, Justin Cinkelj wrote: > In 56c6195b252b127c7fe90cb9fa46c370b384b51a was added option for > reading configuration file from a secondary disk. Due to missing ISO > filesystem support, a custom disk format was used. This patch replaces > custom disk format with stand

[PATCH] Support mmap() flag MAP_32BIT

2017-07-11 Thread Nadav Har'El
that to 0x200. Signed-off-by: Nadav Har'El --- libc/mman.cc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libc/mman.cc b/libc/mman.cc index 0441265..73a3f41 100644 --- a/libc/mman.cc +++ b/libc/mman.cc @@ -130,6 +130,13 @@ void *mmap(void *addr, size_t length, int prot, int

[PATCH] add openat64() and creat64() functions

2017-07-11 Thread Nadav Har'El
Add functions openat64() and creat64() as aliases to the usual functions. Refs #747. Signed-off-by: Nadav Har'El --- fs/vfs/main.cc | 2 ++ include/api/fcntl.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/vfs/main.cc b/fs/vfs/main.cc index 1e2408c..c2

[PATCH 5/5] gcc 7: do not use dynamic exception specifications

2017-07-12 Thread Nadav Har'El
hrow()). Signed-off-by: Nadav Har'El --- include/osv/sched.hh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osv/sched.hh b/include/osv/sched.hh index 3a192477..e9a1af96 100644 --- a/include/osv/sched.hh +++ b/include/osv/sched.hh @@ -1009,9 +1009,9 @@ void

[PATCH 1/5] gcc 7: add missing include

2017-07-12 Thread Nadav Har'El
Gcc 7 complains about defining memset when we don't include a header file with its prototype. So let's do. Signed-off-by: Nadav Har'El --- fastlz/lzloader.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/fastlz/lzloader.cc b/fastlz/lzloader.cc index 5f95e413..e05387e7 1006

[PATCH 4/5] gcc 7: array should have non-negative length

2017-07-12 Thread Nadav Har'El
Gcc 7 rightly complains when we try to allocate an array with a signed int length. Changing the length variable to unsigned int fixes it. Signed-off-by: Nadav Har'El --- core/app.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/app.cc b/core/app.cc index d62

[PATCH 2/5] gcc 7: ignore warning in bsd/sys/netinet/in_mcast

2017-07-12 Thread Nadav Har'El
In bsd/sys/netinet/in_mcast we get a "maybe uninitialized" warning which as far as I can tell, is a false alarm. I also checked the freebsd tree, and they haven't fixed anything in this area, so it's probably correct. So let's just ignore this warning. Signed-off-by: Na

[PATCH 3/5] gcc 7: fix use of uninitialized variable

2017-07-12 Thread Nadav Har'El
Gcc 7 rightly complains that in bsd_init() we create an uninitialized timeval structure, and then use it to see the random number generator. The intention was probably to fetch the current time here :-) So let's do it. Signed-off-by: Nadav Har'El --- bsd/init.cc | 1 + 1 file

[PATCH] gcc 7: fix alignment of main()'s stack

2017-07-12 Thread Nadav Har'El
n't cause this crash, even on gcc 7. The patch trivially fixes JMP to CALL, which is what the callee's (main()) expects we would call to preserve the stack's alignment. Signed-off-by: Nadav Har'El --- arch/x64/boot.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH 1/2] boot.S: Increase main() stack size

2017-07-12 Thread Nadav Har'El
ertainly not a good reason to leave this bug behind. Especially not when we know of bugs which one guess is that they are caused by overwrite of the per-cpu area (see issue #382). Signed-off-by: Nadav Har'El --- arch/x64/boot.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 2/2] Remove unused interrupt stack

2017-07-12 Thread Nadav Har'El
In boot.S we reserved 40960 bytes for an "interrupt stack" that is not actually used anywhere since almost the start of OSv (see commit da6ba16dbd182517e4c889f806cd9ce57151). So get rid of it. Signed-off-by: Nadav Har'El --- arch/x64/boot.S | 4 1 file changed, 4 del

[PATCH] gcc 7: replacement for "new" for types of special alignment

2017-07-12 Thread Nadav Har'El
the future, its "new" fully supports any alignment (and to do that, it has a version of "operator new" taking an alignment - see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3396.htm) so we will be able to revert this patch. Signed-off-by: Nadav Har'El --

[PATCH] gcc 7: remove inappropriate use of "constexpr".

2017-07-13 Thread Nadav Har'El
In one test we assigned a constant-expression-but-not-marked-constexpr pointer into a constexpr variable, which gcc 7 didn't like. There is no need to bother with constexpr qualifications in tests so let's just remove it. Signed-off-by: Nadav Har'El --- tests/tst-mmap-file.cc |

[PATCH] gcc 7: fix "osv info threads"

2017-07-13 Thread Nadav Har'El
The internal structure of std::unique_ptr changed, and we need it to support the "osv info threads" gdb command. With this patch both old and new layouts will be supported. Signed-off-by: Nadav Har'El --- scripts/loader.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-

Re: [PATCH] Add nginx

2017-07-16 Thread Nadav Har'El
On Fri, Jul 14, 2017 at 12:02 PM, Justin Cinkelj wrote: > Based on @myechuri work, > https://github.com/myechuri/osv-apps/commits/nginx-osv Thanks (to both of you)! I want to commit this patch (we can always improve it later), but have one question first - does this patch depend on any of your

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

2017-07-17 Thread Nadav Har'El
Oops, this is bad, and unfortunately I committed too many patches yesterday to understand which one brought this bug... On Sun, Jul 16, 2017 at 7:57 PM, wrote: > TEST tst-elf-permissions.so OSv v0.24-399-ge6fadac > eth0: 192.168.122.15 > Assertion failed: (phdr.p_flags & (PF_R |

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

2017-07-17 Thread Nadav Har'El
On Mon, Jul 17, 2017 at 3:29 PM, Avi Kivity wrote: > > > On 07/17/2017 10:10 AM, Nadav Har'El wrote: > > Oops, this is bad, and unfortunately I committed too many patches > yesterday to understand which one brought this bug... > > > > On Sun, Jul 16, 2017 at 7

Re: [PATCH 1/2] af_local: stub ioctl FIOASYNC

2017-07-18 Thread Nadav Har'El
Thanks. One question below: On Tue, Jul 18, 2017 at 12:16 PM, Justin Cinkelj wrote: > nginx doesn't start if ioctl with cmd=FIOASYNC fails. Stub it, so that > nginx can start unpatched. > > Signed-off-by: Justin Cinkelj > --- > libc/af_local.cc | 18 +- > 1 file changed, 13 ins

Re: [PATCH] signals: stub sigsuspend

2017-07-18 Thread Nadav Har'El
-- On Tue, Jul 18, 2017 at 12:50 PM, Justin Cinkelj wrote: > sigsuspend is used in nginx. With current (not yet commited) patch, it > is never really called. Nginx master process code is used to execute > worker code, and this prevents master code to actually call sigsuspend. > So stub implementa

Re: [PATCH v2] Add nginx

2017-07-18 Thread Nadav Har'El
0x10c18733 in main (argc=, argv=) at src/core/nginx.c:375 -- Nadav Har'El n...@scylladb.com On Tue, Jul 18, 2017 at 1:16 PM, Justin Cinkelj wrote: > Based on @myechuri work, > https://github.com/myechuri/osv-apps/commits/nginx-osv > > A single nginx worker thread is

Re: [PATCH v2] Add nginx

2017-07-19 Thread Nadav Har'El
On Wed, Jul 19, 2017 at 3:31 AM, Justin Cinkelj wrote: > I also tried with/without cli, debug/release build, and did clean it > before rebuild > ./scripts/build -j4 mode=release clean > ./scripts/build -j4 mode=release image=nginx > > And it still works > justin_cinkelj@jcpc:~/devel/mikelangelo/o

Re: [PATCH] gcc 7: replacement for "new" for types of special alignment

2017-07-19 Thread Nadav Har'El
This patch is missing the aligned_new.hh file with the actual (rather simple) implementation. I'll need to send the patch again. -- Nadav Har'El n...@scylladb.com On Thu, Jul 13, 2017 at 12:46 AM, Nadav Har'El wrote: > OSv has various types which have special alignment

Re: [COMMIT osv master] af_local: stub ioctl FIOASYNC

2017-07-19 Thread Nadav Har'El
though it's not really needed for nginx. but maybe for the multi-threaded one it is needed?) -- Nadav Har'El n...@scylladb.com On Tue, Jul 18, 2017 at 5:36 PM, Commit Bot wrote: > From: Justin Cinkelj > Committer: Nadav Har'El > Branch: master > > af_local:

Re: [PATCH 2/2] libc: add __mbrlen

2017-07-20 Thread Nadav Har'El
But the patch leaves the line commented out - I don't suppose this can help :-) On Jul 20, 2017 15:08, "Justin Cinkelj" wrote: At least a symbol needs to be defined for python2.7. Signed-off-by: Justin Cinkelj --- libc/libc.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/libc.cc

Re: [PATCH 1/2] setup.py: Enable Fedora 26

2017-07-23 Thread Nadav Har'El
abled? I don't think it is reasonable that this is a memory problem on my build machine. I've been using this machine successfully for several years, and don't recall any other suspicious SIGSEGV, and OSv was built and run successfully on this machine many times before I upgraded t

Re: [PATCH v2 2/2] setup.py: Enable Fedora 26

2017-07-23 Thread Nadav Har'El
On Sat, Jul 22, 2017 at 1:51 PM, Benoît Canet < benoit.canet.cont...@gmail.com> wrote: > To be complete misc.bin should be updated and > openssl switched to version 1.1 in openssl manifest. > I committed the previous version of this patch, it looked the same right? I think the openssl version di

Re: [PATCH v2 1/2] libc: add tcflow

2017-07-23 Thread Nadav Har&#x27;El
n't really care about what it did. I'll open an issue on TCXONC -- Nadav Har'El n...@scylladb.com On Fri, Jul 21, 2017 at 1:45 PM, Justin Cinkelj wrote: > At least a symbol needs to be defined for python2.7. > > Signed-off-by: Justin Cinkelj > --- > Makefile | 2 +

Re: [PATCH v2 2/2] libc: add __mbrlen

2017-07-23 Thread Nadav Har&#x27;El
On Fri, Jul 21, 2017 at 1:45 PM, Justin Cinkelj wrote: > At least a symbol needs to be defined for python2.7. > File mbrlen.c is moved from musl/ to libc/, as the weak alias declaration > must be in same file as function definition. > I don't think this is true - the alias declaration does NOT n

Re: [PATCH v2 2/2] libc: add __mbrlen

2017-07-23 Thread Nadav Har&#x27;El
On Sun, Jul 23, 2017 at 11:17 AM, Nadav Har'El wrote: > > On Fri, Jul 21, 2017 at 1:45 PM, Justin Cinkelj > wrote: > >> At least a symbol needs to be defined for python2.7. >> File mbrlen.c is moved from musl/ to libc/, as the weak alias declaration >&g

Re: [PATCH] Add python2.7

2017-07-23 Thread Nadav Har&#x27;El
On Sun, Jul 23, 2017 at 2:01 AM, Justin Cinkelj wrote: > Based on @gberginc work. > > Usage example: > ./scripts/run.py -e "/python" > ./scripts/run.py -e "/python -c \"aa={1:22,3:44}; print aa; print 'asdf'\"" > Thanks. I'll commit this as is. However, looking at python on my own machine (Fedo

Re: [PATCH] Add python2.7

2017-07-23 Thread Nadav Har&#x27;El
On Sun, Jul 23, 2017 at 12:20 PM, Nadav Har'El wrote: > > By the way, when I try to build this myself, something at the end doesn't > work: > > ./copy-required-system-libraries.sh > ldd: ROOTFS/lib/python2.7/lib-dynload/readline.so: No such file or > directory &

Re: [PATCH] Add python2.7

2017-07-23 Thread Nadav Har&#x27;El
On Sun, Jul 23, 2017 at 2:10 AM, Justin Cinkelj wrote: > I didn't want to include every it-might-be-actually-required library from > the build system. > But did you, or did you not? > Complete list from my system is: > justin_cinkelj@jcpc:~/devel/mikelangelo/osv-fc25/osv/apps/python27$ ldd > R

Re: Porting Aerospike server to OSv: /asd.so: failed looking up symbol je_chunksize_mask

2017-07-23 Thread Nadav Har&#x27;El
On Sat, Jul 22, 2017 at 6:58 AM, wrote: > Hi all, I'm trying to port Aerospike server to OSv. But when I tried to > run the server (asd.so), it failed to resolve the "je_chunksize_mask" > symbol from libjemalloc.so.2 even when libjemalloc.so.2 was included into > root folder. Anyone can give me a

Re: [PATCH v2 1/2] lua: Upgrade LuaSec

2017-07-23 Thread Nadav Har&#x27;El
On Sat, Jul 22, 2017 at 7:32 PM, Benoît Canet wrote: > > Maybe a better solution than this patch would be to avoid the mix of host > openssl and > internal openssl so this patch would be useless. > I agree that modules/openssl should take stuff from the build machine, not from external/ - which

[PATCH] gcc 7: fix crashes due to corruption of xmm0 register

2017-07-23 Thread Nadav Har&#x27;El
nction is ruined by using SSE registers. So this patch adds a tag on this function telling gcc to not use SSE when compiling this function. P.S. This patch has to be a new world record. Zero lines of code, and 50 lines of explanations :-) Signed-off-by: Nadav Har'El --- arch/x64/arch-cpu.

Re: [PATCH v2 1/2] lua: Upgrade LuaSec

2017-07-23 Thread Nadav Har&#x27;El
On Sat, Jul 22, 2017 at 1:51 PM, Benoît Canet < benoit.canet.cont...@gmail.com> wrote: > The LuaRock repository is not up to date. > Hi, I am far from a Lua or LuaRock expert, but a quick look in https://luarocks.org/modules/brunoos/luasec shows me that they *do* have version 0.6-1, which appare

[PATCH] gcc 7: fix crash when initial-exec TLS is used

2017-07-24 Thread Nadav Har&#x27;El
cations larger than a page are page-aligned in any case). Fixes #894. Signed-off-by: Nadav Har'El --- arch/x64/arch-switch.hh | 12 +--- core/elf.cc | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/x64/arch-switch.hh b/arch/x64/arch-switch

Re: [PATCH] gcc 7: fix crash when initial-exec TLS is used

2017-07-24 Thread Nadav Har&#x27;El
and sent patches (and I asked some questions about them). -- Nadav Har'El n...@scylladb.com On Mon, Jul 24, 2017 at 11:05 AM, Nadav Har'El wrote: > When the initial-exec TLS model is used, as in our tst-tls.so, the > application's TLS area moves OSv's own TLS area b

Re: [PATCH v2 1/2] lua: Upgrade LuaSec

2017-07-24 Thread Nadav Har&#x27;El
On Mon, Jul 24, 2017 at 1:11 PM, Benoît Canet wrote: > > > 2017-07-24 8:02 GMT+02:00 Nadav Har'El : > >> >> On Sat, Jul 22, 2017 at 1:51 PM, Benoît Canet < >> benoit.canet.cont...@gmail.com> wrote: >> >>> The LuaRock repository is no

Re: [PATCH v2 1/2] lua: Upgrade LuaSec

2017-07-24 Thread Nadav Har&#x27;El
com/cloudius-systems/osv/issues/821 (about running applications compiled with different libraries than the OSv kernel) Again, it doesn't mean we need to do this now. I'll leave it up to you to decide. > > Best regards > > Benoît > > 2017-07-24 12:11 GMT+02:00 Benoît C

Re: [PATCH v2 1/2] lua: Upgrade LuaSec

2017-07-24 Thread Nadav Har&#x27;El
a/5.2/ssl.so: failed looking up symbol lsec_load_curves -- Nadav Har'El n...@scylladb.com On Sat, Jul 22, 2017 at 1:51 PM, Benoît Canet < benoit.canet.cont...@gmail.com> wrote: > The LuaRock repository is not up to date. > Use the github repository. > > Signed-of-by: Be

Re: [PATCH v2 1/2] lua: Upgrade LuaSec

2017-07-24 Thread Nadav Har&#x27;El
On Mon, Jul 24, 2017 at 3:27 PM, Nadav Har'El wrote: > Hi, I committed this, but please continue to having module/openssl find > and take the build machine's openssl, because as it stands, with your patch > the default build (the CLI) no longer works even on my older Fedor

Re: [PATCH 2/2] setup: Make Fedora26 take the compat openssl header

2017-07-24 Thread Nadav Har&#x27;El
ra 26 you have both openssl 1.1 and 1.0 libraries. What we're playing with here is just the "devel" package (the header files), only needed for compiling things. Now the image built by default by "scripts/build" (httpserver and cli) works well in Fedora 26 too. -- Nada

Re: [PATCH] lua/openssl: Add a check for openssl header version

2017-07-25 Thread Nadav Har&#x27;El
On Tue, Jul 25, 2017 at 1:10 PM, Benoît Canet < benoit.canet.cont...@gmail.com> wrote: > If OpenSSL version is 1.1 prompt a message explaining > to the user how to install the compat headers. > Thanks! Some requests below: > > Signed-off-by: Benoît Canet > --- > modules/lua/Makefile |

Re: [PATCH v2 2/2] openssl: Get rid of external/ libraries

2017-07-25 Thread Nadav Har&#x27;El
On Tue, Jul 25, 2017 at 2:51 PM, Benoît Canet < benoit.canet.cont...@gmail.com> wrote: > external/ is an old filesystem snapshot > several years old. > This means the openssl and crypto libraries > in it are obsolettes. > > Get rid of this particular crypto dependencies > by using the host librari

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

2017-07-26 Thread Nadav Har&#x27;El
chine switched from the BFD linker to GOLD and we changed the Makefile to revert a few failing tests to BFD (but not tst-n). So I don't know yet if we have a serious regression, or some environmental change (such as the linker) caused a new bug to appear or an old bug to be exposed... -- Nada

Re: [PATCH v2 2/2] openssl: Get rid of external/ libraries

2017-07-30 Thread Nadav Har&#x27;El
On Fri, Jul 28, 2017 at 8:34 PM, Benoît Canet wrote: > > Thanks > > I worked on creating this usr.manifest generator for openssl. > > Incidentally do you know if manifest file have a way to create symlinks ? > Yes, it does. You have two options: 1. Ask in the manifest to upload an actual file o

Re: [PATCH v2] Finish switch stack on SYSCALL instruction

2017-08-01 Thread Nadav Har&#x27;El
application threads the allocation will *also* be a waste (most applications will not even use the syscall instruction!), at least it will be a minor waste because application threads normally have large stacks (by default 1MB) so the overhead of 4K more will be negligible. More comments inline, b

Re: [PATCH] libc: add functions required for libpython2.7.so

2017-08-01 Thread Nadav Har&#x27;El
On Tue, Aug 1, 2017 at 2:16 PM, Justin Cinkelj wrote: > When we try to reuse python from the build system (instead of > compiling it from source), libpython2.7.so requires additional > libc/glibc symbols. The patch was prepared on Fedora 25. > > One problem with musl/src/linux/wait4.c remains. It

Re: [PATCH] libc: add functions required for libpython2.7.so

2017-08-01 Thread Nadav Har&#x27;El
s the case. > I didn't even open any of the .c files (except wait4.c, because it didn't > compile). > Will send v2 patch based on you comments. > Thank you, Justin > > > On 08/01/2017 02:23 PM, Nadav Har'El wrote: > > > On Tue, Aug 1, 2017 at 2:16 PM,

Re: [RFC PATCH 2/2] Add python2.7 from the build system

2017-08-01 Thread Nadav Har&#x27;El
On Tue, Aug 1, 2017 at 2:41 PM, Justin Cinkelj wrote: > Instead of compiling python from source, we reuse libpython2.7.so > from the build system. Only the python executable is recompiled as > shared object. The python.c file is almost literal copy from the git > source (only 'include "Python.h"'

Re: [PATCH v2] Finish switch stack on SYSCALL instruction

2017-08-01 Thread Nadav Har&#x27;El
On Wed, Aug 2, 2017 at 7:18 AM, Hawx Chen wrote: > Hi Nadav, thank you for your reply. > I already finished the Patch V3 and then will update it soon. Then I want > to summarize the tests and related modification in Patch V3. > > I tested the Patch in different ways: > 1. I inserted "abort()" in

Re: [PATCH v2] Finish switch stack on SYSCALL instruction

2017-08-01 Thread Nadav Har&#x27;El
On Wed, Aug 2, 2017 at 9:30 AM, Benoît Canet wrote: > > simply porting the default hello world to OSv and loading it with wrk > would help exibit the issue. > What default "hello world"? Our apps/golang-example prints "hello world" (partly in Chinese...) but cannot be "loaded with wrk". I assume

Re: [RFC PATCH 2/2] Add python2.7 from the build system

2017-08-03 Thread Nadav Har&#x27;El
on 3.6 in (stock) fedora 25. > And with other/older distros, it will also be a bit problematic to build > newer pythons. > Yes. Perhaps we should have two apps, one for taking the system's existing python and one from compiling from source like you previously had? Since you already did t

Re: [RFC PATCH 2/2] Add python2.7 from the build system

2017-08-03 Thread Nadav Har&#x27;El
On Wed, Aug 2, 2017 at 12:38 AM, Nadav Har'El wrote: > > On Tue, Aug 1, 2017 at 2:41 PM, Justin Cinkelj > wrote: > >> Instead of compiling python from source, we reuse libpython2.7.so >> from the build system. Only the python executable is recompiled as >>

Re: [PATCH] Enhanced scripts/build and related Python scripts to support export files that make up an image versus uploading them to an image

2017-08-15 Thread Nadav Har&#x27;El
On Wed, Aug 9, 2017 at 2:47 PM, Waldemar Kozaczuk wrote: > This patch enhances OSv build scripts to allow exporting files in addition > of uploading them to an image. It addresses 3 usage scenarios described in > #900 and demostrated by examples below: > > - ./scripts/build image=empty export=al

Re: [PATCH] Add busybox

2017-08-16 Thread Nadav Har&#x27;El
On Mon, Aug 7, 2017 at 12:32 PM, Justin Cinkelj wrote: > Busybox ash shell is more powerful than OSv --runscript option. > Use ash when fancy shell is required. > > While busybox config file includes default options (e.g. nearly all > options are enabled), the usr.manifiest doesn't try to create

Re: [PATCH] Enhanced scripts/build and related Python scripts to support export files that make up an image versus uploading them to an image

2017-08-16 Thread Nadav Har&#x27;El
On Wed, Aug 16, 2017 at 12:45 PM, wrote: > > Thank you Waldek for trying to upstream this, I'm looking forward to be > removing the current patches from the capstan-packages build platform in > favor of using upstreamed code! :D > > Unfortunately I'm not very familiar with the scripts that we're

Re: [PATCH] Enhanced scripts/build and related Python scripts to support export files that make up an image versus uploading them to an image

2017-08-16 Thread Nadav Har&#x27;El
On Wed, Aug 16, 2017 at 1:33 PM, Nadav Har'El wrote: > > On Wed, Aug 16, 2017 at 12:45 PM, wrote: > >> >> Thank you Waldek for trying to upstream this, I'm looking forward to be >> removing the current patches from the capstan-packages build platform in

Re: [PATCH] Enhanced scripts/build and related Python scripts to support export files that make up an image versus uploading them to an image

2017-08-16 Thread Nadav Har&#x27;El
On Wed, Aug 16, 2017 at 2:12 PM, wrote: > Perhaps you were right anyway - we are using some patches to > upload_manifest, so we might have broken the stripping. So if I understand > you right, the stripped cpiod (that is as small as 220 KB) should work the > same as the unstripped one, or will th

Re: SO_BINDTODEVICE

2017-08-17 Thread Nadav Har&#x27;El
On Thu, Aug 17, 2017 at 5:56 AM, Rick Payne (Offshore) wrote: > > Is there an equivalent to SO_BINDTODEVICE? I’m trying to get an > implementation of VRRP working and the first issue is that the sending > socket requires to be bound to the appropriate interface. > > After that, I’ll probably run

Re: [PATCH v2] Enhanced scripts/build and related Python scripts to support export files that make up an image versus uploading them to an image

2017-08-20 Thread Nadav Har&#x27;El
Thanks. I committed this patch. One thing I didn't understand is the comment: "The only current limitation is support for links in OSv". I see you did handle symlinks... Is this an old comment? -- Nadav Har'El n...@scylladb.com On Sat, Aug 19, 2017 at 7:51 PM, Waldemar Koza

Re: [PATCH] Add busybox

2017-08-20 Thread Nadav Har&#x27;El
On Sun, Aug 20, 2017 at 6:15 PM, Nadav Har'El wrote: > > > 1. osv_execve() should recognize the case where the files it is trying to > load doesn't have the executable magic header, and fail with ENOEXEC. This > will hopefully allow ash to run scripts without a shebang

Re: [PATCH 2/2] osv_execve: on failure set errno and return -1

2017-08-20 Thread Nadav Har&#x27;El
I'll commit this patch, but I have some minor questions below. You can send a new incremental patch if you want to change something. -- Nadav Har'El n...@scylladb.com On Fri, Aug 18, 2017 at 3:01 PM, Justin Cinkelj wrote: > On failure execve() returns -1 and sets errno. This pat

Re: [PATCH] busybox ash: do not exit if command doesn't exist

2017-08-20 Thread Nadav Har&#x27;El
]: Leaving directory '/home/nyh/osv.tmp2/osv/apps/busybox/build/busybox' /usr/bin/ld: cannot find -lbusybox collect2: error: ld returned 1 exit status Any idea what might be wrong? -- Nadav Har'El n...@scylladb.com On Fri, Aug 18, 2017 at 3:02 PM, Justin Cinkelj wrote: > 0

Re: SO_BINDTODEVICE

2017-08-21 Thread Nadav Har&#x27;El
On Thu, Aug 17, 2017 at 10:54 PM, Rick Payne (Offshore) < ri...@rossfell.co.uk> wrote: > > > On 17 Aug 2017, at 06:43, Rick Payne (Offshore) > wrote: > > > > Does carp run on Freebsd or is it just OpenBSD? That has to solve a > similar issue, namely sending announcements to a multicast address on

Re: [PATCH] cmdline: allow parameters with escaped spaces

2017-08-22 Thread Nadav Har&#x27;El
On Mon, Aug 21, 2017 at 7:01 PM, Justin Cinkelj wrote: > The strtok_r doesn't allow escaping the input parameters, which means > each space is considered a separator. The boost::tokenizer supports > escaping. This commit replaces strtok_r with boost::tokenizer. The > final __argv is still continu

Re: [PATCH] cmdline: allow parameters with escaped spaces

2017-08-22 Thread Nadav Har&#x27;El
On Tue, Aug 22, 2017 at 2:48 PM, Justin Cinkelj wrote: > > What does it not fix? > The $892 mentions environ varibales with spaces or empty one. And command > line parsing is done in loader.cc to get loader options, and in > commands.cc, to get argv/argc for app, and to implement runscript. This

Re: SO_BINDTODEVICE

2017-08-28 Thread Nadav Har&#x27;El
On Sat, Aug 26, 2017 at 11:27 PM, Rick Payne (Offshore) < ri...@rossfell.co.uk> wrote: > > > I saw that. I also noticed that multicast won’t work because the > SIOCADDMULTI call does nothing in the hypervisor drivers (so the multicast > mac addresses are never added to the filter tables for the in

Re: SO_BINDTODEVICE

2017-08-28 Thread Nadav Har&#x27;El
On Mon, Aug 21, 2017 at 9:01 PM, Rick Payne (Offshore) wrote: > > I don’t know about vmxnet3 driver as I’m not familiar with the hypervisor > that provides that. Can you point me at the code for the ‘other side’ for > that? > vmxnet3 is VMWare's driver. I don't think we have the code for the oth

Re: nginx failing to handle concurrent connections

2017-09-03 Thread Nadav Har&#x27;El
On Fri, Sep 1, 2017 at 7:08 PM, Waldek Kozaczuk wrote: > I changed > int sendfile(int out_fd, int in_fd, off_t *_offset, size_t count) > to > ssize_t sendfile(int out_fd, int in_fd, off_t *_offset, size_t count) > > and all works like a charm. > Wow, thanks, great detective work. When you first

Re: nginx failing to handle concurrent connections

2017-09-03 Thread Nadav Har&#x27;El
On Sun, Sep 3, 2017 at 10:26 AM, Nadav Har'El wrote: > > On Fri, Sep 1, 2017 at 7:08 PM, Waldek Kozaczuk > wrote: > >> I changed >> int sendfile(int out_fd, int in_fd, off_t *_offset, size_t count) >> to >> ssize_t sendfile(int out_fd, int in_fd, of

Re: [COMMIT osv master] Waldek Kozaczuk discovered that nginx, using sendfile(), is experiencing

2017-09-03 Thread Nadav Har&#x27;El
On Sun, Sep 3, 2017 at 10:55 AM, Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Nadav Har'El > Branch: master > > Waldek Kozaczuk discovered that nginx, using sendfile(), is experiencing > various failures when multiple concurrent connections are attempted.

Re: LinuxKit from Docker

2017-09-07 Thread Nadav Har&#x27;El
On Thu, Sep 7, 2017 at 8:50 PM, Waldek Kozaczuk wrote: > Is linuxkit from Docker (https://github.com/linuxkit/linuxkit) going to > kill unikernels altogether? What do you think? > Hi, This approach can definitely work - I have done something like this 17 years ago (even before virtualization),

Re: LinuxKit from Docker

2017-09-10 Thread Nadav Har&#x27;El
On Thu, Sep 7, 2017 at 8:50 PM, Waldek Kozaczuk wrote: > Is linuxkit from Docker (https://github.com/linuxkit/linuxkit) going to >>> kill unikernels altogether? What do you think? >>> >> >> Hi, >> >> This approach can definitely work - I have done something like this 17 >> years ago (even before

Re: [PATCH v3 1/2] Split httpserver module into httpserver-api and httpserver-html5-gui

2017-09-10 Thread Nadav Har&#x27;El
Thanks, I committed (sorry for the delay). As usual when git submodules are involved, I had somewhat of a mess applying this patch (needed to manually remove some old directories and "git submodule update"), I hope users and jenkins will not be bit by this. -- Nadav Har'El n...@s

Re: [PATCH] iperf: fix compile on gcc 6.3

2017-09-12 Thread Nadav Har&#x27;El
Hi, sorry, I didn't see this patch, and committed a different patch (c8b1906cf59d73a7cb39926c53dc4e136611d4f5) at about the same time, doing the same thing in a different way. -- Nadav Har'El n...@scylladb.com On Tue, Aug 29, 2017 at 11:37 AM, Justin Cinkelj wrote: > iperf failed

Re: [PATCH v2 2/6] libc: fix of-by-one error in stresep

2017-09-12 Thread Nadav Har&#x27;El
On Thu, Aug 24, 2017 at 8:29 PM, Justin Cinkelj wrote: > memcpy had of-by-one error. > Also, remove unneeded defines. > > Signed-off-by: Justin Cinkelj > --- > libc/string/stresep.c | 16 ++-- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/libc/string/stresep.c b

Re: [PATCH v2 3/6] command line: add loader_parse_cmdline with tests

2017-09-12 Thread Nadav Har&#x27;El
On Thu, Aug 24, 2017 at 8:29 PM, Justin Cinkelj wrote: > loader_parse_cmdline accepts input str - OSv commandline, say: > --env=AA=aa --env=BB=bb1\ bb2 app.so arg1 arg2 > > The loader options are parsed and saved into argv, up to first > not-loader-option > token. argc is set to number of loader

Re: [PATCH 4/6] command line: use loader_parse_cmdline

2017-09-12 Thread Nadav Har&#x27;El
On Thu, Aug 24, 2017 at 7:56 PM, Justin Cinkelj wrote: > Parse loader options with loader_parse_cmdline instead of strtok_r. > The cmdline passed in prepare_commands to osv::parse_command_line > is not reassebled from already parsed argv anymore, as app_cmdline > contains unmodifed commandline str

Re: [PATCH v3 0/6] Allow spaces in loader options

2017-09-13 Thread Nadav Har&#x27;El
On Wed, Sep 13, 2017 at 3:05 PM, Justin Cinkelj wrote: > Compared to v2 patch: > The stresep.c file is now first only added, and included into Makefile > after removing unneeded define and include namespace.h. > The memcpy bug from v2 patch was reported upstrem to netbsd, and current file > now in

Re: httpserver /fs/df and block size

2017-09-13 Thread Nadav Har&#x27;El
lease test :-) -- Nadav Har'El n...@scylladb.com On Wed, Sep 13, 2017 at 8:56 PM, Waldek Kozaczuk wrote: > Currently httpserver returns disk usage information in blocks like this > snippet demonstrates: > > static void fill_dfstat(DFStat& dfstat, const osv::mount_desc&am

Re: [PATCH] iperf: Update to recent iperf version

2017-09-18 Thread Nadav Har&#x27;El
On Fri, Sep 15, 2017 at 3:58 PM, Benoît Canet < benoit.canet.cont...@gmail.com> wrote: > This one does compile on recent host. > Three weeks ago Justin noticed the same problem, and we fixed this by a trivial fix to iperf's autoconf (commit fd93d5b996720e60e617e894dccb028ef89e8ccb in apps.git). I

Re: [PATCH] iperf: Update to recent iperf version

2017-09-18 Thread Nadav Har&#x27;El
rprised... I should do this too in one of my pet projects...)? Is it a new fork by other developers? Or what? > 2017-09-18 11:51 GMT+02:00 Nadav Har'El : > >> On Fri, Sep 15, 2017 at 3:58 PM, Benoît Canet < >> benoit.canet.cont...@gmail.com> wrote: >> >>&g

Re: [PATCH] iperf: Update to recent iperf version

2017-09-18 Thread Nadav Har&#x27;El
On Mon, Sep 18, 2017 at 1:28 PM, Benoît Canet wrote: > > I think it's an enthousiast that package iperf for easy distribution. > > What worry me is that the official mirror > https://github.com/esnet/iperf does not distribute version 2 that we need > for osv. > I just noticed that http://source

Re: [PATCH] iperf: Update to recent iperf version

2017-09-18 Thread Nadav Har&#x27;El
On Mon, Sep 18, 2017 at 2:51 PM, Nadav Har'El wrote: > > On Mon, Sep 18, 2017 at 1:28 PM, Benoît Canet wrote: > >> >> I think it's an enthousiast that package iperf for easy distribution. >> >> What worry me is that the official mirror >> h

Re: [PATCH] iperf: Update to recent iperf version

2017-09-18 Thread Nadav Har&#x27;El
I found https://sourceforge.net/projects/iperf2/files/ -- Nadav Har'El n...@scylladb.com On Mon, Sep 18, 2017 at 2:53 PM, Nadav Har'El wrote: > > On Mon, Sep 18, 2017 at 2:51 PM, Nadav Har'El wrote: > >> >> On Mon, Sep 18, 2017 at 1:28 PM, Benoît Canet

[PATCH] Fix crash in read_partition_table()

2017-09-19 Thread Nadav Har&#x27;El
process the read data, even though it wasn't, and crashed on this processing or on the brelse() at its end. In this case, the read_partition_table() should just do nothing, and certainly not crash. Refs #903. Signed-off-by: Nadav Har'El --- fs/devfs/device.cc | 5 - 1 file

<    1   2   3   4   5   6   7   8   9   10   >