hi Chris

I was running off - as this was this was a bit of a cliffhanger disussion on 
#emc-devel,  let me elaborate this patch a bit

executive summary: rewritten patch at 
http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/errorchannel-overrun-fix-including-axis-speedup

---

loong version:

you wrote:

[16:50:39] <cradek> 16:52 < cradek> mhaberler: with your change, I think no 
message bigger than half the buffer size can ever be sent - what is the purpose 
of the *2 ? 
[16:50:42] <cradek> 16:55 < cradek> also there is a DEFAULT_EMCMOT_COMM_TIMEOUT 
- is that an appropriate value to use? If not maybe make another define?


sizes:

the messages sent from task to UI (EMC_OPERATOR_ERROR, EMC_OPERATOR_MESSAGE, 
EMC_OPERATOR_DISPLAY are about LINELEN + fluff size, around 270 bytes
the task/UI channel has an 8 k buffersize by default (emc.nml):
B emcError              SHMEM   localhost       8192    0       0       3       
16 1003 TCP=5005 xdr queue

overrun:

my first stab was to have the queue drain so at least one message fits 
(assuming it can hold at least one). Experimentally it turned out that - 
obviously due to some overhead in the structure - this aint enough, so I made 
it two, thus the 2* sizeof(current object), which is still < 10% of the 8k 
limit but a low water mark to start with, and that worked; sizeof(current 
object) didnt. Your scenario might happen only if one reduced this queue to 
below maybe 600 bytes. As always, users shall not be limited in the potential 
to shoot themselves in the foot.

I've looked into a way of draining more than that, however I did not find a 
field in the NML or CMS structures, or a method, which would return me the 
allocated queue size (8k).  Maybe I've overlooked it.

re time & DEFAULT_EMCMOT_COMM_TIMEOUT:
I've made that a '#define DEFAULT_EMC_UI_TIMEOUT 5.0' in emctaskmain.cc since 
emccfg.hh isnt included there

an obvious improvement: increase Axis error message drain rate as well. axis.py 
has:

   def error_task(self):
       error = e.poll()
       if error:
           kind, text = error
           if kind in (emc.NML_ERROR, emc.OPERATOR_ERROR):
               icon = "error"
           else:
               icon = "info"
           notifications.add(icon, text)
       self.error_after = self.win.after(200, self.error_task)

see the second commit in the branch and give it a try on roparams.ngc - I 
always thought Axis is a dog but I was wrong, it can be really snatchy ;-)

-m




------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to