[osv-dev] [PATCH v2] elf.cc: if Boost libraries aren't visible to applications, don't report them

2019-10-03 Thread Nadav Har'El
in this library are *not* available to the application. So if Boost is 1.69.0 or later, we shouldn't claim that the kernel contains this library. Refs #1040. Signed-off-by: Nadav Har'El --- core/elf.cc | 9 + 1 file changed, 9 insertions(+) diff --git a/core/elf.cc b/core/elf.cc index

Re: [osv-dev] [PATCH 1/4] options: implement light and simple alternative to boost program options

2019-10-03 Thread Nadav Har'El
Since I only had tiny comments, I'll commit your patches as-is, and if you want, please send (or commit yourself) followup patches. Thanks for fixing this! Fedora 30 users everywhere thank you :-) -- Nadav Har'El n...@scylladb.com On Thu, Oct 3, 2019 at 10:41 AM Nadav Har'El wrote: > >

Re: [osv-dev] [PATCH 1/4] options: implement light and simple alternative to boost program options

2019-10-03 Thread Nadav Har'El
On Thu, Oct 3, 2019 at 7:24 AM Waldemar Kozaczuk wrote: > This patch provides simple and light alternative to boost program options > library. It adds handful of utility functions that are aimed > to help parse command line options and intended to be used > by kernel loader and the utility apps

Re: [osv-dev] [PATCH] zfs: do not import extra pools unless requested

