This phase I trial is studying the side effects and best dose of alvocidib in treating patients with metastatic or unresectable refractory solid tumors or hematologic malignancies. Drugs used in chemotherapy, such as alvocidib, work in different ways to stop cancer cells from dividing so they stop growing or die.