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 777491 - GUPnPServiceProxy crash in server_handler
GUPnPServiceProxy crash in server_handler
Status: RESOLVED FIXED
Product: GUPnP
Classification: Other
Component: gupnp
1.0.x
Other Linux
: Normal major
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-19 13:32 UTC by Sven Neumann
Modified: 2017-03-18 12:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to remove the handler unconditionally (1.76 KB, patch)
2017-01-19 13:32 UTC, Sven Neumann
committed Details | Review

Description Sven Neumann 2017-01-19 13:32:08 UTC
Created attachment 343799 [details] [review]
patch to remove the handler unconditionally

GUPnPServiceProxy installs a handler on the SoupServer that is owned by the GUPnPContext. As this server survives the GUPnPServiceProxy it is important that the handler is uninstalled when the service proxy is disposed.

The handler is added in the subscribe() call and removed in the unsubscribe() call. However unsubscribe() is only called from dispose() if the subscribed flag is set. As we have seen warnings about unclassed pointers in cast to 'GUPnPServiceProxy' and observed crashes from server_handler() I suspect that there are circumstances when the server handler is not removed. The problems seem to occur only when there are obviously misbehaving UPnP devices on the network. Unfortunately we have only seen this in logs from customers and have not been able to actually reproduce such crashes.
Comment 1 Jens Georg 2017-01-19 14:23:56 UTC
Is that perhaps related to bug 747721?
Comment 2 Sven Neumann 2017-01-19 15:17:34 UTC
(In reply to Jens Georg from comment #1)
> Is that perhaps related to bug 747721?

I don't think so. This report is about a problem in GUPnPServiceProxy, while bug 747721 seems to deal with a problem in GUPnPService.
Comment 3 Jens Georg 2017-03-18 12:05:21 UTC
Pushed with minor style fix