When drywall is nailed to ceilings of homes that are constructed with truss framed roofs, the drywall should never be nailed to the trusses with in the first 2' of an interior wall.
The roof trusses bear all of its weight on the outside walls and spans over interior partitions, never really relying on the interior walls for support. When the roof sustains a load from snow or even perhaps heating and cooling. What this does, over the interior partitions, the bottom cord of the truss flexes, or it is supposed to flex up and down over the interior walls.
To allow the drywall to compensate for this was to NOT nail the drywall close to the interior walls. If it was nailed close to the walls the drywall nails would pull through or pull out of the framing of the truss. This is what it seems is going on with you.
The other nail pop, sometimes it just goes that way, that nail or nails, whether it it is in a wall or in the ceiling near the exterior wall, reset it and set another nail or screw beside it that in known to be in good wood so that the lap of the head of the second fastener laps over the original to insure it holds it in place. The other nails that are located near the interior walls that are with in 2' of the wall, remove them and spackle the holes.