If the toilet is not working, one has to go into a baggy that has ampules that can be crushed to chemically react with the waste to prevent things like offgassing and bacterial growth.
FORBES: How Does The Restroom In The International Space Station Work?