After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563354 - gnome-session does not close ICE connection for qt3 apps
gnome-session does not close ICE connection for qt3 apps
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-05 16:32 UTC by Edward Sheldrake
Modified: 2009-01-06 01:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Possibly fix, disable shutdown negotiation before close (562 bytes, patch)
2008-12-05 16:34 UTC, Edward Sheldrake
committed Details | Review

Description Edward Sheldrake 2008-12-05 16:32:00 UTC
Since gnome 2.24, eventually I cannot start any more sufficiently complex programs, when this happens gnome-session is using 100% CPU and the tty I ran startx from is filled with:

_IceTransSocketUNIXAccept: accept() failed

Running "uic -version" in a loop, the loop will stop after uic has been run almost 1000 times, when the bug is triggered.

It seems that when a QT3 program is closed, including uic, IceCloseConnection() is called in gsm_xsmp_client_disconnect(), but it returns IceStartedShutdownNegotiation.
Comment 1 Edward Sheldrake 2008-12-05 16:34:16 UTC
Created attachment 124009 [details] [review]
Possibly fix, disable shutdown negotiation before close

With this patch, the problem no longer occurs, but I have no idea if this is correct, or if actually QT3 needs to be fixed instead.
Comment 2 Lucas Rocha 2009-01-06 01:44:52 UTC
(In reply to comment #1)
> Created an attachment (id=124009) [edit]
> Possibly fix, disable shutdown negotiation before close
> 
> With this patch, the problem no longer occurs, but I have no idea if this is
> correct, or if actually QT3 needs to be fixed instead.

From docs:

  When  it  is  known that the client on the other side of the
  ICE connection has terminated the connection without  initi-
  ating  shutdown negotiation,  the IceSetShutdownNegotiation
  function should be called to turn off shutdown negotiation.
  This will prevent IceCloseConnection from writing to a bro-
  ken connection.

This seems to be exactly what's is happening here. The gsm_xsmp_client_disconnect() call only happens when the client is being finalized and the connection is known to be terminated. Hence, we should call IceStartedShutdownNegotiation() before IceCloseConnection().

This is a regression as previous gnome-session used to do that.

Patch commited to gnome-2-24 branch and trunk.