[osv-dev] page cache used in OSv with ZFS

2019-03-10 Thread zhiting zhu
Hey, Not sure whether this is the right place to ask question. Is there a description on how page cache is used in OSv with ZFS? The only place I can find that references pagecache is vfs map_page. Does it mean only mmap interects with pagecache? How does it interect with write/read system call

Re: [osv-dev] page cache used in OSv with ZFS

2019-03-13 Thread zhiting zhu
Thanks, Zhiting On Wed, Mar 13, 2019 at 8:40 AM Gleb Natapov wrote: > On Wed, Mar 13, 2019 at 02:49:27PM +0200, Nadav Har'El wrote: > > On Sun, Mar 10, 2019 at 7:35 PM zhiting zhu wrote: > > > > > Hey, > > > > > > Not sure whether this is the rig

Re: [osv-dev] page cache used in OSv with ZFS

2019-03-14 Thread zhiting zhu
Thanks for the reply! This helps a lot. Best, Zhiting On Thu, Mar 14, 2019 at 3:33 AM Gleb Natapov wrote: > On Wed, Mar 13, 2019 at 04:59:33PM -0500, zhiting zhu wrote: > > If I understand what you said correctly, OSv's read/write does go through > > the pagecache (the one

[osv-dev] using capstan to generate image for firecracker

2019-09-10 Thread zhiting zhu
Hey, The documentation of capstan only mentions about qemu in linux. Could I use capstan to generate images for firecracker? I grep the code but couldn't find anything related in the source. Best, Zhiting -- You received this message because you are subscribed to the Google Groups "OSv Deve

[osv-dev] python3 support in capstan

2019-09-11 Thread zhiting zhu
Hey, Capstan only supports python2.7. I notice that the apps folder has python3x support. I think I can add a Capstanfile to make it building in capstan but it won't be a runtime recognize by capstan. How can I turn it into a runtime that support by capstan? Best, Zhiting -- You received t

[osv-dev] Re: python3 support in capstan

2019-09-12 Thread zhiting zhu
osv.python3x > created: "2018-06-14T23:55:20-04:00" > > and meta/run.yaml: > meta/run.yaml > runtime: native > config_set: > default: > bootcmd: "/python3 hello.py" > config_set_default: default > > and build it like that: > > capstan package compose

[osv-dev] Re: python3 support in capstan

2019-09-13 Thread zhiting zhu
Following the direction in https://github.com/cloudius-systems/capstan/issues/180, I can also run cloudius/osv-python3-base. On Friday, September 13, 2019 at 1:14:54 AM UTC-5, zhiting zhu wrote: > > I tried your example but it doesn't work. I get error like this: > > Command

Re: [osv-dev] Re: python3 support in capstan

2019-09-13 Thread zhiting zhu
Run Java > apps 0.51.0 2018-06-17 17:22 > > ./capstan images > Name Description > Version Created Platform > #Mi

Re: [osv-dev] Re: python3 support in capstan

2019-09-13 Thread zhiting zhu
Version Created Platform > osv-loader OSv Bootloader >*v0.53.0* 2019-03-12 03:11 > Ubuntu-18.04 > > I hope it helps. > > On Friday, September 13, 2019 at 2:16:34 PM UTC-4, zhiting

[osv-dev] kubernetes setup

2019-09-13 Thread zhiting zhu
Hey, Has anyone tried running osv in kubernetes? What's the setup? Best, Zhiting -- 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-dev+unsubscr...@google

[osv-dev] Re: kubernetes setup

2019-09-14 Thread zhiting zhu
On virtlet's website, they say osv is runnable on virtlet. Is that still the ideal deployment tool for kubernetes? On Friday, September 13, 2019 at 4:52:59 PM UTC-5, zhiting zhu wrote: > > Hey, > > Has anyone tried running osv in kubernetes? What's the setup? > >

Re: [osv-dev] Can't download "large" files using python3 on top of Firecracker: ...virtio/net.rs:257] Receiving buffer is too small to hold frame of current size

