xpra icon
Bug tracker and wiki

Opened 9 months ago

Closed 7 months ago

#2592 closed defect (worksforme)

server crash on SIGINT

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 4.0
Component: server Version: 3.0.x
Keywords: Cc:

Description

Reproducible fairly reliably.
Trying to debug #2587: connect an android client (is this relevant?) multiple times, eventually send a SIGINT to the server (control-c).

Traceback (most recent call first):
  File "/usr/lib64/python3.7/site-packages/xpra/gtk_common/error.py", line 116, in Xexit
    Gdk.flush()
  File "/usr/lib64/python3.7/site-packages/xpra/gtk_common/error.py", line 139, in _call
    self.Xexit(need_sync)
  File "/usr/lib64/python3.7/site-packages/xpra/gtk_common/error.py", line 146, in call_synced
    return self._call(True, fun, args, kwargs)
  File "/usr/lib64/python3.7/site-packages/xpra/gtk_common/error.py", line 163, in swallow_synced
    self.call_synced(fun, *args, **kwargs)
  File "/usr/lib64/python3.7/site-packages/xpra/x11/gtk_x11/composite.py", line 54, in do_destroy
    trap.swallow_synced(X11Window.XCompositeUnredirectWindow, self.xid)
  File "/usr/lib64/python3.7/site-packages/xpra/x11/gtk_x11/window_damage.py", line 77, in destroy
    self.do_destroy(win)
  File "/usr/lib64/python3.7/site-packages/xpra/x11/models/core.py", line 307, in do_unmanaged
    self._composite.destroy()
  File "/usr/lib64/python3.7/site-packages/xpra/x11/models/window.py", line 338, in do_unmanaged
    super().do_unmanaged(wm_exiting)
  File "/usr/lib64/python3.7/site-packages/xpra/x11/models/core.py", line 293, in unmanage
    self.emit("unmanaged", exiting)
  File "/usr/lib64/python3.7/site-packages/xpra/x11/gtk_x11/wm.py", line 401, in cleanup
    win.unmanage(True)
  File "/usr/lib64/python3.7/site-packages/xpra/x11/server.py", line 285, in do_cleanup
    self._wm.cleanup()
  File "/usr/lib64/python3.7/site-packages/xpra/server/server_core.py", line 445, in cleanup
    self.do_cleanup()
  File "/usr/lib64/python3.7/site-packages/xpra/server/server_core.py", line 356, in clean_quit
    self.cleanup()
  File "/usr/lib64/python3.7/site-packages/gi/overrides/Gtk.py", line 1630, in main
    return _Gtk_main(*args, **kwargs)
  File "/usr/lib64/python3.7/site-packages/xpra/server/gtk_server_base.py", line 120, in do_run
    Gtk.main()
  File "/usr/lib64/python3.7/site-packages/xpra/server/server_core.py", line 420, in run
    self.do_run()
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/server.py", line 904, in do_run_server
    r = app.run()
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/server.py", line 340, in run_server
    return do_run_server(error_cb, opts, mode, xpra_file, extra_args, desktop_display)
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/main.py", line 448, in run_mode
    return run_server(error_cb, options, mode, script_file, args, current_display)
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/main.py", line 115, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "/usr/bin/xpra", line 10, in <module>
    sys.exit(main(sys.argv[0], sys.argv))

Change History (4)

comment:1 Changed 9 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

Reproducible fairly reliably:

  • xpra start
  • xpra info
  • xpra attach
  • control-c the server

Bisecting with python3:

Bisecting with python2 is not possible.. as the bug does not occur.

There is a difference between python2 and python3 when it comes to handling subprocess signals.
r25237 fixes the problem by switching from os.setsid to os.setpgrp.

More information here: Making sure a Python script with subprocesses dies on SIGINT and here: How to stop python from propagating signals to subprocesses?

See also ticket:2413#comment:1.

Last edited 9 months ago by Antoine Martin (previous) (diff)

comment:2 Changed 8 months ago by Antoine Martin

Resolution: fixed
Status: closedreopened

Still crashing, though less reliably??

comment:3 Changed 8 months ago by Antoine Martin

See also #2476

comment:4 Changed 7 months ago by Antoine Martin

Resolution: worksforme
Status: reopenedclosed

Maybe r25237 really did fix the problem?
I'm not seeing the crash any more.

Note: See TracTickets for help on using tickets.