A gastric ulcer is an open sore in the stomach lining. Ulcers can cause pain. But they may also have no symptoms for a long time.