Race condition in ogsmd

Jose Luis Perez Diez jluis at escomposlinux.org
Wed Feb 3 13:43:29 CET 2010


A Dimecres, 3 de de febrer de 2010 00:43:59, Gilles Filippini va escriure:
> The race takes place in subsystems/ogsmd/modems/ti_calypso/modem.py, in
> the TiCalypso::pathfactory method at the line:
> 
> pts, vc = self._muxeriface.AllocChannel( name, self._channelmap[name] )
> 
> This line fails silently for the 'ogsmd.call' channel when the loglevel
> is <= INFO. Adding a sleep(1) before this line fixes it reproducibly.
> 

Thanks I was investigating the problem too using exception handling.

Now I'm using the following path & log level CRITICAL for ogsmd:

--- modem.py.old        Wed Feb  3 09:04:31 2010
+++ modem.py    Wed Feb  3 13:24:31 2010
@@ -194,7 +194,13 @@
                 if not self._muxeriface.HasAutoSession():
                     # abyss needs an open session before we can allocate channels
                     self._muxeriface.OpenSession( True, 98, DEVICE_CALYPSO_PATH, 115200 )
-            pts, vc = self._muxeriface.AllocChannel( name, self._channelmap[name] )
+            else:
+                sleep(0.1) #0.01 don't work sometimes
+            try:
+                pts, vc = self._muxeriface.AllocChannel( name, self._channelmap[name] )
+            except Exception, jpde:
+                logger.critical("Error alocating channel %s : %s", name,jpde)
+                return ""
             return str(pts)

     def dataPort( self ):



More information about the Smartphones-userland mailing list