- Dec 06, 2013
-
-
Benoît Canet authored
The exact location of the stack end is not needed by java so move back this variable to restore the state to what was done before the mkfs.so/cpiod.so split. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 05, 2013
-
-
Nadav Har'El authored
Add file needed for "make image=specjvm" using osv-apps.git. It builds an image containing both the management tools and specjvm. The default command line is the management - you can run specjvm explicitly, e.g., run.py -m3G -c2 -e "java.so -jar specjvm.jar -ikv -bt 2 -it 10 -wt 10 derby" Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Unfortunately, in addition to the changes in osv-apps.git needed for the "rogue" image, I also need to make a couple of changes in this repository. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
pthread_condattr_init() is needed for JDK8 to run. Add stub for now. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Some objects have DPTMOD64 relocations with the null symbol, presumably to set the value to 0 (it is too much trouble to write zero into the file during the link phase, apparently). Detect this condition and write the zero. Needed by JDK8. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Fixes the following error during SSH daemon startup which started appearing after commit c0daa41a ("external: update openjdk to 1.7.0.60-2.4.3.0.fc19"): 2013-12-05 13:59:11,596 ERROR org.crsh.ssh.term.SSHLifeCycle:177 - Could not start CRaSSHD java.lang.RuntimeException: Failed to register BouncyCastle as the defaut JCE provider at org.apache.sshd.common.util.SecurityUtils.register(SecurityUtils.java:83) ~[crash-1.0.0.jar:na] at org.apache.sshd.common.util.SecurityUtils.isBouncyCastleRegistered(SecurityUtils.java:68) ~[crash-1.0.0.jar:na] at org.apache.sshd.SshServer.setUpDefaultServer(SshServer.java:430) ~[crash-1.0.0.jar:na] at org.crsh.ssh.term.SSHLifeCycle.doInit(SSHLifeCycle.java:112) ~[crash-1.0.0.jar:na] at org.crsh.term.TermLifeCycle.init(TermLifeCycle.java:42) [crash-1.0.0.jar:na] at org.crsh.ssh.SSHPlugin.init(SSHPlugin.java:134) [crash-1.0.0.jar:na] at org.crsh.plugin.PluginManager.getPlugins(PluginManager.java:83) [crash-1.0.0.jar:na] at org.crsh.plugin.PluginContext.start(PluginContext.java:340) [crash-1.0.0.jar:na] at org.crsh.plugin.PluginLifeCycle.start(PluginLifeCycle.java:96) [crash-1.0.0.jar:na] at org.crsh.standalone.Bootstrap.bootstrap(Bootstrap.java:205) [crash-1.0.0.jar:na] at org.crsh.standalone.CRaSH.main(CRaSH.java:332) [crash-1.0.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45] at org.crsh.cli.impl.lang.MethodDescriptor$1.invoke(MethodDescriptor.java:189) [crash-1.0.0.jar:na] at org.crsh.cli.impl.invocation.InvocationMatch.invoke(InvocationMatch.java:106) [crash-1.0.0.jar:na] at org.crsh.cli.impl.invocation.InvocationMatch.invoke(InvocationMatch.java:100) [crash-1.0.0.jar:na] at org.crsh.cli.impl.bootstrap.Main.handle(Main.java:62) [crash-1.0.0.jar:na] at org.crsh.cli.impl.bootstrap.Main.main(Main.java:52) [crash-1.0.0.jar:na] at com.cloudius.cli.Main.main(Main.java:6) [crash-1.0.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45] at io.osv.RunJava.runMain(RunJava.java:153) [runjava.jar:na] at io.osv.RunJava$1.run(RunJava.java:124) [runjava.jar:na] at io.osv.OsvSystemClassLoader$1.run(OsvSystemClassLoader.java:70) [runjava.jar:na] Caused by: java.lang.ExceptionInInitializerError: null at javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:223) ~[na:1.7.0_45] at org.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration.run(SecurityUtils.java:97) ~[crash-1.0.0.jar:na] at org.apache.sshd.common.util.SecurityUtils.register(SecurityUtils.java:77) ~[crash-1.0.0.jar:na] ... 27 common frames omitted Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:86) ~[na:1.7.0_45] ... 30 common frames omitted Caused by: java.lang.SecurityException: Cannot locate policy or framework files! at javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:254) ~[na:1.7.0_45] at javax.crypto.JceSecurity.access$000(JceSecurity.java:48) ~[na:1.7.0_45] at javax.crypto.JceSecurity$1.run(JceSecurity.java:78) ~[na:1.7.0_45] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_45] at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:76) ~[na:1.7.0_45] ... 30 common frames omitted Needed for SSH daemon to start up after the openjdk upgrade. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Switch to latest apps.git that fixes Cassandra JNA woes. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
OSv does not support xattrs in ZFS. Fix up a build breakage reported by Glauber: /home/ubuntu/osv/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c: In function ‘zfs_setattr’: /home/ubuntu/osv/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:2152:12: error: ‘xoap’ may be used uninitialized in this function [-Werror=uninitialized] Reported-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Fixes #114. When building OSv image we should use set of paths from 'prod' config. This was introduced in commit c29222c6 and then copied to module.py. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Currently, clicking on the "monitor" link of OSv web console, you get a nasty crash. Switch to 2 GB to make things work out of the box. Fixes #63. Cc: Tzach Livyatan <tzach@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
There's absolutely no reason to delay web startup for 20 seconds. 2 seconds is more than enough to make Crash start up quickly. Cc: Amnon Heiman <amnon@cloudius-systems.com> Cc: Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Probably the worst indented file in the whole tree. Set Eclipse Ctrl-I on it. Also fix a unicode character in the author's name. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Prior to 65ccda4c (net: use a file derived class for sockets (socket_file)), ioctl()s for socket were directed to linux_ioctl_socket() and thence to soo_ioctl(). However that commit short-circuited linux_ioctl_socket() out and dipatched directly to what was previously known as soo_ioctl() (and became socket_file::ioctl()). The caused interface enumeration ioctl()s to fail, for example in Cassandra. Fix by bringing back the previous behaviour. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
Cassandra is crashing for me in some invocations (I really don't understand how it was running before), because it can't find setpriority and getpriority symbols. Since now we have priorities implemented in our scheduler, we can implement the equivalent functions of linux' getpriority and setpriority. We will ignore all non-thread entities for now (and possibly forever). Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Looks-Gooded-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
A list can be slow to search for an element if we have many threads. Even under normal load, the number of threads we span may not be classified as huge, but it is not tiny either. Change it to a map so we can implement functions that operate on a given thread without that much overhead - O(1) for the common case. Note that ideally we would use an unordered_set, that doesn't require an extra key. However, that would also mean that the key is implicit and set to be of type key_type&. Threads are not very lightweight to create for search purposes, so we go for a id-as-key approach. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
no users in tree. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
This allows to build a runnable image like this: make image=cassandra Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
After this change you can build tomcat image like this: make image=tomcat and then run it like this: scripts/run.py Because osv-apps repo is not yet linked as submodule, you need to edit config.json and specify location for "tomcat" module, like this: { "modules": { "mgmt": { ... }, "tomcat": { "type": "direct-dir", "path": "${HOME}/src/osv-apps/tomcat" } } } Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Benoît Canet authored
This restore the original behavior of osv::run in place before the mkfs.so and cpiod.so split committed a day ago. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
Switch the existing printout based debug info to tracepoint and add new tracepoint. Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
__vsnprintf_chk() passed the wrong length argument to the vsnprintf() call. I'm not aware of any specific bug this solves, but I found this error while auditing the *_chk() functions to figure out why "rogue" works when compiled with -DUSE_FORTIFY_LEVEL=1 but not with USE_FORTIFY_LEVEL=2. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
Our APIC code is so wrong, but so wrong, that it even produce incorrect results. X2APIC is fine, but XAPIC is using xapic::ipi() for all its interrupts. The problem with that, is that the costumary place for "vector" is inverted in the case of allbutself delivery mode, and therefore, we're sending these IPIs to God Knows Where - not to the processors, that is for sure. As a result, we would spin waiting for IRQ acks that would never arrive. I could invert and reorganize the parameters and comment this out, but I've decided it is a lot clearer just to open code it. Also, there is no need at all to set ICR2 for allbutself, because the destination is already embedded in the firing mode. One issue: NMI is copied over because it is also wrong by the same reasons, so I fixed. But I don't have a test case for this. Fixes #110 Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 04, 2013
-
-
Glauber Costa authored
This patch fixes the Amazon crash many CPUs. Funny enough, it is not actually related to the number of CPUs. In that situation, the port numbers allocated for the event channels are quite high. I don't really know the reason for that, maybe the Hypervisor reserves the small bits for CPU related things... As we have more and more CPUs and the bits shift more and more rightwards, they eventually reach the second long word of the event channel quadword. But we have been operating this with brsl, which will only reach a long word. If bit 32, for instance, is 1, it will be interpreted as bit 0 == 1. Bit 0 having no registered handler, that will turn into a nullptr access. Cheers for Dima for doing most of the debugging and heavy lifting here. The hang issues are still present. Fixes #109. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
When source code is compiled with -D_FORTIFY_SOURCE on Linux, various functions are sometimes replaced by __*_chk variants (e.g., __strcpy_chk) which can help avoid buffer overflows when the compiler knows the buffer's size during compilation. If we want to run source compiled on Linux with -D_FORTIFY_SOURCE (either deliberately or unintentionally - see issue #111), we need to implement these functions otherwise the program will crash because of a missing symbol. We already implement a bunch of _chk functions, but we are definitely missing some more. This patch implements 6 more _chk functions which are needed to run the "rogue" program (mentioned in issue #111) when compiled with -D_FORTIFY_SOURCE=1. Following the philosophy of our existing *_chk functions, we do not aim for either ultimate performance or iron-clad security for our implementation of these functions. If this becomes important, we should revisit all our *_chk functions. When compiled with -D_FORTIFY_SOURCE=2, rogue still doesn't work, but not because of a missing symbol, but because it fails reading the terminfo file for a yet unknown reason (a patch for that issue will be sent separately). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dan Schatzberg authored
The SMP bringup code uses a linked list of stacks. The APs are all brought up concurrently and so to acquire a stack, they compare and swap on smp_stack_free. The current code works as long as the compare and swap succeeds, if it fails, then smp_stack_free MUST be read again otherwise the AP will be deadlocked. This patch fixes the current code by enforcing a re-read on a cmpxchg failure. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Dan Schatzberg <schatzberg.dan@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
There is no need to hold the lock while waiting for the host to refill the entropy buffer; drop it. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
std::valarray does not guarantee its elements will be allocated contiguously, so the form &v[0] is only guaranteed to point to the first element, not the rest. Switch to std::vector, where contiguity is guaranteed. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Suppose N threads try to acquire a byte of entropy from an empty pool. They will all serialize on the mutex, waiting for the pool to refill. However, when the pool is eventually refilled, only one consumer will be awakened; the rest will continue sleeping even though there is entropy available in the pool. They will eventually be awakened when the worker refills the pool, but that's unneeded latency. Fix by using wake_all() to wake all consumers. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
It's a bad idea to claim to support /dev/urandom but rely on HW RNG because starting up Cassandra, for example, takes ages. Drop it until we have a cryptographically secure PRNG in OSv that can be used to implement /dev/urandom properly. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Convert file::f_ops/fileops to file's vtable. Reviewed-by:
Pekka Enberg <penberg@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Everyone is now overriding file's virtual functions; we can make them pure virtual and remove fileops completely. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Unused. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Everyone switched to the nifty variadic type. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-