2019-09-20 Thread zhiting zhu
Is there any difference on boot time between zfs and rofs? On Fri, Sep 20, 2019 at 2:45 PM Henrique Fingler wrote: > I'll check that out. > > Instead of detecting what hypervisor we are dealing with, we should simply >> act accordingly based on what features have been negotiated and agreed > >

[osv-dev] osv with numpy

2019-09-29 Thread zhiting zhu
I'm trying to run numpy in osv by building python3x and add numpy to PYTHON_MODULES in the GET file. But I get the following error: OSv v0.54.0-2-ga8a7b0a2 eth0: 192.168.122.15 Booted up in 282.17 ms Cmdline: /python3 Python 3.6.8 (default, Aug 20 2019, 17:12:48) [GCC 8.3.0] on linux Type "h

[osv-dev] get_paths in GET script of python3x

2019-09-29 Thread zhiting zhu
Is there any reason using the get_paths instead of pip install -r requirements -t ? The get_paths only install the module but not their dependencies. Is there any reason we can't use pip to install package? Best, Zhiting -- You received this message because you are subscribed to the Google

[osv-dev] Fail to start python flask server

2019-10-02 Thread zhiting zhu
Here's the debug log: 2019-10-02T11:47:45.654066: Firecracker ready 2019-10-02T11:47:45.657343: Configured VM 2019-10-02T11:47:45.658314: Added disk 2019-10-02T11:47:45.660264: Created OSv VM with cmdline: --verbose --ip=eth0,172.16.0.2,255.255.255.252 --defaultgw=172.16.0.1 --nopci /python3 /in

[osv-dev] Re: Fail to start python flask server

2019-10-02 Thread zhiting zhu
Oh, the tap doesn't support ipv6. No problem now. On Wednesday, October 2, 2019 at 1:05:23 PM UTC-5, zhiting zhu wrote: > > Here's the debug log: > > 2019-10-02T11:47:45.654066: Firecracker ready > 2019-10-02T11:47:45.657343: Configured VM > 2019-10-02T11:47:45.

Re: [osv-dev] Re: osv with numpy

2019-10-04 Thread zhiting zhu
loudius-systems/osv/wiki/Debugging-OSv. > > Regarding numpy this discussion might be applicable - > https://groups.google.com/d/msg/osv-dev/V9fch2WFX7o/guNzEepLBAAJ and this > - https://github.com/cloudius-systems/osv/issues/1025. > > Waldek > > On Sunday, September 29, 2019 at

[osv-dev] What's the best setup for accessing network?

2019-10-08 Thread zhiting zhu
Hey, With the -n option on firecracker.py, client on the same machine can send packet to the VM. But the VM cannot access Internet. I setup NAT based network following: https://jamielinux.com/docs/libvirt-networking-handbook/custom-nat-based-network.html I can get Internet access but the boot

Re: [osv-dev] Re: What's the best setup for accessing network?

2019-10-08 Thread zhiting zhu
x27;m not familiar with sending patch through email with git. I include the patch below. >From bbc12eb31878bdacaf20313be444ac71f9ff6578 Mon Sep 17 00:00:00 2001 From: Zhiting Zhu Date: Wed, 9 Oct 2019 00:32:35 -0500 Subject: [PATCH] scripts to setup dnsmasq and NAT Signed-off-by: Zhi

Re: [osv-dev] Re: osv with numpy

2019-10-24 Thread zhiting zhu
ferencing > this symbol in another library that is missing in the image? > > Finally, have you tried the *python-from-host *app? > > Waldek > > On Friday, October 4, 2019 at 3:50:20 PM UTC-4, zhiting zhu wrote: >> >> Hmm, I'm getting this with -V. &

Re: [osv-dev] Re: osv with numpy

2019-10-24 Thread zhiting zhu
For the host version of numpy, I try using python3-numpy and python3 -m pip install numpy. They all fail with missing symbols. Could somebody package a docker file that package a bunch of most used python package? On Thursday, October 24, 2019 at 12:17:36 PM UTC-5, zhiting zhu wrote: >

