[Bugs] #1568 UNSP: Call sync() after profile creation

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Fri Nov 20 06:55:12 EST 2009


#1568: Call sync() after profile creation
------------------------------------------+---------------------------------
    Reporter:  sayamindu                  |          Owner:  tomeu                      
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar                      |        Version:  Git as of bugdate          
    Severity:  Unspecified                |       Keywords:  r?                         
Distribution:  Unspecified                |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------

Comment(by sayamindu):

 While I agree that calling sync() everywhere is not a nice idea, and
 fsync() is a better option (I have already proposed that we use fsync() at
 a couple of places in the datastore), there are certain areas which merit
 the use of a sync, because a large number of files may be in use, some of
 which are outside the scope of the sugar codebase (gconf databases, ssh
 keys, etc). For example, for the following log:

 {{{
 1257402816.022310 ERROR root: Keypair exists, skip generation.
 1257402817.445231 ERROR dbus.proxies: Introspect error on
 org.laptop.Sugar.Presence:/org/laptop/Sugar/Presence:
 dbus.exceptions.DBusException:
 org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with
 unknown return code 1
 1257402818.312790 WARNING sugar.presence.presenceservice: Unable to
 retrieve local user/owner
                    from presence service:
 org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with
 unknown return code 1
 Traceback (most recent call last):
   File "/usr/bin/sugar-session", line 173, in <module>
     main()
   File "/usr/bin/sugar-session", line 145, in main
     start_ui_service()
   File "/usr/bin/sugar-session", line 90, in start_ui_service
     ui_service.start()
   File "/usr/lib/python2.6/site-packages/jarabe/view/service.py", line 63,
 in start
     owner_model = owner.get_model()
   File "/usr/lib/python2.6/site-packages/jarabe/model/owner.py", line 112,
 in get_model
     _model = Owner()
   File "/usr/lib/python2.6/site-packages/jarabe/model/owner.py", line 77,
 in __init__
     self._invites = Invites()
   File "/usr/lib/python2.6/site-packages/jarabe/model/invites.py", line
 78, in __init__
     owner = ps.get_owner()
   File "/usr/lib/python2.6/site-
 packages/sugar/presence/presenceservice.py", line 459, in get_owner
     raise RuntimeError("Could not get owner object.")
 RuntimeError: Could not get owner object.
 }}}

 It is very difficult to recover from this gracefully.
 To be even more fool-proof, I think we can take a look at the places we
 can recover gracefully (either by regenerating the data or by using sane
 defaults), but we can never say for sure that sugar will not break due to
 filesystem issues.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1568#comment:4>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list