The java virtual machine (JVM) is the cornerstone of the java platforms. A JVM's exception handling implementation interrupts, when the objective application encounters an exception (or an error), the normal execu...
详细信息
The java virtual machine (JVM) is the cornerstone of the java platforms. A JVM's exception handling implementation interrupts, when the objective application encounters an exception (or an error), the normal execution of the application and performs specific handling tasks. However, little research has been done in systematically validating JVMs' exception handling implementations-test programs or even applications need to be carefully designed for throwing/catching exceptions at runtime;a JVM's exception handling implementation is also complicated, making it challenging to design tests for testing all of its functionalities. Inspired by the recent success of fuzz testing of compilers and JVM implementations, we introduce EHCBuilder, the first technique for fuzzing JVMs' exception handling implementations. The key idea is to construct exception handling chains, each of which abstracts a program's execution into a sequence of exception throwings, catchings, and/or handlings. A classfile seed can then be mutated into test programs with diverse exception handling chains, enabling (1) exceptions to be continuously thrown and caught at runtime, and (2) JVMs' exception handling implementations to be much more thoroughly tested. We have implemented EHCBuilder and evaluated EHCBuilder on popular JVM implementations including OpenJDK's HotSpot, Eclipse's OpenJ9, Azul's Zulu, and Oracle's GraalVM. Our results show that EHCBuilder can generate programs with very intricate exception handling chains and reveal differences among JVMs' exception handling implementations: Up to thousands of lines of source code in HotSpot's exception handling implementation are covered more than the original benchmarks;during 39 K iterations, EHCBuilder generates exception handling chains of different lengths, revealing 258 runtime differences. We classify the differences into four categories, and reveal a fast throw issue confirmed by HotSpot developers and another initCause issue confirmed by the
virtual threads are a new feature of the java virtual machine (JVM) complementing the regular java threads (called platform threads). virtual threads promise a significant throughput improvement in workloads that make...
详细信息
ISBN:
(纸本)9798350344172
virtual threads are a new feature of the java virtual machine (JVM) complementing the regular java threads (called platform threads). virtual threads promise a significant throughput improvement in workloads that make intensive use of blocking operations, but incur performance overheads in CPU-bound workloads, due to the cost of creating and maintaining the data structures associated with them. Hence, the optimal choice between platform and virtual threads depends on application behavior (which can change significantly during the execution) and on the system running the application. This work-in-progress paper proposes a new framework to automatically and adaptively select the type of threads created by an application, switching between platform and virtual threads as the application's behavior changes over time. The framework monitors several metrics of the running application. Based on these metrics, users can specify criteria for deciding when virtual threads should be preferred over platform threads and vice versa. We present a use case on the Eclipse Jetty web server. Our preliminary evaluation shows that the framework selects the thread type yielding the highest throughput depending on the application behavior, without introducing performance drawbacks.
Optimizing the java virtual machine ( JVM) options in order to get the best performance out of a program for production is a challenging and time-consuming task. HotSpot, the Oracle's open-source java VM implement...
详细信息
ISBN:
(纸本)9781450383318
Optimizing the java virtual machine ( JVM) options in order to get the best performance out of a program for production is a challenging and time-consuming task. HotSpot, the Oracle's open-source java VM implementation offers more than 500 options, called flags, that can be used to tune the JVM's compiler, garbage collector (GC), heap size and much more. In addition to being numerous, these flags are sometimes poorly documented and create a need of benchmarking to ensure that the flags and their associated values deliver the best performance and stability for a particular program to execute. Auto-tuning approaches have already been proposed in order to mitigate this burden. However, in spite of increasingly sophisticated search techniques allowing for powerful optimizations, these approaches take little account of the underlying complexities of JVM flags. Indeed, dependencies and incompatibilities between flags are non-trivial to express, which if not taken into account may lead to invalid or spurious flag configurations that should not be considered by the auto-tuner. In this paper, we propose a novel model, inspired by the feature model used in Software Product Line, which takes the complexity of JVM's flags into account. We then demonstrate the usefulness of this model, using it as an input of a Genetic Algorithm (GA) to optimize the execution times of DaCapo Benchmarks.
Current java virtual machine (JVM) fuzzers aim at generating syntactically valid java programs, without targeting any particular use of the standard java library. While effective, such fuzzers fail to discover specifi...
详细信息
ISBN:
(纸本)9781665458139
Current java virtual machine (JVM) fuzzers aim at generating syntactically valid java programs, without targeting any particular use of the standard java library. While effective, such fuzzers fail to discover specific kinds of bugs or vulnerabilities, such as type confusion, that are related to the standard API usage. To deal with this issue, we introduce a mutation-based feedback-guided black-box JVM fuzzer, called CONFUZZION. CONFUZZION, as the name suggests, targets security-relevant object-oriented flaws with a particular focus on type confusion vulnerabilities. We show that in less than 4 hours, on commodity hardware and without any predefined initialization seed, CONFUZZION automatically generates java programs that reveal JVM vulnerabilities, i.e., the Common Vulnerabilities and Exposures CVE-2017-3272. We also show that state-of-the-art fuzzers or even traditional automatic testing techniques are not capable of detecting such faults, even after 48 hours of execution in the same environment. To the best of our knowledge, CONFUZZION is the first fuzzer able to detect JVM type confusion vulnerabilities.
Contemporary concurrent server applications, commonly built of smaller and independent services, are using concurrent threads to serve many incoming requests and often have to perform under excessive load. Those appli...
详细信息
ISBN:
(纸本)9789532330991
Contemporary concurrent server applications, commonly built of smaller and independent services, are using concurrent threads to serve many incoming requests and often have to perform under excessive load. Those applications are relatively easy to develop in general-purpose, imperative programming languages such as java, and have great tooling support. However, such applications are not easily scalable, mostly due to relying on oversized OS kernel threads, which can be created only in a limited number on finite hardware resources. Furthermore, heavyweight OS threads are implemented so robustly and generically to support various usage scenarios, and are, therefore, wasteful in resources and often inefficient in addressing specific application demands. Those challenges in software development resulted in various asynchronous programming techniques. This paper presents an exploration of a novel structured concurrency model in the java virtual machine (JVM), introduced within OpenJDK's Project Loom. It is focused on the exploitation of fibers, new lightweight implementation of virtual threads within the JVM depending on delimited continuations. Furthermore, on several applications' benchmark cases, we analyzed performance with traditional threads and new fibers in different configurations. Finally, we discussed the current challenges of implementing fibers as a feasible approach for the more efficient future of java.
Various applications, frameworks, and services are built on java virtual machine (JVM) (e.g., Big data analytics) due to its cross platform portability. However, many of them suffer from long latency of Garbage Collec...
详细信息
ISBN:
(纸本)9781450368667
Various applications, frameworks, and services are built on java virtual machine (JVM) (e.g., Big data analytics) due to its cross platform portability. However, many of them suffer from long latency of Garbage Collection (GC) which also drops throughput, efficiency, and availability of the system. For example, when clients demand larger memory than available system memory, Operating System (OS) usually uses its swap space to release the space by evicting some inactive contents stored in memory. In this case, GC latency can be longer due to the I/O time (i.e., swap in/out). In this paper, we present a performance analysis of the existing GC policy in JVM. Based on the result of analysis, we propose an efficient GC scheme to improve the GC performance via swap I/O optimization to complement the existing GC policy. In this scheme, we selectively compact JVM heap by interacting with OS swap system during GC. The experimental results demonstrate that our scheme reduces overall GC overhead by 77.5% and improves the throughput by 82.5% respectively.
Fork/join applications are divide-and-conquer algorithms recursively forking tasks that are executed in parallel, waiting for them to complete, and then typically joining their results. An efficient fork/join applicat...
详细信息
ISBN:
(纸本)9781450376464
Fork/join applications are divide-and-conquer algorithms recursively forking tasks that are executed in parallel, waiting for them to complete, and then typically joining their results. An efficient fork/join application maximizes parallelism while minimizing overheads, and maximizes locality while minimizing contention. However, there is no unique optimal implementation that best resolves such tradeoffs and failing in balancing them may lead to fork/join applications suffering from several issues (e.g., suboptimal forking, load imbalance, excessive synchronization), possibly compromising the benefits of task-parallel execution. Moreover, there is a lack of profilers enabling performance analysis of a fork/join application. As a result, developers are often required to implement their own tools to analyze fork/join applications, which could be time-consuming, error-prone, and is often beyond the expertise of the developer. In this paper, we present FJProf, a novel profiler which accurately collects runtime metrics to allow characterizing several performance attributes specific to a fork/join application running on a single java virtual machine (JVM) in a shared-memory multicore. FJProf reports information and graphics to developers that help them understand the details of any fork/join processing exposed by a parallel application running on the JVM. We show how FJProf supports performance analysis by characterizing a fork/join application from the Renaissance benchmark suite.
We present P-3, a new profiler suite for parallel applications on the java virtual machine. P-3 specifically targets metrics related to parallelism, concurrency, and synchronization. In particular, P-3 profiles the us...
详细信息
ISBN:
(纸本)9783030644369;9783030644376
We present P-3, a new profiler suite for parallel applications on the java virtual machine. P-3 specifically targets metrics related to parallelism, concurrency, and synchronization. In particular, P-3 profiles the use of concurrent entities (e.g., threads, tasks, actors, futures), constructs and classes to implement synchronization (including locks, thread parking, and the synchronizers from the *** package), lock-free operations (such as atomic and volatile memory accesses), as well as synchronized and concurrent collections. To the best of our knowledge, our suite is the first tool detecting the use of volatile memory accesses, futures, synchronizers, and utility classes commonly used in concurrent programming. Moreover, P-3 incurs only moderate profiling overhead. P-3 can be readily applied to popular benchmark suites and to public code repositories, facilitating new analyses in the wild. We describe the design and implementation of P-3 and discuss how our tool was fundamental in the selection of workloads composing the Renaissance benchmark suite. Moreover, we use P-3 to analyze the variability of different metrics for multiple iterations of the Renaissance benchmarks.
The *** framework is becoming a popular option among developers that target the java virtual machine (JVM) to implement map-reduce-like transformations on collections. A key feature of the streams framework is enablin...
详细信息
ISBN:
(纸本)9781450375078
The *** framework is becoming a popular option among developers that target the java virtual machine (JVM) to implement map-reduce-like transformations on collections. A key feature of the streams framework is enabling parallelizing a computation as easy as calling a single method. Still, developers should test whether parallelizing a stream may results in performance, liveness or safety hazards. While such issues are mainly observable at runtime, there is a lack of tools capturing information that enable understanding the dynamic behavior of a stream application. In this extended abstract, we devise a profiler focused on characterizing dynamic attributes of a stream application running on a single JVM in a shared-memory multicore. Our tool aims at collecting runtime information and key metrics to support analysis of sequential and parallel stream processing, towards helping developers make better decisions to efficiently and safely use the streams framework.
Task granularity, i.e., the amount of work performed by parallel tasks, is a key performance attribute of parallel applications. On the one hand, fine-grained tasks (i.e., small tasks carrying out few computations) ma...
详细信息
Task granularity, i.e., the amount of work performed by parallel tasks, is a key performance attribute of parallel applications. On the one hand, fine-grained tasks (i.e., small tasks carrying out few computations) may introduce considerable parallelization overheads. On the other hand, coarse-grained tasks (i.e., large tasks performing substantial computations) may not fully utilize the available CPU cores, leading to missed parallelization opportunities. In this article, we provide a better understanding of task granularity for task-parallel applications running on a single java virtual machine in a shared-memory multicore. We present a new methodology to accurately and efficiently collect the granularity of each executed task, implemented in a novel profiler (available open-source) that collects carefully selected metrics from the whole system stack with low overhead, and helps developers locate performance and scalability problems. We analyze task granularity in the DaCapo, ScalaBench, and Spark Perf benchmark suites, revealing inefficiencies related to fine-grained and coarse-grained tasks in several applications. We demonstrate that the collected task-granularity profiles are actionable by optimizing task granularity in several applications, achieving speedups up to a factor of 5.90x. Our results highlight the importance of analyzing and optimizing task granularity on the java virtual machine.
暂无评论