2019-12-23 Thread Nadav Har'El
On Sun, Dec 22, 2019 at 5:05 PM Waldemar Kozaczuk wrote: > This patch makes OSv not to try to import extra ZFS (beyond the root one) > unless specifically requested by passing new '--extra-zfs-pools' boot > parameter. > > This improves the OSv boot time with ZFS image by ~50% (around 200ms on >

Re: [osv-dev] [PATCH] zfs: do not import extra pools unless requested

2019-12-23 Thread Nadav Har'El
On Mon, Dec 23, 2019 at 12:30 PM Nadav Har'El wrote: > > On Sun, Dec 22, 2019 at 5:05 PM Waldemar Kozaczuk > wrote: > >> This patch makes OSv not to try to import extra ZFS (beyond the root one) >> unless specifically requested by passing new '--extra-zfs-

Re: [osv-dev] [PATCH] zfs: default device name to vblk0.1 if vdev_path different than /dev/vblk*

2019-12-23 Thread Nadav Har'El
On Sun, Dec 22, 2019 at 5:05 PM Waldemar Kozaczuk wrote: > This patch allows mounting OSv zfs image on Linux host and/or modifying and > using again to boot OSv. It also allows mounting ZFS disks created on Linux > host. > > Typically when mounting OSv image on Linux, the zpool utility would >

Re: [osv-dev] how to find missing symbols if it doesn't print the name

2019-12-10 Thread Nadav Har'El
On Mon, Dec 9, 2019 at 10:51 PM zhiting zhu wrote: > Hey, > > I'm encountering this when I'm using some tensorflow functions: > > /lib/python3.6/tensorflow/python/_pywrap_tensorflow_internal.so: failed > looking up symbol > This is interesting, because the "failed looking up symbol" message is

Re: [osv-dev] [PATCH] memmove: fix a bug in memmove_backwards

2020-02-29 Thread Nadav Har'El
On Sat, Feb 29, 2020 at 6:18 PM Waldemar Kozaczuk wrote: > When memory areas overlap and src offset is before dest offset > memmove implementation calls memmove_backwards(). When both src and dest > offsets > are long aligned memmove_backwards first copies byte by byte starting at > the end >

Re: [osv-dev] [COMMIT osv master] externals: enhance setup.py to download aarch64 gcc and boost code and libraries

2020-03-01 Thread Nadav Har'El
a way on Ubuntu to check the versions of the downloaded libraries, and if it doesn't match what we need (*what* do we need) ask to run the script again? > So should makefile any check like “flavor <> Fedora”? > > On Sun, Mar 1, 2020 at 02:16 Nadav Har'El wrote: > >> >> On Sun, Mar

Re: [osv-dev] [COMMIT osv master] externals: enhance setup.py to download aarch64 gcc and boost code and libraries

2020-02-29 Thread Nadav Har'El
On Sun, Mar 1, 2020 at 6:49 AM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > externals: enhance setup.py to download aarch64 gcc and boost code and > libraries > > References #743 > > Signed-off-by: Waldemar Kozaczuk > > --- > diff --git

Re: [osv-dev] Benchmarking OSv

2020-02-25 Thread Nadav Har'El
On Tue, Feb 25, 2020 at 5:30 AM wrote: > As follows: > OSv booted on KVM- > 1 core: 21.18s > 2: 12.25 > 4: 7.08 > 8: 4.95s > 16: 6.59s > 32: 9.28s > > Now on just regular Ubuntu it is as follows: > 1: 15.22s > 2: 9.64s > 4: 6.4s > 8: 3.6s > 16: 2.93s > 32: 2.21s > > While *ideally* a unikernel

Re: [osv-dev] Build failed in Jenkins: osv-build #1569

2020-02-24 Thread Nadav Har'El
The fix to this is simple - setup.py needs to install the python3-dpkt package, not python-dpkt. Will push a patch now. -- Nadav Har'El n...@scylladb.com On Mon, Feb 24, 2020 at 4:48 AM wrote: > See < > https://jenkins.scylladb.com/job/osv-build/1569/display/redirect?pag

[osv-dev] [PATCH] alarm(): fix crash when alarm is rearmed from alarm handler

2020-01-26 Thread Nadav Har'El
thread if called from a signal handler thread. We *hope* that the previous one is still relevant, and it will be true for most applications such as ping. This workaround is kind of ugly, but it does fix the ping crash described in issue 1073. Fixes #1073. Signed-off-by: Nadav Har'El --- libc

Re: [osv-dev] Re: seg fault in the middle of executing DT_INIT_ARRAYSZ

2020-01-23 Thread Nadav Har'El
On Thu, Jan 23, 2020 at 2:23 PM Waldek Kozaczuk wrote: > Can you send us the full output? I wonder if there are any warnings before > it? > > I see you are running this on firecracker. Can you run it under qemu and > connect to it with gdb and see if you get better stacktrace? > > You can add

Re: [osv-dev] Re: [PATCH] alarm(): fix crash when alarm is rearmed from alarm handler

2020-01-27 Thread Nadav Har'El
But it's not worse than what happened before the patch - where the signal handler thread is used (that is *always* wrong). > > On Sunday, January 26, 2020 at 8:38:57 AM UTC-5, Nadav Har'El wrote: >> >> It is quite common for applications to set an alarm() and when it >> expir

Re: [osv-dev] [PATCH] scripts: upgrade to python 3 - part 1

2020-02-18 Thread Nadav Har'El
had "/usr/bin/python" at the top (and not /usr/bin/python2) at the top already worked correctly for Python 3 (and Python 2) because some people already had python 3 as their default python (although, it is quite likely that we haven't tested this in a while so things broke). -- Nadav Har'El n...

Re: [osv-dev] Re: Build failed in Jenkins: osv-build-nightly #2054

2020-02-09 Thread Nadav Har'El
On Sun, Feb 9, 2020 at 3:26 PM Nadav Har'El wrote: > > On Sun, Feb 9, 2020 at 3:22 PM Waldek Kozaczuk > wrote: > >> Maybe we need full ‘build clean’? Some object files were built with older >> boost headers? >> > > Yes, I just confirmed that a clean build on

Re: [osv-dev] Re: Build failed in Jenkins: osv-build-nightly #2054

2020-02-09 Thread Nadav Har'El
On Thu, Feb 6, 2020 at 10:09 PM Waldek Kozaczuk wrote: > No idea why it failed on this machine: > > pt_des.o build/release.x64/musl/src/crypt/crypt_md5.o > build/release.x64/musl/src/crypt/crypt_r.o > build/release.x64/musl/src/crypt/crypt_sha256.o >

Re: [osv-dev] Re: Build failed in Jenkins: osv-build-nightly #2054

2020-02-09 Thread Nadav Har'El
On Sun, Feb 9, 2020 at 3:22 PM Waldek Kozaczuk wrote: > Maybe we need full ‘build clean’? Some object files were built with older > boost headers? > Yes, I just confirmed that a clean build on the same machine ("muninn") works just fine, so indeed it's most likely that Jenkins directory has

Re: [osv-dev] [PATCH 1/2] virtio-fs: add fuse protocol header

2020-02-09 Thread Nadav Har'El
On Sun, Feb 9, 2020 at 1:22 AM Waldemar Kozaczuk wrote: > This file is a copy of > https://github.com/libfuse/libfuse/blob/38c9cb43787bf83ca4e9c9af707e82165de99008/include/fuse_kernel.h > and provides the wire-level interface of fuse protocol used to exchange > data between guest and host over

Re: [osv-dev] [PATCH V2] scripts: upgrade to python 3 - part 3

2020-02-23 Thread Nadav Har'El
On Sat, Feb 22, 2020 at 4:20 PM Waldemar Kozaczuk wrote: > This is the third and the last batch of the python 3 upgrade changes and > focuses on debug (loader.py) and trace related scripts. > > Following scripts have either been adapted to version 3 or > verified that they do NOT need to be

Re: [osv-dev] [PATCH] scripts: enhance run.py to allow running OSv on arm

2020-02-23 Thread Nadav Har'El
I'll commit, but have some questions below, for future improvements. -- Nadav Har'El n...@scylladb.com On Sat, Feb 22, 2020 at 11:13 PM Waldemar Kozaczuk wrote: > Signed-off-by: Waldemar Kozaczuk > --- > scripts/run.py | 53 +-

Re: [osv-dev] [PATCH] scripts: upgrade to python 3 - part 1

2020-02-19 Thread Nadav Har'El
On Thu, Feb 20, 2020 at 12:28 AM Nadav Har'El wrote: > On Wed, Feb 19, 2020 at 12:52 AM Waldek Kozaczuk > wrote: > >> So I think I have a small subset of this patch ready that encompassed >> everything from the original path but loader.py and trace related files. >

Re: [osv-dev] [PATCH] scripts: upgrade to python 3 - part 1

2020-02-19 Thread Nadav Har'El
on tracing related scripts: >> >> from osv.trace import (Trace, Thread, TracePoint, BacktraceFormatter, >> from osv import trace, debug >> >> Does it mean we want to make those trace related scripts be 2 and 3 >> compatible? >> >> On Tuesday, February 18,

Re: [osv-dev] [PATCH] scripts: upgrade to python 3 - part 1

2020-02-20 Thread Nadav Har'El
s Python packages use, because there is no old-style Unix mechanism (a la uname(1)) to get this information... We can always change this if someone complains... > On Wednesday, February 19, 2020 at 5:40:15 PM UTC-5, Nadav Har'El wrote: >> >> >> On Thu, Feb 20, 2020 at 12:28 AM

Re: [osv-dev] [PATCH] scripts: upgrade to python 3 - part 1

2020-02-18 Thread Nadav Har'El
(did many >> commands but not all). Shall we exclude it from this patch? >> >> Lastly, I am probably not the right person to do this upgrade exercise. I >> do not use Python daily so I am not an expert. Lack of compiler (aka >> 'complainer') did not make me very confident e

Re: [osv-dev] [PATCH] tests: add bionic tests to the source tree

2020-02-18 Thread Nadav Har'El
working directory. If we have build failures from Jenkins now, I'll may need to manually clean the build directory. I guess we'll see. -- Nadav Har'El n...@scylladb.com On Tue, Feb 18, 2020 at 6:17 AM Waldemar Kozaczuk wrote: > Instead of cloning full bionic source repo (~70MB) everytime we n

Re: [osv-dev] [PATCH] httpserver: properly handle chunked POST requests with body

2020-02-18 Thread Nadav Har'El
On Mon, Feb 17, 2020 at 11:58 PM Waldemar Kozaczuk wrote: > This bug was discovered when running httpserver unit tests with python > scripts upgraded to version 3. The new version of the requests module > chunks > POST requests with body so that they are sent over socket in two parts - > the

Re: [osv-dev] [COMMIT osv master] elf: make symbols visible to the object itself from threads created by INIT functions

2020-01-12 Thread Nadav Har'El
Hi, sorry for my belated review :-( I hope the saying "better late than never" is applicable On Tue, Jan 7, 2020 at 12:45 AM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > elf: make symbols visible to the object itself from threads created

Re: [osv-dev] [PATCH] elf: fix thread visiblity issue

2020-01-12 Thread Nadav Har'El
On Sat, Jan 11, 2020 at 8:00 PM Waldemar Kozaczuk wrote: > The commit fe37650fbbcd352806bab3e9e70949a65fadf29b to address > I didn't notice you committed it :-( Sorry about the slow reviews I thought you said it wasn't possible to keep a parent thread pointer - because a parent thread

Re: [osv-dev] [PATCH 1/3] Add dlsym tests

2020-01-12 Thread Nadav Har'El
On Fri, Jan 10, 2020 at 9:16 AM Zhiting Zhu wrote: > This patch includes a module called dl_tests which clones the bionic > and compile the needed library files. > Hi, Unfortunately, I missed the discussion which led to this commit (I haven't been able to put enough time into OSv recently,

Re: [osv-dev] [COMMIT osv master] libc: expose it as musl

2020-01-12 Thread Nadav Har'El
On Fri, Jan 10, 2020 at 6:28 AM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > libc: expose it as musl > > This patch exposes the libc implementation which is greatly > a subset of musl as such so that binaries built for musl-based > Linux

Re: [osv-dev] [COMMIT osv master] glibc: add explicit_bzero() function

2020-01-12 Thread Nadav Har'El
On Fri, Jan 10, 2020 at 6:28 AM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > glibc: add explicit_bzero() function > > Signed-off-by: Waldemar Kozaczuk > > --- > diff --git a/Makefile b/Makefile > --- a/Makefile > +++ b/Makefile > @@ -1585,6

Re: [osv-dev] [COMMIT osv master] procfs: add meminfo pseudo-file

2020-01-12 Thread Nadav Har'El
On Fri, Jan 10, 2020 at 6:28 AM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > procfs: add meminfo pseudo-file > Can you please say a few words on the motivation of this change? Apparently we already had /proc/meminfo, so what benefit does this

Re: [osv-dev] [PATCH] thread: make walking parent-child thread relationship safer

2020-01-12 Thread Nadav Har'El
Thanks. Looks mostly good, but I think there's one last potential unsafety we should fix: On Sun, Jan 12, 2020 at 11:09 PM Waldemar Kozaczuk wrote: > This patch replaces _parent_link/thread_list with a simple parent_thread_id > field to make walking parent-child list safer in elf::visible()

Re: [osv-dev] [PATCH 1/3] Add dlsym tests

2020-01-12 Thread Nadav Har'El
/libs/test/doc/html/boost_test/tests_organization/enabling.html > When the boolean condition is false, those tests would not be run. They are > failing without the other patches. > I see. So I guess your plan is to eventually fix bugs and drop the "enable_if" thing and mak

Re: [osv-dev] [PATCH 3/3] Implement RTLD_NEXT

2020-01-12 Thread Nadav Har'El
Looks correct. I have below a suggestion how to make it more efficient by using one iteration over the module list instead of two - for your consideration. Thanks! Nadav. On Tue, Jan 7, 2020 at 10:15 AM Zhiting Zhu wrote: > Signed-off-by: Zhiting Zhu > --- > core/elf.cc| 25

Re: [osv-dev] [PATCH V2] thread: make walking parent-child thread relationship safer

2020-01-12 Thread Nadav Har'El
Looks good. Thanks. I'll commit. On Mon, Jan 13, 2020 at 12:44 AM Waldemar Kozaczuk wrote: > This patch replaces _parent_link/thread_list with a simple parent_thread_id > field to make walking parent-child list safer in elf::visible() method. > > Signed-off-by: Waldemar Kozaczuk > --- >

Re: [osv-dev] [PATCH 1/3] Add dlsym tests

2020-01-13 Thread Nadav Har'El
Hi, thank. Please see my answers and requests inline. On Mon, Jan 13, 2020 at 4:39 AM zhiting zhu wrote: > > > On Sun, Jan 12, 2020 at 4:02 PM Nadav Har'El wrote: > >> Thanks for the answers. I have some followup questions below. >> >> On Sun, Jan 12, 2020 at

Re: [osv-dev] Re: [PATCH 3/3] Implement RTLD_NEXT

2020-01-13 Thread Nadav Har'El
Please see comments below. You forgot to change one part of the patch. On Mon, Jan 13, 2020 at 4:40 AM zhiting zhu wrote: > This version only contains one iteration over the module list. > > On Sun, Jan 12, 2020 at 8:39 PM Zhiting Zhu > wrote: > >> Signed-off-by: Zhiting Zhu >> --- >>

Re: [osv-dev] [PATCH V3] elf: ignore versioning table if symbol is looked up by object itself

2020-01-13 Thread Nadav Har'El
On Mon, Jan 13, 2020 at 7:14 AM Waldemar Kozaczuk wrote: > The commit > https://github.com/cloudius-systems/osv/commit/ed1eed7a567ec17138c65f0a5628c2311603c712 > enhanced dynamic linker to skip old symbols per versions table. > Unfortunately > the relevant code did not take into account whether

Re: [osv-dev] [PATCH] java: eliminate openjdk7

2020-01-15 Thread Nadav Har'El
On Wed, Jan 15, 2020 at 6:07 AM Waldemar Kozaczuk wrote: > Java 7 reached end of life almost 5 years ago and has since > been largely replaced by Java 8 which is still widely used. > > This patch eliminates openjdk7 module and makes openjdk8-zull-full > a default java module. This patch also

Re: [osv-dev] [PATCH 3/3] Implement RTLD_NEXT

2020-01-15 Thread Nadav Har'El
On Mon, Jan 13, 2020 at 8:10 PM Zhiting Zhu wrote: > Signed-off-by: Zhiting Zhu > --- > core/elf.cc| 33 + > include/osv/elf.hh | 1 + > libc/dlfcn.cc | 4 ++-- > tests/tst-dlfcn.cc | 2 +- > 4 files changed, 37 insertions(+), 3 deletions(-) > >

Re: [osv-dev] [PATCH 1/2] Lookup symbol deeper

2020-01-15 Thread Nadav Har'El
ested above does DFS, not BFS. We need to consider if this makes any difference and if we need to do a BFS version of collect_dependencies()... I hope not, but I don't know). Thanks, Nadav. -- Nadav Har'El n...@scylladb.com On Wed, Jan 15, 2020 at 7:39 PM Zhiting Zhu wrote: > dls

Re: [osv-dev] [PATCH 1/2] Lookup symbol deeper

2020-01-15 Thread Nadav Har'El
rary) > On Wed, Jan 15, 2020 at 5:37 PM Nadav Har'El wrote: > >> When you send a second version of a patch, please label it with "v2" and >> so on (if you use git format-patch, you can do "git format-patch -v2" to do >> this automatically) and writ

Re: [osv-dev] [PATCH] java: move java_api and jni_helpers to java modules

2020-01-16 Thread Nadav Har'El
On Thu, Jan 16, 2020 at 6:21 AM Waldemar Kozaczuk wrote: > The java_api.* and jni_helpers.* are actually only used by > java.cc and following httpserver java-related plugins: > - httpserver-jolokia-plugin > - httpserver-jvm-plugin > - josvsym > > This patch moves the relevant code out from

Re: [osv-dev] [PATCH v3 1/2] Lookup symbol deeper

2020-01-19 Thread Nadav Har'El
Looks mostly good, sorry for having so many iterations... Just one tiny issue below about setting each item in the set twice, and one style comment. On Thu, Jan 16, 2020 at 8:31 PM Zhiting Zhu wrote: > dlsym function doesn't seem to lookup symbol deep enough. This > patch includes a bfs version

Re: [osv-dev] [PATCH v3 2/2] Implement RTLD_NEXT

2020-01-19 Thread Nadav Har'El
Reviewed-by: Nadav Har'El -- Nadav Har'El n...@scylladb.com On Thu, Jan 16, 2020 at 8:31 PM Zhiting Zhu wrote: > Signed-off-by: Zhiting Zhu > --- > core/elf.cc| 33 + > include/osv/elf.hh | 1 + > libc/dlfcn.cc | 4 ++-- >

Re: [osv-dev] [PATCH V2 2/4] external x64: replace openjdk7 module with with new openjdk8-from-host one

2020-01-22 Thread Nadav Har'El
On Wed, Jan 22, 2020 at 5:22 AM Waldemar Kozaczuk wrote: > Java 7 reached end of life almost 5 years ago and has since > been largely replaced by Java 8 which is still widely used. > > This patch eliminates openjdk7 module and adds new openjdk8-from-host one > as a default java module. This

Re: [osv-dev] Re: [PATCH v4 1/2] Lookup symbol deeper

2020-01-22 Thread Nadav Har'El
Sorry, I forgot to review this. I'll do it now. -- Nadav Har'El n...@scylladb.com On Wed, Jan 22, 2020 at 2:34 PM Waldek Kozaczuk wrote: > Shall we commit this and another V4 version of these patches? > > On Sunday, January 19, 2020 at 8:17:39 PM UTC-5, Zhiting Zhu wrote: >> &g

Re: [osv-dev] [PATCH V2 2/4] external x64: replace openjdk7 module with with new openjdk8-from-host one

2020-01-22 Thread Nadav Har'El
On Wed, Jan 22, 2020 at 2:30 PM Waldek Kozaczuk wrote: > > > On Wednesday, January 22, 2020 at 4:52:51 AM UTC-5, Nadav Har'El wrote: >> >> >> On Wed, Jan 22, 2020 at 5:22 AM Waldemar Kozaczuk >> wrote: >> >>> Java 7 reached end of life almost 5 y

Re: [osv-dev] [COMMIT osv-apps master] openjdk8-fedora: Make cpio work on both fedora and ubuntu

2020-01-20 Thread Nadav Har'El
On Mon, Jan 20, 2020 at 5:00 PM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > openjdk8-fedora: Make cpio work on both fedora and ubuntu > > Signed-off-by: Waldemar Kozaczuk > > --- > diff --git a/openjdk8-fedora/Makefile

Re: [osv-dev] Fail to read data from large file

2020-01-14 Thread Nadav Har'El
On Tue, Jan 14, 2020 at 10:15 AM Lewis Tian wrote: > > > On Tuesday, January 14, 2020 at 3:45:09 PM UTC+8, Nadav Har'El wrote: >> >> >> On Tue, Jan 14, 2020 at 9:28 AM Lewis Tian wrote: >> >>> When I run pagerank on Ubuntu, the code works fine. (the gra

Re: [osv-dev] Fail to read data from large file

2020-01-13 Thread Nadav Har'El
On Tue, Jan 14, 2020 at 9:28 AM Lewis Tian wrote: > When I run pagerank on Ubuntu, the code works fine. (the graph data is > stored in web-NotreDame.txt, 21M) > 21M isn't very large, it shouldn't present any special problems. We probably have a bug that isn't just about file size: >

Re: [osv-dev] Fail to read data from large file

2020-01-14 Thread Nadav Har'El
On Tue, Jan 14, 2020 at 12:41 PM Lewis Tian wrote: > > > On Tuesday, January 14, 2020 at 4:45:27 PM UTC+8, Nadav Har'El wrote: >> >> >> Interesting. Smells like a serious stdio bug that needs to be debugged :-( >> I think it's not a coincidence that position is

[osv-dev] [PATCH] stdio: fix scanf bug

2020-01-14 Thread Nadav Har'El
ffers. no application-exposed FILE types are allowed to use read-only buffers, but sscanf and strto* may use them internally when calling functions which use the shgetc api." Signed-off-by: Nadav Har'El --- libc/internal/shgetc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libc/internal/shget

Re: [osv-dev] [PATCH 2/3] look up symbol deeper

2020-01-12 Thread Nadav Har'El
On Tue, Jan 7, 2020 at 10:15 AM Zhiting Zhu wrote: > Signed-off-by: Zhiting Zhu > This patch needs a much longer (well, anything is much longer than 0 bytes ;-)) commit message. The patch only adds a function, which isn't called in this patch. So it's important to know where you expect to use

[osv-dev] [PATCH 15/18] ELF: Function for getting calling function's object

2019-12-23 Thread Nadav Har'El
, object) method. Signed-off-by: "Nadav Har'El" --- core/elf.cc| 21 + include/osv/elf.hh |5 + 2 files changed, 26 insertions(+) --- .before/include/osv/elf.hh 2019-11-23 00:47:51.186674414 +0200 +++ .after/include/osv/elf.hh 2019-11-23 00:47:51

[osv-dev] [PATCH 14/18] ELF: Support remote_thread_local_var() in shared object

2019-12-23 Thread Nadav Har'El
. Signed-off-by: "Nadav Har'El" --- core/sched.cc|8 include/osv/sched.hh | 11 +++ 2 files changed, 19 insertions(+) --- .before/include/osv/sched.hh2019-11-23 00:47:50.953674555 +0200 +++ .after/include/osv/sched.hh 2019-11-23 00:47:50.95467

[osv-dev] [PATCH 13/18] ELF: Support other threads in object::tls_addr()

2019-12-23 Thread Nadav Har'El
want to access a shared object's thread-local variables of another thread (see remote_thread_local_var() in the next patch). Signed-off-by: "Nadav Har'El" --- core/elf.cc|3 +-- include/osv/elf.hh |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) --- .before/i

[osv-dev] Re: [PATCH 16/18] simple Inherited Thread-Local variables

2019-12-23 Thread Nadav Har'El
to include the test itself) -- Nadav Har'El n...@scylladb.com On Mon, Dec 23, 2019 at 8:28 PM Nadav Har'El wrote: > From: > > This patch adds the feature of *inherited* thread-local variables, namely > thread-local variables whose value in a new thread is inherited from the > parent

Re: [osv-dev] [PATCH] kvm: keep wall clock in sync with host

2019-12-23 Thread Nadav Har'El
In general I think this is a good approach - "good enough" for clock synchronization and won't hurt performance - but I have a few requests below. On Thu, Dec 19, 2019 at 7:03 PM Waldemar Kozaczuk wrote: > This patch is an updated version of the one originally > authored by Rick Payne over year

[osv-dev] [PATCH 16/18] simple Inherited Thread-Local variables

2019-12-23 Thread Nadav Har'El
s not recommended. Instead use the general inherited thread-local variables offered by the next patch. We correctly support inherited thread-local variables in both the OSv core, and in shared objects (the latter is especially useful for the tests :-)). Signed-off-by: "Nadav Har'El" ---

