This answer is very long (sorry!), so in brief: things "going poorly" often depends on the subjective goals of the student, so it's important to figure out what those are and what's needed to achieve them. Being as proactive about communication as possible, and forming clear plans can give you a way to track your progress.
I get there are program specifics in some instances, but what are common signs graduate school isn't going well? Furthermore, why does this only come up after results are in?
Aside from the egregious cases mentioned before, "going poorly" depends a lot on the students' desired outcome- did they just want to get a Masters as a terminal degree? Make themselves competitive for top PhD programs? Finish the PhD and off to industry, or are they aiming for academia? This is made more difficult by the fact that "good" grad students are expected to be self-starters. The onus is on them to figure out what success looks like with respect to their goals, program and subfield, and then proactively aim for it.
So what can a grad student do to figure this out?
Talk to people - your advisor, any senior academics you have a report with, postdocs, gradating students who are pursuing the career path you want (!)- anyone who seems remotely qualified in your field and enjoys holding forth on what makes a successful grad student. Talk to your fellow students as well, just take their advice with a grain of salt. Before starting my PhD, I read "The Unwritten Rules of PhD Research" and "A PhD is not enough", both of which I'd recommend (especially the former). All of this should give you seem idea of what you need to accomplish during your program, which should be sanity checked by your supervisor, and then roughly sketched out. In my specific case, I befriended all the outgoing PhD students, and built my goal list based on (what my supervisor wanted) + (the program requirements) + (the outgoing students's advice) + (what I wanted my CV to look like to be competitive for applications) + (peer-recommended whimsy).
Once you have these goals, you can use them to determine warning signs that things aren't going well:
- You're feeling persistently upset/frustrated/stuck for an extended period of time
- You're not keeping up with benchmarks (skipping group or supervisor meetings, not publishing on schedule, falling behind on assignments,...)
- You're getting close to failing a goal
These aren't signs that you're a failure, or are failing grad school: just that you should talk to someone, and possibly adapt some plans.
Each time folks post about being behind, it's always assumed that graduate students are such high achievers that they have imposter's syndrome.
I would like to offer an alternative perspective: it's normal for grad students to experience setbacks and overcome them. Arguably, things have "been going poorly" for most students at some point. Most supervisors will expect this and be understanding, and/or assume that their student is doing their best under difficult circumstances (especially if the student indicate that they recently had medical issues). Your grad school experience will survive things going poorly for a bit: the key is to try and avoid that going so far as to derail your plans.