6-7 hours under general anesthesia! Is this safe?

I will be having my rhinoplasty next month and I've been told the surgery will take 6-7 hours, since my PS will still have to harvest my rib cartilage, etc. So I will be under general anesthesia for that long. Is this safe? I'm scared, what if I don't wake up? What if I get a heart attack in the middle of being under?

