Re: [gupnp] Seg faults

From: Jorn Baayen <jorn@openedhand.com>
Date: Sun Jul 08 2007 - 11:26:13 EDT

On Sun, 2007-07-08 at 12:11 +0200, Christian Lundgren wrote:
> Tested trunk right now and it now sending service request works when
> devices have the same UDN. But I get a double free corruption error on
> exit, this doesn't happen if I change the UDNs so that they differ. I've
> attached a trace of the crash.

Oops, should be fixed in trunk now!

> Also I'm starting to suspect that linux-igd is quite broken. The
> AddPortMapping request only works if the device have the same UDN, if
> they don't I get a 500 Internal server error.

That does sound wrong ..

> So I'll try it some more on some other devices when I get the chance.

Cool :)

Thanks,

Jorn

>
>
> /Christian
>
> lör 2007-07-07 klockan 21:18 +0200 skrev Jorn Baayen:
> > Hi!
> >
> > On Sat, 2007-07-07 at 14:50 +0200, Christian Lundgren wrote:
> > > Ok done, tried out trunk and the problems I had seems to be solved so
> > > far. Nice work :)
> >
> > Rock!
> >
> > > Only one minor issue remains, I'm testing things (port forwarding) with
> > > linux-igd (upnpd) and by default all of it's devices have the same UDN.
> > > Which produces warnings like
> > >
> > > WARNING **: Device description does not contain service with type
> > > "urn:schemas-upnp-org:service:WANIPConnection:1".
> > >
> > > Because _gupnp_device_proxy_find_element_for_udn will always return the
> > > first device and not the device holding the WANIPConn. service in the
> > > deviceList. However I suspect the specs doesn't allow multiple devices
> > > with the same UDN? Not sure though, it worked with libupnp..
> >
> > Hmm. Using the same UDN for different embedded devices can't be right,
> > as the UDN as search target suddenly matches more than one device from
> > the same description document. Discovery responses will be ambiguous.
> >
> > But as libupnp handles this without complaining, we will too as there
> > are probably many "bad" devices around. I committed code for this to
> > trunk. If you get the chance it would be great if you could test!
>
> > Thanks,
> >
> > Jorn
> >
> > >
> > > lör 2007-07-07 klockan 00:43 +0200 skrev Jorn Baayen:
> > > > Hi!
> > > >
> > > > Thanks for testing things!
> > > >
> > > > I had a look at the code and didn't see anything obviously wrong. But
> > > > the code has changed a *lot* since 0.1 -- it would be really great if
> > > > you could test against trunk! Also if the problems still persist, a test
> > > > case would be very much appreciated.
> > > >
> > > > Many thanks,
> > > >
> > > > Jorn
> > > >
> > > >
> > > > On Fri, 2007-07-06 at 20:38 +0200, Christian Lundgren wrote:
> > > > > With gupnp 0.1 I receive this seg fault, I've not tested if this happens
> > > > > with trunk. This only happens when I connect the "subscription-lost"
> > > > > signal, otherwise it runs fine.
> > > > > Looks to me like the xmlNode* passed to xml_util_get_element is
> > > > > uninitialized. Backtrace:
> > > > >
> > > > > #0 xml_util_get_element (node=0x1) at xml-util.c:42
> > > > > #1 0x00de4a16 in get_property (info=0x9975b88,
> > > > > element_name=<value optimized out>) at gupnp-service-info.c:264
> > > > > #2 0x00de4af9 in get_url_property (info=0x9975b88,
> > > > > element_name=0xde820a "eventSubURL") at gupnp-service-info.c:295
> > > > > #3 0x00de5d4d in subscription_expire (user_data=0x9975b88)
> > > > > at gupnp-service-proxy.c:1183
> > > > > #4 0x00928bf6 in ?? () from /lib/libglib-2.0.so.0
> > > > > #5 0x00928622 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
> > > > > #6 0x0092b5ff in ?? () from /lib/libglib-2.0.so.0
> > > > > #7 0x0092b9a9 in g_main_loop_run () from /lib/libglib-2.0.so.0
> > > > > #8 0x04c601b4 in gtk_main () from /usr//lib/libgtk-x11-2.0.so.0
> > > > > #9 0x04301fa7 in Gtk::Main::run_impl ()
> > > > > from /usr//lib/libgtkmm-2.4.so.1
> > > > > #10 0x04301d92 in Gtk::Main::run () from /usr//lib/libgtkmm-2.4.so.1
> > > > > #11 0x080c4e23 in main (argc=135061904, argv=0xb6000000) at main.cc:72
> > > > >
> > > > >
> > > > > And when I try to unrefrence the ControlPoint object I get this, could
> > > > > it be something that I am doing wrong here?
> > > > >
> > > > > Program received signal SIGABRT, Aborted.
> > > > > [Switching to Thread -1209009584 (LWP 14902)]
> > > > > 0x004a3402 in __kernel_vsyscall ()
> > > > > (gdb) bt
> > > > > #0 0x004a3402 in __kernel_vsyscall ()
> > > > > #1 0x00788fa0 in raise () from /lib/libc.so.6
> > > > > #2 0x0078a8b1 in abort () from /lib/libc.so.6
> > > > > #3 0x007bfebb in __libc_message () from /lib/libc.so.6
> > > > > #4 0x007c7f41 in _int_free () from /lib/libc.so.6
> > > > > #5 0x007cb580 in free () from /lib/libc.so.6
> > > > > #6 0x00dd582a in gupnp_device_proxy_finalize (object=0xb5f7ae90)
> > > > > at gupnp-device-proxy.c:63
> > > > > #7 0x00ad40dc in g_object_unref () from /lib/libgobject-2.0.so.0
> > > > > #8 0x00dd3c2d in gupnp_control_point_dispose (object=0x8d68c08)
> > > > > at gupnp-control-point.c:122
> > > > > #9 0x00ad403b in g_object_unref () from /lib/libgobject-2.0.so.0
> > > > > #10 0x005d2003 in ~UPnPPlugin (this=0x8a066e0) at PluginUPnP.cc:52
> > > > > #11 0x0025bdef in ~PluginManager (this=<value optimized out>)
> > > > > at PluginManager.cc:41
> > > > > #12 0x002593b7 in __tcf_6 () at ./linkage/RefCounter.hh:36
> > > > > #13 0x0078bf27 in __cxa_finalize () from /lib/libc.so.6
> > > > > #14 0x00252eb4 in __do_global_dtors_aux ()
> > > > > from /usr//lib/liblinkage-1.so.0
> > > > > #15 0x00289acc in _fini () from /usr//lib/liblinkage-1.so.0
> > > > > #16 0x0074f842 in _dl_fini () from /lib/ld-linux.so.2
> > > > > #17 0x0078bc5e in exit () from /lib/libc.so.6
> > > > > #18 0x00775f78 in __libc_start_main () from /lib/libc.so.6
> > > > > #19 0x0805f9d1 in _start ()
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com
> > > > >
> > > >
> > > > --
> > > > To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com
> > > >
> > >
> >
> > --
> > To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com
> >

--
To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com
Received on Sun, 08 Jul 2007 17:26:13 +0200

This archive was generated by hypermail 2.1.8 : Sun Jul 08 2007 - 12:00:06 EDT