When I was in basic, we had four or five guys leave in my platoon. One had a heart attack, he was 34 years old, and in very poor shape, one of them had a head so big they couldn't find a helmet or hat that could fit him, honest to God. The others attempted suicide by feigning an injury and getting muscle relaxers prescribed and then took them all. Nothing really happened to them except they lost control of their bodily functions and they were as limp as rag dolls.
The Drill Sargeants told us that if anyone attempted suicide and failed, they were going to keep you there for the entire cycle until you were sent home. They isolated those 2 that did, and we weren't allowed to talk to them. They were basically kept in solitary confinement for 8 weeks and did chores like rake the grass and pick up cigarette butts all day. I felt sorry for those guys just waiting and waiting while they watched us practice marching, go to the range, etc. I'm sure they regretted what they did.
One sure fire way to get out is to test positive for drugs. That will still get you an honorable discharge if it's the only thing you've done wrong. I know, I processed several discharges as a commander, and I even tried to get dishonorable or even a general discharge under honorable conditions. It wasn't easy to do. I was only able to get a general discharge for one guy, and I had a file full of documented problems with him. In order to get a dishonorable, your discharge had to be pretty much connected to a crime IIRC.