This partially randomized pilot trial studies how much sapanisertib reaches the brain tumor and how well it works when given before and after surgery in treating patients with glioblastoma that has grown or come back and requires surgery. Sapanisertib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth.