Greetings again,

There seems to be an issue with the RT queue status file formatting and perhaps the way in which the [WAITERS] list is managed, and/or maybe the way the output
string termination is done.

I can't be sure and thought I should simply submit the test program/scripts and
document the results.  I am attaching them as a compressed tar file, I hope
that is acceptable form for the forum.

I noticed that the 32768 length in this area of the code:

./xenomai-3/lib/copperplate/registry.c-317-             case O_RDWR:
./xenomai-3/lib/copperplate/registry.c-318- sbuf->st_mode |= 0666;
./xenomai-3/lib/copperplate/registry.c-319- break;
./xenomai-3/lib/copperplate/registry.c-320-             }
./xenomai-3/lib/copperplate/registry.c-321- sbuf->st_nlink = 1;
./xenomai-3/lib/copperplate/registry.c:322: sbuf->st_size = 32768; /* XXX: this should be dynamic. */
./xenomai-3/lib/copperplate/registry.c-323- sbuf->st_atim = fsobj->mtime;
./xenomai-3/lib/copperplate/registry.c-324- sbuf->st_ctim = fsobj->ctime;
./xenomai-3/lib/copperplate/registry.c-325- sbuf->st_mtim = fsobj->mtime;

sometimes is altered, before the FUSE read request is satisfied, and
sometimes not.  I didn't try to trace it too far.

The script "qtest.sh" runs a program called "qx" (Queue eXerciser) to create a queue, and post a read on the queue. Two copies are launched in the background then the first is killed. The queue status file is displayed in the process.

Note what happens to the queue status output as you run "sh qtest.sh"
repeatedly.  On my system, I see something like what is shown below.

The included "killtask.sh" can be used to get rid of all of the lingering tasks
after the testing is over.

I use a lingering sysregd launched in sr.sh before starting
the testing, looks like this:

sysregd --daemon --root /var/run/xenomai/root/sess --linger

Thanks in advance,
Steve


------------------------------------------------------------------------
# sh qtest.sh
+ t1=15342
+ sleep 1
+ qx q foo r
15342:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
+ t2=15348
+ kill 15342
+ qx q foo r
+ sleep 1
15348:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
qtest.sh: line 10: 15342 Terminated              qx q foo r
+ qstat foo
cat /run/xenomai/root/sess/15348/alchemy/queues/foo
-------------------
[TYPE]  [TOTALMEM]  [USEDMEM]  [QLIMIT]  [MCOUNT]
 FIFO        8704          0         0         0
--
[WAITER]
task@1[15348]

-------------------
# sh qtest.sh
+ t1=15359
+ sleep 1
+ qx q foo r
15359:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
+ t2=15364
+ kill 15359
+ sleep 1
+ qx q foo r
15364:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
qtest.sh: line 10: 15359 Terminated              qx q foo r
+ qstat foo
cat /run/xenomai/root/sess/15348/alchemy/queues/foo
-------------------
[TYPE]  [TOTALMEM]  [USEDMEM]  [QLIMIT]  [MCOUNT]
 FIFO        8704          0         0         0
--
[WAITER]
task@1[15348]
task@1[15359]
task@1[15364]
 FIFO        8704          0         0         0
--
[W-------------------
# sh qtest.sh
+ t1=15377
+ sleep 1
+ qx q foo r
15377:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
+ t2=15382
+ kill 15377
+ sleep 1
+ qx q foo r
15382:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
qtest.sh: line 10: 15377 Terminated              qx q foo r
+ qstat foo
cat /run/xenomai/root/sess/15348/alchemy/queues/foo
-------------------
[TYPE]  [TOTALMEM]  [USEDMEM]  [QLIMIT]  [MCOUNT]
 FIFO        8704          0         0         0
--
[WAITER]
task@1[15348]
task@1[15359]
task@1[15364]
task@1[15377]
task@1[15382]
         0         0
--
[WAITER]
task@1[15348]
task@1[15359]
task@1[15364]
 FIFO        87-------------------
# sh qtest.sh
+ t1=15393
+ sleep 1
+ qx q foo r
15393:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
+ t2=15398
+ kill 15393
+ sleep 1
+ qx q foo r
15398:rt_queue_read(&q,buf,512,TM_INFINITE)...[unfinished]
qtest.sh: line 10: 15393 Terminated              qx q foo r
+ qstat foo
cat /run/xenomai/root/sess/15348/alchemy/queues/foo
-------------------
[TYPE]  [TOTALMEM]  [USEDMEM]  [QLIMIT]  [MCOUNT]
 FIFO        8704          0         0         0
--
[WAITER]
task@1[15348]
task@1[15359]
task@1[15364]
task@1[15377]
task@1[15382]
task@1[15393]
task@1[15398]
TER]
task@1[15348]
task@1[15359]
task@1[15364]
task@1[15377]
task@1[15382]
         0         0
--
[WAITER]
task@1[15348]
task-------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: queue-status.tar.gz
Type: application/x-gzip
Size: 84280 bytes
Desc: not available
URL: 
<http://xenomai.org/pipermail/xenomai/attachments/20180416/26d4f6df/attachment.bin>
_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to