Re: [osv-dev] Re: [PATCH] add pthread_setcanceltype implementation

2019-12-31 Thread Nadav Har'El
On Tue, Dec 31, 2019 at 7:00 AM Waldek Kozaczuk wrote: > I have committed the patch because it looks correct and I saw you based it > on pthread_setcancelstate(). > > However please bear in mind that both pthread_setcancelstate() and > pthread_setcanceltype() have ZERO effect on thread

Re: [osv-dev] aarch64 resurrected

2020-01-02 Thread Nadav Har'El
On Thu, Jan 2, 2020 at 7:17 AM Waldek Kozaczuk wrote: > Happy New Year everyone! > > A couple of days ago I sent a patch that fixes an issue with large DTB and > thus brings the arm port of OSv back to life. > Thanks, great. I can confirm the "dtb too large?" problem. I'll review and commit

Re: [osv-dev] [PATCH V2] arm: do not relocate DTB, instead read it ahead of time

2020-01-02 Thread Nadav Har'El
Thanks. I can confirm that this fixes the arm problem (I built on Fedora 30), so I committed. I don't know enough about what this DTB thing is supposed to be and whether we might actually need it after the boot, but if we do, we can fix that then, I guess... -- Nadav Har'El n...@scylladb.com

Re: [osv-dev] [PATCH] libc: make timerfd_* functions handle wall clock jumps

