GNOME Bugzilla – Bug 780640
crash in gupnp_root_device_constructor()
Last modified: 2017-04-30 04:20:23 UTC
We are seeing crashes in gupnp_root_device_constructor(). The crash occurs if the network interface that GUPnPContext uses is not any longer usable. There is a race here. The context manager may not have taken the context down yet, but the network interface is already not any longer usable. Let me show you this in a log excerpt: Mar 28 01:23:59 daemon.info connmand[143]: wlan0 {add} address 192.168.0.14/24 label wlan0 family 2 Mar 28 01:23:59 daemon.info connmand[143]: wlan0 {add} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK> Mar 28 01:23:59 daemon.info connmand[143]: wlan0 {add} route 192.168.0.1 gw 0.0.0.0 scope 253 <LINK> Mar 28 01:23:59 daemon.info connmand[143]: wlan0 {add} route 0.0.0.0 gw 192.168.0.1 scope 0 <UNIVERSE> Mar 28 01:24:00 daemon.notice wpa_supplicant[150]: wlan0: CTRL-EVENT-DISCONNECTED bssid=cc:35:40:77:64:60 reason=7 Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {update} flags 36867 <UP> Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {newlink} index 5 address FC:C2:DE:FA:58:3C mtu 1500 Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {newlink} index 5 operstate 2 <DOWN> Mar 28 01:24:00 user.notice raumfeld: ** (master-process:200): WARNING **: GUPnPContext: Unable to listen on 192.168.0.14:0 Could not listen on address 192.168.0.14, port 0 Mar 28 01:24:00 user.notice raumfeld: (master-process:200): libsoup-WARNING **: (soup-uri.c:627):soup_uri_copy: runtime check failed: (SOUP_URI_IS_VALID (uri)) Mar 28 01:24:00 user.notice raumfeld: (master-process:200): Caught signal 11 Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {del} address 192.168.0.14/24 label wlan0 Mar 28 01:24:00 daemon.notice wpa_supplicant[150]: wlan0: No network configuration found for the current AP Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {del} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK> Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {RX} 33922 packets 29145588 bytes Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {TX} 56205 packets 16843513 bytes Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {update} flags 102403 <UP,LOWER_UP> Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {newlink} index 5 address FC:C2:DE:FA:58:3C mtu 1500 Mar 28 01:24:00 daemon.info connmand[143]: wlan0 {newlink} index 5 operstate 5 <DORMANT> As you can see the network interface comes up, a new GUPnPContext is created, but at the time the GUPnPRootDevice should be brought up the link is already down again and gupnp_context_get_server() returns NULL because soup_server_listen() failed.
Created attachment 348864 [details] [review] avoid the crash by leeting the GUPnPRootDevice construction fail
Created attachment 348868 [details] [review] patch for gupnp-1.0 branch