On Thu, Aug 18, 2016 at 6:02 AM, Antti Kantee <[email protected]> wrote: > On 17/08/16 23:11, Myungho Jung wrote: > >> Hi all, >> >> I just pushed OpenJDK8 package to repo. You can check here. >> >> https://github.com/rumpkernel/rumprun-packages/tree/master/openjdk8 >>> >> > That's one serious contribution! I was already impressed when reading the > diffs on github, only to realize that github didn't even show the biggest > diffs ;) > > Do you have plans to upstream your patches? I guess some of them need to > be tweaked a bit more, and it's more work, but at least it would avoid the > work of having to roll the patches forward for the next version. >
I don't have more patches for now. And hg is so slow and it frequently failes when cloning. So, I'm thinking just upload whole patched codes on github and working together if it's not a problem related to license and others. > > re: dlsym(). At some point I thought we could "emulate" dlsym(), at least > as good as what you've done, by building a symbol address table using the > toolchain and linking that table into the finished image. Now that there's > a use case, it might be worth doing and cutting down the patches that way. > Yes, I just generated it from source codes using grep and sed but it's not a good way. I referenced the patch below for supporting static build on mac osx. http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/55573c377d64 I found that if the first argument of dlopen is NULL, it returns a handle of the main program. But, this way was not working in Rump. Is it possible to add dl library working like this to rump instead of returning NULL pointer? > > re: libffi patch: I wonder if there was a reason for originally writing > the code in that order, doesn't really seem to make a difference. However, > doesn't the same memory corruption problem exist in the same file at least > for functions returning a struct? Actually, I'm not sure what cause the problem. It only happens randomly when running jetty but you can definitely find the bug with gdb. You may need to compile libffi and OpenJDK in debug mode using -g flag. First, set breakpoint to line 78 of unix64.S in libffi: leap 24(%rbp), %rsp. then if you command next and print *(int*)$rbp, it will show 0xe02b and garbage values in next addresses like *(int*)($rbp+8*x). It makes jump to wrong address and page fault error. It is so weird because I could not see any other threads in gdb with info threads. I'm guessing that it may be caused by a bug in netbsd or rump. > > > It is only headless zero version without X11, font, and sound libraries but >> you can run java web applications with jetty. I just tested jetty demo >> application so it may not be stable so don't use in production. >> > > It's been building for a while now -- the hg checkout alone took several > minutes. I assume it'll be building for a while longer. I'll let you know > what happens ;) > So, I'm consdering uploading full source on github. > > thanks! > - antti > >
