[DAQ-drivers] driver/jvme branch, devel, updated. d2a0ee4641459ef818023714650becc02b249cd3
Bryan Moffit
moffit at jlab.org
Wed Mar 26 17:04:46 EDT 2014
This update includes a fix that should relieve everyone from having to manually remove the file
/dev/shm/vmeBus
when it is locked by and process and dies with a segmentation fault. In most cases, it would recover just fine. But in some small cases, the "robust"ness of the shared mutex was not preserved.
You can take advantage of this update by making a call to
int vmeCheckMutexHealth(int time_seconds);
where time_seconds is the maximum amount of time to wait for the lock to unlock. I think in most cases 10 seconds should be plenty, unless the lock is held by a process that is taking an unusual amount of time (firmware update, perhaps).
In CODA 3.01, we've placed this call
vmeCheckMutexHealth(10);
just before the call to
rocPrestart()
in
tiprimary_list.c
tsprimary_list.c
Please let me know if you run into a problem where you still need to manual remove
/dev/shm/vmeBus
Thanks!
----- Original Message -----
| From: "Bryan Moffit" <moffit at jlab.org>
| To: daq-drivers at jlab.org
| Sent: Wednesday, March 26, 2014 4:47:25 PM
| Subject: [DAQ-drivers] driver/jvme branch, devel, updated. d2a0ee4641459ef818023714650becc02b249cd3
|
| This is an automated email from the git hooks/post-receive script. It
| was
| generated because a ref change was pushed to the repository
| containing
| the project "driver/jvme".
|
| The branch, devel has been updated
| via d2a0ee4641459ef818023714650becc02b249cd3 (commit)
| via ee4b02d2876966f785eb0ac57dc87c1e3c91161e (commit)
| via 09d71952f682e1e4b57b2831d82ab7e7f2f56b18 (commit)
| via 07c9296604f1aee00625f21f5af3ac6a3b0bdd5b (commit)
| via 8ee3a8d44a8b933fb8541cae7bee9db68577aa09 (commit)
| via 1d13ada39d6adff3755120850981d0e191767b60 (commit)
| via 4cf14b68b307375e2fc14812cb7e7a15b7a7181e (commit)
| via 3341b1e849d759cb5988422e3b5a390a0d846fd1 (commit)
| from 3db6c2eed2f25542a0b50003e81ea615db87f692 (commit)
|
| Those revisions listed above that are new to this repository have
| not appeared on any other notification email; so we list those
| revisions in full, below.
|
| - Log
| -----------------------------------------------------------------
| commit d2a0ee4641459ef818023714650becc02b249cd3
| Merge: 3db6c2e ee4b02d
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Wed Mar 26 16:47:20 2014 -0400
|
| Merge branch 'release-coda3.1' into devel
|
| commit ee4b02d2876966f785eb0ac57dc87c1e3c91161e
| Merge: 3341b1e 09d7195
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Wed Mar 26 16:45:19 2014 -0400
|
| Merge branch 'fix-vmeBus_Mutex' into release-coda3.1
|
| commit 09d71952f682e1e4b57b2831d82ab7e7f2f56b18
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Wed Mar 26 16:39:30 2014 -0400
|
| jvme.{c,h}
| - vmeBusMutexInit: Add some stdout showing initialization
| - vmeBusLock, vmeBusTryLock: better handling of EOWNERDEAD
| and better stdout error messages
| - vmeBusLock, vmeBusTryLock, vmeBusUnlock return OK, ERROR
| or the error reported by the associated pthread_mutex_* call
| - New routine: vmeBusTimedLock(..). Does the same as
| pthread_mutex_timedlock. Takes seconds as an argument
| - Better mutex recovery in
| vmeCheckMutexHealth: Takes seconds for timedlock part.
| If process holding lock dies, will reinitialize the mutex.
| - Should also handle issues from when the "robust"ness of the
| mutex is fooled. However, assumes you aren't using the lock
| for more than the time prescribed in the argument
| (timedlock)
|
| commit 07c9296604f1aee00625f21f5af3ac6a3b0bdd5b
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Wed Mar 26 13:07:56 2014 -0400
|
| crashLock.c
| - Example of program that crashes after locking mutex, but
| does mutex does not retain it's "robust"ness.
|
| commit 8ee3a8d44a8b933fb8541cae7bee9db68577aa09
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Wed Mar 26 11:11:48 2014 -0400
|
| jvme.c
| - vmeBusMutexInit: Move mutex attribute destroy to
| vmeBusKillLockShm
| - vmeBusKillLockShm: add option to destroy mutex
|
| commit 1d13ada39d6adff3755120850981d0e191767b60
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Tue Mar 25 13:24:16 2014 -0400
|
| Add program that crashes when the vmeBus mutex is locked
|
| commit 4cf14b68b307375e2fc14812cb7e7a15b7a7181e
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Tue Mar 25 13:22:34 2014 -0400
|
| jvme.{c,h}
| - Add mutex attribute into the shared memory structure
| - Move the mutex initialization into it's own static routine,
| so that it may be repeated in the future
| - Clean up the messages printed to standard out
| - Add routine to check the health of the mutex
|
| commit 3341b1e849d759cb5988422e3b5a390a0d846fd1
| Author: Bryan Moffit <moffit at jlab.org>
| Date: Thu Mar 6 16:04:47 2014 -0500
|
| dmaPList.c
| - Add 2KB onto requested size of individual buffers to allow for
| 2KB
| flush size from DMA Completion from BERR/2eTERM
|
| jlabgefDMA.c
| - When calculating size of buffer remaining, account fo 2KB
| flush
| size from DMA Completion from BERR/2eTERM.
| - Add extra global variable to keep track of BERR status from
| the
| most recent DMA transfer. This variable is set within
| jlabgefDMASend(...)
|
| Signed-off-by: Bryan Moffit <moffit at jlab.org>
|
| -----------------------------------------------------------------------
|
| Summary of changes:
| dmaPList.c | 3 +
| jlabgefDMA.c | 11 +-
| jvme.c | 401
| ++++++++++++++++++++++++++++++++++++++++++++++--------
| jvme.h | 2 +
| test/crashLock.c | 40 ++++++
| test/testLock.c | 7 +-
| 6 files changed, 400 insertions(+), 64 deletions(-)
| create mode 100644 test/crashLock.c
|
|
| hooks/post-receive
| --
| driver/jvme
| _______________________________________________
| Daq-drivers mailing list
| Daq-drivers at jlab.org
| https://mailman.jlab.org/mailman/listinfo/daq-drivers
|
--
-------------------------------------------------------------------------------
Bryan Moffit
email: moffit at jlab.org
web page: https://userweb.jlab.org/~moffit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bryan Moffit.vcf
Type: text/directory
Size: 183 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/daq-drivers/attachments/20140326/6136fd25/attachment.bin
More information about the Daq-drivers
mailing list