2020-03-15 Thread Nadav Har'El
On Fri, Mar 13, 2020 at 3:47 AM Waldemar Kozaczuk wrote: > When wall clock jumps backwards triggered for example by host clock > change and propagated through kvmclock synchronization mechanism > implemented by the commit >

Re: [osv-dev] [PATCH] libc: make timerfd_* functions handle wall clock jumps

2020-03-15 Thread Nadav Har'El
ch effort on this. Just pick whatever you think is most reasonable, and we can commit it. > I am honestly a bit at loss in my reasoning:-) > > On Sun, Mar 15, 2020 at 11:30 Nadav Har'El wrote: > >> On Fri, Mar 13, 2020 at 3:47 AM Waldemar Kozaczuk >> wrote: >> >&g

Re: [osv-dev] [COMMIT osv master] libc: make timerfd_* functions handle wall clock jumps

2020-03-15 Thread Nadav Har'El
On Sun, Mar 15, 2020 at 9:25 PM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > libc: make timerfd_* functions handle wall clock jumps > > When wall clock jumps backwards triggered for example by host clock > change and propagated through

Re: [osv-dev] [COMMIT osv master] fs: move nfs support out of kernel in lieu of a separate pluggable module

2020-03-29 Thread Nadav Har'El
at boot-time, not just filesystems. -- Nadav Har'El n...@scylladb.com On Fri, Mar 27, 2020 at 6:35 PM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > fs: move nfs support out of kernel in lieu of a separate pluggable module > &g

