Possibly one thing, possibly two going on:
1) On the bathroom upstairs, if this is cracking right in the corner at an interior wall, especially if your attic has any kind of truss support - intermediate vertical or angle bracing between the rafters (beams that hold the roof up) and joists (the floor beams in the attic), then that issue could be truss uplift - read the prior commentary on that. I would just caulk with paintable latex caulk then paint over so mold can't grow on the caulk - might have to recaulk every few years. Keep up with it and don't let the crack stay open, because any crack in bathroom drywall lets moisture into the walls and ceiling and attic.
2) What your picture shows certainly seems to be what WowHomeSolutions talked about - looks like the drywall tape is coming loose, probably due to moisture being absorbed in the paper tape and softening the drywall compound, which will soften and turn back to soft compound when wetted.
If you are certain you are going to redo that area for appearance purposes, then here is what I would do. First, see if you can get a fingernail or razor blade under the crack - if the tape is lifting, you should be able to catch the edge like with any tape end, and start peeling back. IF so, I would take a razor blade and cut through the tape perpendicular to the crack about 6-8 inches apart, and along lengthwise near to the intersection with the wall to isolate a piece. Then, peel that little strip out carefully. If it comes off easy then tape peeling probably is the problem. Once it is off, you should also be able to see clearly if that is the limit of the crack, or if you actually have a crack through the drywall.
If no crack through drywall, then I would first check for loose ceiling sheets as described below. If not loose, then peeling off all the tape on each seam that is showing any cracking and replacing with ultrathin fiberglass or nylon/polyester joint tape, mudding the joint, sanding, priming, painting should take care of the issue, assuming you also take care of any moisture issue contributing to it by lowering your humidity at that area.
If there is rusty or muddy staining in the drywall after you pull the tape then you need to look for a water leak from above. Also any rusty nails or screw heads should be replaced to prevent bulging popouts and rust stains in the future under and eventually through new tape.
Then I would check to see if the drywall is loose - push up on it with both hands, using a scrap of plywood covered with a blanket or towel (to avoid damaging paint) to see if there is any slack. The reason for the plywood is to spread the load so you don't push through the drywall ceiling board. If ceiling moves up and down at all, have drywall installer locate existing screws/nails with a metal finder, then split-space with additional ones if existing spacing is beyond code - generally 6 to max 8 inches on edges depending if 3/8 or 1/2" drywall, not more than 12 inch in field area - preferably 8 inch.
If crack continues through drywall, then I would recommend a small (typically about a foot square - enough to get you head up in there) inspection hole be cut at the crack to look for water in the joist space. Alternatively, if you have (opr rent fr about $20/day) a color video inspection fiber optic camera, only takes about a 1/2" hole - much easier to repair. If wet, find source and solve, cut holes to air out area well, then repair drywall and paint.
Your contractor type for all this (unless you have water problems that need a plumber or roofer to fix, and mold remediation contractor to eliminate mold or fungus, if any) is a Drywall contractor.