Re: [osv-dev] Re: osv with numpy

2019-10-24 Thread zhiting zhu
version of Linux distribution >- python version >- modules you are trying to run >- an application > > We need details to be able to re-create your problem. > > Do you possibly have a docker image with your OSv setup I could pull and > test it in? > > On Thursday, Octo

Re: [osv-dev] Re: osv with numpy

2019-10-25 Thread zhiting zhu
U: >> >> ./scripts/run.py -e "/python3 -c \"import numpy;\"" -c 1 >> >> Some concurrency issues (?) possibly in our dynamic linker. I need to dig >> deeper. >> >> On Thursday, October 24, 2019 at 2:56:04 PM UTC-4, Waldek Kozaczuk wrote: >

Re: [osv-dev] Re: osv with numpy

2019-10-25 Thread zhiting zhu
would > not even try to invoke this symbol. > > I hope it makes it clear. > Waldek > > Sent from my iPhone > > On Oct 25, 2019, at 11:57, zhiting zhu wrote: > >  > How does that relate to number of vcpu? Why specify -c 1 without the above > patch works? >

[osv-dev] strange return from os.mkdir

2019-11-01 Thread zhiting zhu
OSv: >>> import os >>> os.makedirs("/tmp/lambda_1") >>> os.mkdir("/tmp/lambda_1/out_0/") Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: '/tmp/lambda_1/out_0/' >>> os.mkdir("/tmp/lambda_1/out_0") >>> On the host

[osv-dev] libm symbol

2019-11-02 Thread zhiting zhu
Hey, I want to use ffmpeg python binding(pyav) in osv. One of the dependencies, libx264 uses __log2f_finite which is from libm. In the compiled lib, it shows that: U __log2_finite@@GLIBC_2.15 I see the symbol is implemented in libc/math/aliases.c. On the host, the symbol is provided by libm. W

[osv-dev] Re: libm symbol

2019-11-02 Thread zhiting zhu
Maybe I'm looking at the screen too long. I miss the f. The provided on is log2_finite. On Saturday, November 2, 2019 at 11:31:01 PM UTC-5, zhiting zhu wrote: > > Hey, > > I want to use ffmpeg python binding(pyav) in osv. One of the dependencies, > libx264 uses __log2f_

[osv-dev] Re: libm symbol

