Maybe I should have looked at the photo..
According to the RV Doctor, the no. 1 cause of black tank odors is a dried out toilet seal. Can't see if you've checked that?
That does not look right at all in the photo. So did the pipe drop or was it not properly installed to start with?
I re-routed the grey tank vent pipe in our TT a few weeks ago while installing new cabinets. I found that the pipe up to the roof dropped right out when I cut the pipe. The pipe into our tank was solid and appeared to be glued (or screwed) in place. Do some tanks really not have a fitting at the tank that secures the pipe? I can't imagine not having a pipe permanently secured in place at the roof and having the pipe enter the tank without an ABS fitting so it could drop. It sounds from other posts on RV forums that this can happen though.
Could you possibly push a short length of 1 1/2" ABS with a coupling on it and try pushing it onto the pipe through the vent? Then see if you can twist the existing pipe or pull it up a fraction of an inch? You'd have to trim the vent fitting though so the coupling would fit through and replace it after.
If it turns out that the vent pipe hasn't dropped, you need to get the vent pipe extended up to the roof vent so it's not venting into the ceiling cavity. As mentioned above, dropping a tape measure down the pipe may give an answer.
If you need to extend the pipe upwards (assuming it didn't drop) depending on where your vent pipe is, to access it from inside your unit, there is always the possibility that you can pull luan plywood off a wall inside a cabinet and restaple (or air nail) it back on. Or possibly it's accessible from inside a dinette seat. If you can access the vertical pipe from inside, you may be able to cut it and add a section. Then you wouldn't have to replace and recaulk the roof vent.