Abstract

Multithreaded Java Program Test Generation
Orit Edelstein - IBM Research Laboratory in Haifa
Eitan Farchi - IBM Research Laboratory in Haifa
Yarden Nir - IBM Research Laboratory in Haifa
Gil Ratsaby - IBM Research Laboratory in Haifa
Shmuel Ur - IBM Research Laboratory in Haifa
Abstract:
In this work we show an effective method for rerunning
existing tests in order to detect synchronization faults
in multithreaded Java programs. The space of possible
interleavings, any of which may contain a fault,
is huge. This problem is compounded by the fact that rerunning
the tests, under the same environment, tends to create similar
interleavings. Taking a heuristic approach, we study whether
seeding the program with sleep(), yield() and priority() primitives
increases fault detection capability.  We seed the program at
shared memory access and synchronization events. At run time, we
make random decisions as to whether seeded primitives are
to be executed.  To check our approach, we attempted to
find typical concurrent faults  injected in Java
programs.  Using the seeding technique, we were able to
dramatically increase the probability of finding the
injected concurrent faults.  In addition, we found that the sleep()
primitive was almost always better at finding the injected defects
than the yield() and priority() primitives.  Finally, we defined and
implemented an architecture that combined the replay algorithm
introduced in, essential for debugging, with our
seeding technique. We call this architecture ConTest.