When eciadsl-synch from eciadsl-0.10 end on timeout, the semaphore is not
removed and and a new one is created at the next synch attempt.

I saw this three days ago by adding some debug info to my synch script:
I do like this
  while [ $CNT -le 5 -a $RET -ne 0 ]; do
   msg "$MODEM Synch attempt #$CNT"
   cat /proc/sysvipc/sem > /tmp/synch-$CNT.log
   /usr/$BPATH/eciadsl-synch -v 0x$VID2 0x$PID2 /var/ipcop/eciadsl/synch.bin
>> /tmp/synch-$CNT.log
   RET=$?
   CNT=$(expr $CNT + 1)
   /bin/sleep 2
  done

Result from the    cat /proc/sysvipc/sem look like this
       key      semid perms      nsems   uid   gid  cuid  cgid      otime
ctime
         0          0   600          1    99    99     0     0 1100813666
1100642584
         0      65537   666          1     0     0     0     0 1100642783
1100642781
         0      98306   666          1     0     0     0     0 1100642814
1100642803
         0     393219   666          1     0     0     0     0 1100643176
1100643165
         0     458756   666          1     0     0     0     0 1100644108
1100644095
         0     524293   666          1     0     0     0     0 1100644281
1100644270
         0     589830   666          1     0     0     0     0 1100644397
1100644396
         0     622599   666          1     0     0     0     0          0
1100644458
         0    1310728   666          1     0     0     0     0 1100675119
1100675107
         0    1966089   666          1     0     0     0     0 1100813258
1100813231
         0     851979   666          1     0     0     0     0 1100645262
1100645252
         0    1179660   666          1     0     0     0     0 1100646578
1100646563
         0    1212429   666          1     0     0     0     0 1100646627
1100646625
         0    1245198   666          1     0     0     0     0          0
1100646687

All semaphores but the first one were created and not removed by
eciadsl-synch-0.10 (I have removed one or two more of them playing with
ipcrm at the middle of the list).
Next I try to understand and add some debug info on the code to see what
happen.
By mistake, I copy the eciadsl-synch binary from
eciadsl-usermode-0.10-nortek-alpha. So I did not saw my debug message, but I
discover 0.10-nortek-alpha eciadsl-synch work with standard version modem,
the synch process is not the same because it never fail on timeout , so
synch is quicker because there is no time loose before retrying to synch
again.
Because it did not fall on timout as standard 0.10 version, I am not capable
to reproduce the problem but the same leak with semaphore creation should
exist if a timeout occur.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Driver Linux pour modem ECI ADSL USB: http://eciadsl.flashtux.org
Archives de cette liste de diffusion: http://liste.eci.free.fr
Pour se desinscrire: mailto:[EMAIL PROTECTED]   
        
        
        
        
        
        

Répondre à