[Disclaimer: I'm just jumping on this thread without having read all
details.]

Maksym Veremeyenko wrote:
> ...
> I tried to summarize this info and build time sorted table of actions
> (task B - "bus_monitor_proc[0]", task V - "vdcp[0030]m"):
> 
> V    5397829215210    rt_mutex_unlock:ENTER
> V    5397828986260    serial_transact:EXIT
> V    5397810469917    serial_transact:ENTER

You are holding the mutex across the serial transaction, i.e. a
secondary mode switch, right? If you haven't set
CONFIG_XENO_OPT_RPIDISABLE, you might be are affected by the bug in the
priority coupling between Xenomai and the Linux kernel. Already tried
latest v2.3.x SVN?

> V    5397792191552    rt_mutex_lock:EXIT
> V    5397792126988    rt_mutex_lock:ENTER
> V    5397770396236    serial_transact:EXIT
> B    5397750468006    rt_mutex_unlock:ENTER
> B    5397732320388    rt_mutex_lock:EXIT
> B    5397732302828    rt_mutex_lock:ENTER
> V    5397718529990    serial_transact:ENTER
> V    5397718501300    serial_transact:EXIT
> V    5397701107940    serial_transact:ENTER
> V    5397682575612    rt_mutex_unlock:ENTER
> V    5397664304073    rt_mutex_lock:EXIT
> V    5397664238700    rt_mutex_lock:ENTER
> V    5397618710764    rt_mutex_unlock:ENTER
> V    5397600363677    rt_mutex_lock:EXIT
> V    5397600295612    rt_mutex_lock:ENTER
> 
> As i mentioned early task B was executed during serial operation in task
> V, and may be it could cause switching status of task V from 3146112
> (0x00300180) to 3146624 (0x00300380) - rised bit 0x00000200 (XNRELAX
> 0x00000200 Relaxed shadow thread (blocking bit) )
> 
> I am not specialist in Xenomai architecture, but it's not looks like
> stack corruption in my program.
> 
> I rather going to rewrite some code part to use rtserX instead of
> /dev/ttyXX

Given that you hold a lock across the serial transaction, switching to a
deterministic driver is certainly wiser. Still, understanding your
original problem would be good too so that we get aware of any potential
new bug in Xenomai and are able to fix it. So please try the SVN version
with your current code as well.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to