Re: [osv-dev] [PATCH V4 2/2] mempool: use map_anon() for large allocations or when memory is fragmented

2020-03-29 Thread Nadav Har'El
On Sun, Mar 29, 2020 at 5:37 PM Waldek Kozaczuk wrote: > > > On Sunday, March 29, 2020 at 10:04:45 AM UTC-4, Nadav Har'El wrote: >> >> Looks very good, I have several minor suggestions below (inline), but I >> would have committed this patch anyway, >> excep

Re: [osv-dev] [PATCH V5 2/2] mempool: use map_anon() for large allocations or when memory is fragmented

2020-03-29 Thread Nadav Har'El
On Sun, Mar 29, 2020 at 7:56 PM Waldemar Kozaczuk wrote: > This patch mostly addresses the issue #854. In essence it changes > malloc_large() > to use mmu::map_anon() if requested memory is greater than size of "huge > page" > and it does not have be contiguous in physical memory. Also it makes

Re: [osv-dev] [PATCH V4 2/2] mempool: use map_anon() for large allocations or when memory is fragmented

2020-03-29 Thread Nadav Har'El
On Sun, Mar 29, 2020 at 8:01 PM Waldek Kozaczuk wrote: > I have just sent two new V5 patches. One extra question below in case that > might be an issue as well. > > On Sun, Mar 29, 2020 at 12:28 PM Waldek Kozaczuk > wrote: > >> +static void* malloc_large(size_t size, size_t alignment, bool

Re: [osv-dev] map-based large allocation, map_populate and mremap()

2020-03-30 Thread Nadav Har'El
On Mon, Mar 30, 2020 at 7:38 AM Waldek Kozaczuk wrote: > Hi, > > I came up with this test trying to replicate the fragmentation scenario > Rick Payne was experiencing: > > int main() { >size_t size = 0x4C1000; > >void* mem = malloc(size); >auto start =

Re: [osv-dev] [PATCH V5 2/2] mempool: use map_anon() for large allocations or when memory is fragmented

2020-03-30 Thread Nadav Har'El
On Mon, Mar 30, 2020 at 7:01 AM Waldek Kozaczuk wrote: > > > On Sunday, March 29, 2020 at 3:34:25 PM UTC-4, Nadav Har'El wrote: >> >> On Sun, Mar 29, 2020 at 7:56 PM Waldemar Kozaczuk >> wrote: >> >>> This patch mostly addresses the issue #8

Re: [osv-dev] map-based large allocation, map_populate and mremap()

2020-03-30 Thread Nadav Har'El
On Mon, Mar 30, 2020 at 10:06 PM Waldek Kozaczuk wrote: > > > On Monday, March 30, 2020 at 4:33:05 AM UTC-4, Nadav Har'El wrote: >> >> On Mon, Mar 30, 2020 at 7:38 AM Waldek Kozaczuk >> wrote: >> >>> Hi, >>> >>> I came up with this

Re: [osv-dev] GCC 10 warnings on Fedora 32

2020-05-05 Thread Nadav Har'El
Sorry about being unresponsive lately. Trying to correct that (a bit) with this response. I haven't upgraded any machine to Fedora 32 yet (I'll do it soon), so I can't test this myself. But I can make a suggestion without trying it: On Tue, May 5, 2020 at 6:09 PM Waldek Kozaczuk wrote: > Trying

Re: [osv-dev] Compile and optimize application and OSv together as one unit?

2020-05-11 Thread Nadav Har'El
On Thu, May 7, 2020 at 3:00 PM Joe Duarte wrote: > Hi all – Is there a way to compile OSv with whatever application you want > to run in it, all together in one optimized build? It seems like there > would be Link Time Optimization (LTO) opportunities there. > There is no reason why this should

Re: [osv-dev] Integrating OpenJDK with OSv to make Java boot and run faster for FaaS

2020-03-19 Thread Nadav Har'El
On Thu, Mar 19, 2020 at 3:30 PM Yuanqi Li wrote: > Hi all, > > We are a system research group from UCLA focusing on managed runtimes. We > have some experience in kernel/JVM codesign. In our last project we > modified Linux kernel to expose virtual memory subsystem to JVM to improve > its GC

Re: [osv-dev] Build failed in Jenkins: osv-build #1580

2020-03-17 Thread Nadav Har'El
On Tue, Mar 17, 2020 at 11:01 AM Nadav Har'El wrote: > We need to add ./scripts/download_fedora_aarch64_packages.py to Jenkins. > I'll see how I can do this. > Done, and also had to clean old garbage from the build directory, and now the Jenkins job finally passes. > -- > N

Re: [osv-dev] [PATCH] mempool: preliminary support of mmap-backed large allocations

2020-03-23 Thread Nadav Har'El
On Tue, Mar 24, 2020 at 12:05 AM Waldemar Kozaczuk wrote: > This patch partially addresses the issue #854. In essence it changes > malloc_large() > to use mmu::map_anon() if requested memory is >= 2MB and it does not have > be > contiguous in physical memory. It is supposed to help OSv memory

Re: [osv-dev] Build failed in Jenkins: osv-build-nightly #2085

2020-03-08 Thread Nadav Har'El
I opened https://github.com/cloudius-systems/osv/issues/1076 -- Nadav Har'El n...@scylladb.com On Sat, Mar 7, 2020 at 10:04 PM wrote: > See < > https://jenkins.scylladb.com/job/osv-build-nightly/2085/display/redirect>

Re: [osv-dev] Build failed in Jenkins: osv-build #1580

2020-03-17 Thread Nadav Har'El
We need to add ./scripts/download_fedora_aarch64_packages.py to Jenkins. I'll see how I can do this. -- Nadav Har'El n...@scylladb.com On Tue, Mar 17, 2020 at 9:19 AM wrote: > See < > https://jenkins.scylladb.com/job/osv-build/1580/display/redirect?page=changes > > > >

Re: [osv-dev] New user: trouble running a simple program

2020-05-21 Thread Nadav Har'El
On Thu, May 21, 2020 at 12:46 PM De Vries wrote: > Hi, > > Sorry if this is a bit of a newbie question. I'm trying to run a pretty > simple application on OSv: pxz . I'm able > to run other apps like mysql for example without any problem. > I have tried this the

Re: [osv-dev] Using PERCPU in application or module

2020-05-24 Thread Nadav Har'El
On Sat, May 23, 2020 at 6:35 PM Wonsup Yoon wrote: > Hi, > > I'm trying to use PERCPU macro in application or module. > Hi, The PERCPU macro does not support this. What it does is to add information about this variable in a special section of the executable (".percpu"), then arch/x64/loader.ld

[osv-dev] [PATCH 2/3] lzloader: fix memset() implementation

2020-05-23 Thread Nadav Har'El
nd results in endless recursion and a hanging boot... This started happening on Fedora 32 with Gcc 10, for example. So let's implement memset() using the base_memset() we already have in libc/string/memset.c. Fixes #1084. Signed-off-by: Nadav Har'El --- fastlz/lzloader.cc | 15 ++- 1 fi

[osv-dev] [PATCH 3/3] setup.py: support Fedora 32

2020-05-23 Thread Nadav Har'El
After the previous patches, OSv now correctly builds on Fedora 32. So support Fedora 32 in setup.py. The same packages needed in previous Fedora releases are also needed in Fedora 32. Signed-off-by: Nadav Har'El --- scripts/setup.py | 9 - 1 file changed, 8 insertions(+), 1 deletion

[osv-dev] [PATCH 1/3] memset_base(): avoid warnings in stricter C++ compiler

2020-05-23 Thread Nadav Har'El
/lzloader.cc. Signed-off-by: Nadav Har'El --- libc/string/memset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libc/string/memset.c b/libc/string/memset.c index 0d7f1c9d..c42d00cf 100644 --- a/libc/string/memset.c +++ b/libc/string/memset.c @@ -9,13 +9,13 @@ void

[osv-dev] [PATCH] libosv.so: fix warnings on truncated symbol names

2020-05-23 Thread Nadav Har'El
names get truncated to the same string, which leads us to add this symbol trice to libosv.so and get warnings from the assembler. The fix is to pass the "--wide" option to readelf, which causes it not to truncate symbol names. Fixes #1083. Signed-off-by: Nadav Har'El --- Makefile | 2 +

Re: [osv-dev] Upgrading musl - I can see light in the tunnel

2020-08-31 Thread Nadav Har'El
On Wed, Aug 26, 2020 at 7:58 AM Waldek Kozaczuk wrote: > It has been almost a month and I think I can see light in the tunnel. :-) Very nice work. > > For all the files we will have to keep changing the original musl files, I > suggest we actually store the .patch files as they make it

