This phase I trial is studying the side effects and best dose of vorinostat when given together with isotretinoin in treating young patients with recurrent or refractory solid tumors, lymphoma, or leukemia. Drugs used in chemotherapy, such as vorinostat, work in different ways to stop the growth of cancer cells, either by killing the cells or by stopping them from dividing. Vorinostat may also stop the growth of cancer cells by blocking some of the enzymes needed for cell growth and by blocking blood flow to the cancer. Isotretinoin may cause cancer cells to look more like normal cells, and to grow and spread more slowly. Giving vorinostat together with isotretinoin may be an effective treatment for cancer.