#4193 BLOC Update.: Two XOs were connected to an access point and were still running salut

Zarro Boogs per Child bugtracker at laptop.org
Mon Nov 12 20:12:00 EST 2007


#4193: Two XOs were connected to an access point and were still running salut
-------------------------------+--------------------------------------------
  Reporter:  yani              |       Owner:  robot101
      Type:  defect            |      Status:  assigned
  Priority:  blocker           |   Milestone:  Update.1
 Component:  presence-service  |     Version:          
Resolution:                    |    Keywords:          
  Verified:  0                 |  
-------------------------------+--------------------------------------------
Changes (by robot101):

  * status:  new => assigned


Comment:

 Exciting discovery of the day... jabber.laptop.org has an IPv6 address and
 an IPv4 address. The IPv6 address is a cunning decoy which isn't actually
 reachable on port 5222. Loudmouth 1.2.x's code for falling back to other
 resolver results and retrying connecting is very subtly broken, leading to
 leaking a GSource which then fires after the connection has been
 successfully established, reading uninitialised memory, and then most
 probably crashing.

 Ubuntu has a
 [https://bugs.launchpad.net/ubuntu/+source/loudmouth/+bug/64372 horrific
 workaround] which they've applied and Debian has synced in, but I think
 the attached patch fixes the real issue. In some connection failure paths,
 _lm_connection_failed_with_error was being called and kicking off a second
 connection attempt, but then the source ID was being overwritten, meaning
 the source wasn't destroyed, so the callback was still being called after
 connect_data had been freed. I guess at some point in the past
 _lm_connection_failed_with_error didn't exist or do retries, so zeroing
 out the source ID was a reasonable thing to do in case of failure. I've
 also added some asserts which should trigger if my understanding of the
 problem and solution are wrong, and these don't trigger on my machine in
 either the failure or success cases.

 Will try and push the patch up to Fedora (and Debian & Ubuntu too :D).

-- 
Ticket URL: <http://dev.laptop.org/ticket/4193#comment:16>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list