Re: [osv-dev] Build failed in Jenkins: osv-build-nightly #2268

2020-09-08 Thread Nadav Har'El
On Tue, Sep 8, 2020 at 9:36 PM Nadav Har'El wrote: > I don't know how, but all the OSv projects directories > (/jenkins/slave/workspace/osv-* on muninn) were left with a root-owned > "scripts/__pycache__" directory, which broke this build. > > I see now that

Re: [osv-dev] Build failed in Jenkins: osv-build-nightly #2268

2020-09-08 Thread Nadav Har'El
various tests I run and rerun. -- Nadav Har'El n...@scylladb.com On Tue, Sep 8, 2020 at 8:48 PM wrote: > See < > https://jenkins.scylladb.com/job/osv-build-nightly/2268/display/redirect> > > Changes: > > >

[osv-dev] [PATCH] syscall_to_function.h: simplify, and avoid C++20 extension

2020-10-08 Thread Nadav Har'El
out anything which may or may not appear afterwards in parentheses. It's easier, shorter, and not C++20-specific. Fixes #1099 Signed-off-by: Nadav Har'El --- libc/syscall_to_function.h | 42 ++ 1 file changed, 15 insertions(+), 27 deletions(-) diff -

Re: [osv-dev] sigsetjmp/siglongjmp trouble with new musl

