It wouls still be legal if that's the way the system was originally designed and has never been remodeled.
No, it would be considered a dangerous condition. There's no code that I'm aware of that allows a known dangerous problem to exist. Methane is colorless, odorless, toxic, and deadly.
From the UPC:
"101.4.1.3 Existing Construction. No provision of this code shall be deemed to require a change in any portion of a plumbing or drainage system or any other work regulated by this Code in or on an existing building or lot when such work was installed and is maintained in accordance with law in effect prior to the effective date of this Code,
except when any such plumbing or drainage system or other work regulated by this Code is determined by the Administrative Authority to be in fact dangerous, unsafe, insanitary, or a nuisance and a menace to life, health, or property."