2019-11-03 Thread zhiting zhu
finite(double x) > { > return log(x); > > > BTW which ffmpeg version are you using? > > Waldek > > On Sunday, November 3, 2019 at 1:03:47 AM UTC-5, zhiting zhu wrote: >> >> >> Maybe I'm looking at the screen too long. I miss the

[osv-dev] vsock support in osv

2019-11-04 Thread zhiting zhu
Hey, Does osv support vsock? Best, Zhiting -- 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-dev+unsubscr...@googlegroups.com. To view this discussion on

[osv-dev] mount point of tmp

2019-11-06 Thread zhiting zhu
Hey, Is there anyway to change the mount point of osv of some directory? In the zfs image, it seems /tmp is mounted on the zfs rather than ramfs. Is there anyway to change the mount point for /tmp to be on ramfs? The same apply to rofs. /tmp on rofs image is mount on rofs not ramfs, which preve

[osv-dev] capture stdout/stderr of osv

2019-11-06 Thread zhiting zhu
Hey, Is there anyway to capture the output of stdout/stderr of osv's program output to host file instead of printing to screen? Best, Zhiting -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receivin

Re: [osv-dev] Re: capture stdout/stderr of osv

2019-11-07 Thread zhiting zhu
-help': > > ./scripts/run.py -e '--help /hello' > > Waldek > > On Wednesday, November 6, 2019 at 2:43:59 PM UTC-5, zhiting zhu wrote: >> >> Hey, >> >> Is there anyway to capture the output of stdout/stderr of osv's program >> ou

Re: [osv-dev] Re: capture stdout/stderr of osv

2019-11-20 Thread zhiting zhu
l have other parameter > prepended. > > Sent from my iPhone > > On Nov 7, 2019, at 09:05, zhiting zhu > > wrote: > >  > I'm using firecracker not qemu. I don't find the script has that option. > > Best, > Zhiting > > On Thu, Nov 7, 201

Re: [osv-dev] Re: capture stdout/stderr of osv

2019-11-20 Thread zhiting zhu
Oh, the log file is stored in the VM. I'm using rofs and the log file will be gone after vm shutdown if I store it in ramfs. On Wednesday, November 20, 2019 at 2:53:15 PM UTC-6, zhiting zhu wrote: > > I pass --redirect with the file path on the host. It reports error: output &g

Re: [osv-dev] Re: capture stdout/stderr of osv

2019-11-20 Thread zhiting zhu
Redirect the console output of firecracker to file solve my problem. On Wed, Nov 20, 2019 at 2:58 PM zhiting zhu wrote: > Oh, the log file is stored in the VM. I'm using rofs and the log file will > be gone after vm shutdown if I store it in ramfs. > > On Wednesday, November 20

Re: [osv-dev] Unikernels as highly isolated processes and an idea to implement limited fork/execve in OSv

2019-11-26 Thread zhiting zhu
For example, there’re lots of program that uses subprocess in python or exec.cmd in golang. Those programs have to be ported to rewrite with the api bindings. On Tue, Nov 26, 2019 at 9:06 AM Nadav Har'El wrote: > > On Tue, Nov 26, 2019 at 12:44 AM Waldek Kozaczuk > wrote: > >> Sometimes it migh

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

2019-12-09 Thread zhiting zhu
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 [backtrace] 0x403442a7 0x40397dce 0x4033eed4 0x40341d27 0x40345623 , std::allocator >, st

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

2019-12-11 Thread zhiting zhu
-lookup > problem - https://groups.google.com/forum/#!topic/osv-dev/d56plMGXi6E. I > wonder if it fixes your problem (my gut tells me yours is different). > > On Tuesday, December 10, 2019 at 3:07:09 AM UTC-5, Nadav Har'El wrote: >> >> On Mon, Dec 9, 2019 at 10:51 PM zhiting

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

2019-12-11 Thread zhiting zhu
27;m failing at that line. Offset Info Type Sym. ValueSym. Name + Addend *0b202f90 0010 R_X86_64_DTPMOD640* 0b23ca60 00010010 R_X86_64_DTPMOD64 0aee9f58 .tbss + 0 On Wed, Dec 11, 2019 at 10:36 AM zhiting zhu wrote: >

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

2019-12-11 Thread zhiting zhu
and apply this debug patch to master so it makes easier > to debug it. > > Meanwhile, can you provide a reproducing test? > > On Wednesday, December 11, 2019 at 3:49:07 PM UTC-5, zhiting zhu wrote: >> >> After tracing inside arch_relocate_rela, it's failed in case >&g

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

2019-12-13 Thread zhiting zhu
le is located in DIFFERENT shared object that the caller. On Wed, Dec 11, 2019 at 3:12 PM zhiting zhu wrote: > I get rid of the __VA_OPT and replace the __VA_ARGS__ with ##__VA_ARGS__. > ## seems to be the extension from GNU that does similar things. > > Here's the link of the Ten

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

2019-12-13 Thread zhiting zhu
d it somewhere again? > > Thanks > > On Friday, December 13, 2019 at 1:16:21 PM UTC-5, zhiting zhu wrote: >> >> I was reading the print wrong. >> I think the problem is this one: >> >> 0b23ca60 00010010 R_X86_64_DTPMOD64 0aee9f58 .tbss + 0

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

2019-12-14 Thread zhiting zhu
end us full recipe that would build the app? Ideally an >> "app" just like any we have under osv-apps repo so that I can simply run: >> ./scripts/buils image= >> >> and then run it. >> >> Thanks, >> Waldek >> >> On Friday, Decemb

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

2019-12-15 Thread zhiting zhu
Thanks for the explanation. This patch seems does the job: Author: Zhiting Zhu Date: Sun Dec 15 00:57:36 2019 -0600 handling STT_SECTION symbol Signed-off-by: Zhiting Zhu diff --git a/core/elf.cc b/core/elf.cc index e2b5b667..a5be192b 100644 --- a/core/elf.cc +++ b/core/elf.cc

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

2019-12-15 Thread zhiting zhu
github.com/ifduyue/musl/blob/79f653c6bc2881dd6855299c908a442f56cb7c2b/ldso/dynlink.c#L230-L249 I don't find that much of a difference. I check the hash calculation. gnu_hash in musl and dl_new_hash outputs the same number for that symbol name. Best, Zhiting On Sun, Dec 15, 2019 at 12:51 PM zhiting zhu wrote: > Thanks

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

2019-12-15 Thread zhiting zhu
ry to disable the version check - it might be the other bug when elf is > referencing its own old symbol. > > Sent from my iPhone > > On Dec 15, 2019, at 19:09, zhiting zhu wrote: > >  > I encounter another failed to lookup symbol error. It's > > 2813: 00

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

2019-12-16 Thread zhiting zhu
t; +case CLOCK_MONOTONIC_RAW: >> fill_ts(osv::clock::uptime::now().time_since_epoch(), ts); >> break; >> case CLOCK_REALTIME: >> >> Waldek >> >> On Sunday, December 15, 2019 at 8:40:05 PM UTC-5, Waldek Kozaczuk wrote: >>

Re: [osv-dev] Re: Docker Hub account

2019-12-22 Thread zhiting zhu
It would be good to add 18.04 LTS if possible. On Sun, Dec 22, 2019 at 12:05 PM Waldek Kozaczuk wrote: > What about authentication to push to docker hub. Per this - > https://docs.travis-ci.com/user/docker/#pushing-a-docker-image-to-a-registry - > we would need to set the username and password.

[osv-dev] missing RTLD_NEXT implementation

2019-12-25 Thread zhiting zhu
Hey, RTLD_NEXT is not implemented in dlsym. According to man page, in RTLD_NEXT case. dlsym finds the next occurrence of the desired symbol in the search order after the current object. Is that mean instead of return immediately in lookup, it looks for the second match in lookup? Below is my at

Re: [osv-dev] Re: missing RTLD_NEXT implementation

2019-12-27 Thread zhiting zhu
> Waldek > > On Thursday, December 26, 2019 at 12:23:13 AM UTC-5, zhiting zhu wrote: >> >> Hey, >> >> RTLD_NEXT is not implemented in dlsym. According to man page, in >> RTLD_NEXT case. dlsym finds the next occurrence of the desired symbol in >> the

[osv-dev] [PATCH] implement RTLD_NEXT

2019-12-28 Thread Zhiting Zhu
I took part of the tests from bionic. The test cases is passed in linux with glibc but it's still failing on osv. Signed-off-by: Zhiting Zhu --- core/elf.cc | 25 +++ include/osv/elf.hh| 1 + libc/dlfcn.cc

[osv-dev] [PATCH] add pthread_setcanceltype implementation

2019-12-30 Thread Zhiting Zhu
Signed-off-by: Zhiting Zhu --- libc/pthread.cc | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libc/pthread.cc b/libc/pthread.cc index 92508147..ac72a874 100644 --- a/libc/pthread.cc +++ b/libc/pthread.cc @@ -39,6 +39,7 @@ namespace pthread_private

[osv-dev] [PATCH] add pthread_setcanceltype implementation

2019-12-30 Thread Zhiting Zhu
Signed-off-by: Zhiting Zhu --- libc/pthread.cc | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libc/pthread.cc b/libc/pthread.cc index 92508147..ac72a874 100644 --- a/libc/pthread.cc +++ b/libc/pthread.cc @@ -39,6 +39,7 @@ namespace pthread_private

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

2019-12-30 Thread zhiting zhu
pec, we would not inflict it on our poor abused operating > system. Forgive us." > > Nadav may shed more light in this area, > Waldek > > On Monday, December 30, 2019 at 2:34:10 PM UTC-5, Zhiting Zhu wrote: >> >> Signed-off-by: Zhiting Zhu >> --- >> lib

Re: [osv-dev] [PATCH] implement RTLD_NEXT

2019-12-30 Thread zhiting zhu
t tests a lot! > > I see you took some of the code from Android Project. I wonder if we are > OK with the license. > > Before we commit I would like Nadav to take a look at this patch. > > Waldek > > On Sat, Dec 28, 2019 at 2:10 PM Zhiting Zhu > wrote: > >> I

Re: [osv-dev] Re: missing RTLD_NEXT implementation

2019-12-31 Thread zhiting zhu
t: > > ./scripts/build check > > specific test after that: > ./scripts/test.py --name tst-XXX.so > > It seems you might have the default version of java different than 8. > > On Friday, December 27, 2019 at 12:40:39 PM UTC-5, zhiting zhu wrote: >> >> How to run the

Re: [osv-dev] Re: missing RTLD_NEXT implementation

2019-12-31 Thread zhiting zhu
./tst-dlfcn On Sat, Dec 28, 2019 at 1:22 PM zhiting zhu wrote: > Hey Waldek, > > I send the patch to the list. I updated the implementation after looking > at what freebsd and bionic does. bionic's linker is implemented in c++ and > they have a very comprehensive unit test c

Re: [osv-dev] [PATCH] implement RTLD_NEXT

2020-01-02 Thread zhiting zhu
the symbol. For starters, we could at least recognize the > flags and warn what is not handled (most?). We need more comprehensive > tests for that. > > On Wednesday, January 1, 2020 at 11:00:28 PM UTC-5, Waldek Kozaczuk wrote: >> >> >> On Tuesday, December 31, 201

[osv-dev] [PATCH 2/2] Implement RTLD_NEXT

2020-01-02 Thread Zhiting Zhu
This patch depends on the patch that adds the dl_test module. Test cases are all passed in linux but some fail on osv. Signed-off-by: Zhiting Zhu --- core/elf.cc | 25 + include/osv/elf.hh | 1 + libc/dlfcn.cc | 5 +- modules/tests/Makefile | 2 + modules

[osv-dev] [PATCH 1/2] extract test files from bionic

2020-01-02 Thread Zhiting Zhu
This test files are for testing dlfcn related functions Signed-off-by: Zhiting Zhu --- .gitignore| 2 + modules/dl_tests/Makefile | 106 ++ 2 files changed, 108 insertions(+) create mode 100644 modules/dl_tests/Makefile diff --git a

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

2020-01-03 Thread zhiting zhu
CONTEXT(dlerror()) > BOOST_REQUIRE(library_with_fclose != nullptr); > -void* expected_addr = dlsym(RTLD_DEFAULT, "fclose"); > BOOST_TEST_CONTEXT(dlerror()) > BOOST_REQUIRE(expected_addr != nullptr); > typedef void* (*get_libc_fclose_ptr_fn_t)(); &

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

2020-01-04 Thread zhiting zhu
I apply the deep lookup patch. if I run ./scripts/build check, nothing is failing after applying the patch. But if I run the test individually, I see those two failures. On Sat, Jan 4, 2020 at 12:37 AM zhiting zhu wrote: > I'm not sure whether that's a bug in the test. I run the

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

2020-01-07 Thread Zhiting Zhu
This patch includes a module called dl_tests which clones the bionic and compile the needed library files. Signed-off-by: Zhiting Zhu --- .gitignore| 2 + modules/dl_tests/Makefile | 112 ++ modules/tests/Makefile| 2 + modules/tests/module.py | 1

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

2020-01-07 Thread Zhiting Zhu
Signed-off-by: Zhiting Zhu --- core/elf.cc| 25 + include/osv/elf.hh | 1 + libc/dlfcn.cc | 5 +++-- tests/tst-dlfcn.cc | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/core/elf.cc b/core/elf.cc index 882b4d49..11366ac2 100644 --- a

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

2020-01-07 Thread Zhiting Zhu
Signed-off-by: Zhiting Zhu --- core/elf.cc| 14 ++ include/osv/elf.hh | 1 + libc/dlfcn.cc | 2 +- tests/tst-dlfcn.cc | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/core/elf.cc b/core/elf.cc index 31777b92..882b4d49 100644 --- a/core/elf.cc

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

2020-01-07 Thread zhiting zhu
> 151 | void* symbol = dlsym(RTLD_DEFAULT, "test_dlsym_symbol"); > | ^~ > LD tests/tst-dlfcn.so > > I know they are temporary until we apply other but still. We recently > spent some good effort to get rid of all compiler

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

2020-01-09 Thread Zhiting Zhu
This patch includes a module called dl_tests which clones the bionic and compile the needed library files. Signed-off-by: Zhiting Zhu --- .gitignore| 2 + modules/dl_tests/Makefile | 118 ++ modules/tests/Makefile| 2 + modules/tests/module.py | 1

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

2020-01-09 Thread zhiting zhu
This updated patch should fix the parallel make error. On Fri, Jan 10, 2020 at 1:16 AM Zhiting Zhu wrote: > This patch includes a module called dl_tests which clones the bionic > and compile the needed library files. > > Signed-off-by: Zhiting Zhu > --- > .gitignore

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

2020-01-12 Thread zhiting zhu
ean condition is false, those tests would not be run. They are failing without the other patches. Zhiting On Sun, Jan 12, 2020 at 4:02 AM Nadav Har'El wrote: > > On Fri, Jan 10, 2020 at 9:16 AM Zhiting Zhu > wrote: > >> This patch includes a module called dl_tests which

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

2020-01-12 Thread zhiting zhu
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 10:36 PM zhiting zhu > wrote: > >> You can look at this thread: >> https://groups.google.com/forum/#!topic/osv-dev

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

2020-01-12 Thread Zhiting Zhu
Signed-off-by: Zhiting Zhu --- core/elf.cc| 31 +++ include/osv/elf.hh | 1 + libc/dlfcn.cc | 5 +++-- tests/tst-dlfcn.cc | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/core/elf.cc b/core/elf.cc index 882b4d49..eaf9d0c8 100644

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

2020-01-12 Thread zhiting zhu
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 > --- > core/elf.cc| 31 +++ > include/osv/elf.hh | 1 + > libc/dlfcn.cc | 5 +++-- >

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

2020-01-13 Thread Zhiting Zhu
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(-) diff --git a/core/elf.cc b/core/elf.cc index 882b4d49..badbb7b0 100644

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

2020-01-13 Thread zhiting zhu
On Mon, Jan 13, 2020 at 3:48 AM Nadav Har'El wrote: > 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. >> >> O

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

2020-01-15 Thread Zhiting Zhu
dlsym function doesn't seem to lookup symbol deep enough. This patch fixes test_dlsym_from_sofile_with_preload and dlsym_with_dependencies Signed-off-by: Waldemar Kozaczuk Signed-off-by: Zhiting Zhu --- core/elf.cc| 14 ++ include/osv/elf.hh | 1 + libc/dlfcn.cc

[osv-dev] [PATCH 2/2] Implement RTLD_NEXT

2020-01-15 Thread Zhiting Zhu
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(-) diff --git a/core/elf.cc b/core/elf.cc index 26a25c43..69dbd7ed 100644

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

2020-01-15 Thread zhiting zhu
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: > >> dlsym function doe

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

2020-01-16 Thread Zhiting Zhu
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(-) diff --git a/core/elf.cc b/core/elf.cc index fec2b590..290b263f 100644

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

2020-01-16 Thread Zhiting Zhu
dlsym function doesn't seem to lookup symbol deep enough. This patch includes a bfs version of collect dependencies. This patch fixes test_dlsym_from_sofile_with_preload and dlsym_with_dependencies. Signed-off-by: Waldemar Kozaczuk Signed-off-by: Zhiting Zhu --- core/elf.cc

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

2020-01-19 Thread Zhiting Zhu
dlsym function doesn't seem to lookup symbol deep enough. This patch includes a bfs version of collect dependencies. It fixes test_dlsym_from_sofile_with_preload and dlsym_with_dependencies. Signed-off-by: Waldemar Kozaczuk Signed-off-by: Zhiting Zhu --- core/elf.cc

[osv-dev] [PATCH v4 2/2] Implement RTLD_NEXT

2020-01-19 Thread Zhiting Zhu
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(-) diff --git a/core/elf.cc b/core/elf.cc index a419ea6a..ffb16004 100644

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

2020-01-22 Thread zhiting zhu
Hey, I'm hitting this error: ELF [tid:51, /lib/python3.6/google/protobuf/pyext/_message.cpython-36m-x86_64-linux-gnu.so]: Executing DT_INIT function ELF [tid:51, /lib/python3.6/google/protobuf/pyext/_message.cpython-36m-x86_64-linux-gnu.so]: Finished executing DT_INIT function ELF [tid:51, /

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

2020-01-23 Thread zhiting zhu
Add blk device instances 0 as vblk0, devsize=1192516096 random: virtio-rng registered as a source. random: intel drng, rdrand registered as a source. random: initialized VFS: unmounting /dev VFS: mounting rofs at /rofs random: device unblocked. On Thu, Jan 23, 2020 at 3:25 PM zhiting zhu wrote

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

2020-01-23 Thread zhiting zhu
to specify just single vCPU - it should make debugging easier. > > Also does it hang with this app only or others as well? Can you try this: > ./scripts/build image=native-example > ./scripts/run.py > > Waldek > > On Thursday, January 23, 2020 at 5:28:43 PM UTC-5, zhiting zhu

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

2020-01-23 Thread zhiting zhu
tem. The next > boot message would normally be 'VFS: mounting devfs at /dev". > > I wonder if the image (usr.img) is somehow locked or something. Have you > tried to rebuild the image? Try zfs. > > Waldek > > On Thursday, January 23, 2020 at 5:54:08 PM UTC-5, zhi

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

2020-01-23 Thread zhiting zhu
The image is 2.5 G. On Thu, Jan 23, 2020 at 5:26 PM Waldek Kozaczuk wrote: > BTW how big is you image? > > I wounder if ROFS hangs because it runs out of memory when trying to load > files into memory. > > On Thursday, January 23, 2020 at 6:24:21 PM UTC-5, zhiting zhu wrot

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

2020-01-23 Thread zhiting zhu
if 4GB. I > wonder if increasing the memory to something like 8GB would make rofs work. > rofs is not very memory efficient - see > https://github.com/cloudius-systems/osv/issues/979. This is one of the > issues I would want to work next. > > > On Thursday, January 23, 2020 at 6

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

2020-01-24 Thread zhiting zhu
Hmm, this might be a protobuf problem. I switch to another version of protobuf that matches what tensorflow uses. That seems to make the problem go away. On Fri, Jan 24, 2020 at 12:10 AM zhiting zhu wrote: > I feel it might be not the specific library's problem but osv's proble

Re: [osv-dev] Benchmarking OSv

2020-02-25 Thread zhiting zhu
Since osv is running as vm, would it be more fair to run the benchmark in linux vm for comparison? Zhiting On Tue, Feb 25, 2020 at 12:31 PM Waldek Kozaczuk wrote: > Also I ran the 2 CPU example with all tracepoints on and here is what I > got: > > ./scripts/run.py -p qemu_microvm --qemu-path /h