2020-10-05 Thread Nadav Har'El
On Mon, Oct 5, 2020 at 9:48 PM Waldek Kozaczuk wrote: > > On Thursday, October 1, 2020 at 2:56:09 PM UTC-4 Nadav Har'El wrote: > >> >> I looked at the difference between the libc and musl implementation of >> sigsetjmp.s, and there are extensive differences I don't

Re: [osv-dev] Supporting TLS descriptors

2020-10-12 Thread Nadav Har'El
On Sun, Oct 11, 2020 at 11:44 PM Waldek Kozaczuk wrote: > As I have been researching what it would take to support TLS on aarch64, I > came across something called TLS descriptors which seems to be a default > mechanism to support Thread Local Storage on this architecture (please see >

Re: [osv-dev] [PATCH 1/5] tests: added bionic-based unit test to test time libc functions

2020-08-26 Thread Nadav Har'El
I will commit, but I think you forgot to patch the makefile to actually build this test? If that's true please send a followup patch. -- Nadav Har'El n...@scylladb.com On Wed, Aug 26, 2020 at 6:54 AM Waldemar Kozaczuk wrote: > This patch adds new unit test tst-time.cc that tests many t

Re: [osv-dev] [PATCH 2/5] libc: copy time/__tz.c from musl as is

2020-08-26 Thread Nadav Har'El
Can you please explain the motivation of this? I thought maybe you are copying it instead of just enabling it in the Makefile because you needed to change it - but the I don't see changes in the next patches. So what's the motivation? -- Nadav Har'El n...@scylladb.com On Wed, Aug 26, 2020 at 6

Re: [osv-dev] [PATCH 2/5] libc: copy time/__tz.c from musl as is

2020-08-26 Thread Nadav Har'El
Oh, I now realize the *next* patch actually does change __tz.cc. And also the Makefile for the tests that I asked about the previous patch. So sorry about the spam. -- Nadav Har'El n...@scylladb.com On Wed, Aug 26, 2020 at 11:16 AM Nadav Har'El wrote: > Can you please explain the motivat

Re: [osv-dev] [COMMIT osv master] tests: adapted w/ctype tests to work with boost unittest and added tst-string

2020-08-20 Thread Nadav Har'El
On Thu, Aug 20, 2020 at 7:18 AM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > tests: adapted w/ctype tests to work with boost unittest and added > tst-string > > Signed-off-by: Waldemar Kozaczuk > > --- > diff --git a/modules/tests/Makefile

Re: [osv-dev] [COMMIT osv master] fs:change uiomove() to use size_t in the signature instead of int

2020-08-20 Thread Nadav Har'El
// looks like a large number, but gets treated as "-1". uiomove(..., x)// x sign extended to 64-bit "-1", i.e., 18446744073709551616, will refuse to work because > SSIZE_MAX, so good. -- Nadav Har'El n...@scylladb.com On Thu, Aug 20, 2020 at 7:18 AM Commit Bot w

<    4   5   6   7   8   9   10   11   12   >