Comments (6)
Imported from trac issue 15. Created by jphickey on 2014-12-30T22:23:15, last modified: 2019-03-05T14:58:28
from cfe.
Trac comment by glimes on 2016-11-08 14:17:08:
Current crop of cfe-next are all going into CFE 6.6
from cfe.
Trac comment by jphickey on 2017-10-16 13:47:18:
This is currently in progress and it depends on #74 being fixed first.
The issue described here is related to reading the reference time by other threads. The protection is inadequate and allows a ready to get a partially updated object. However, the "garbage in garbage out" rule applies, there are deeper issues related to updating the shared object in the first place. Once the writers are synchronized, then the issue of readers can be addressed.
from cfe.
Trac comment by jphickey on 2017-10-16 14:39:46:
CONFIRMED ISSUE
I have confirmed I am able to produce this issue in the real system by subscribing to the "1Hz" MID in an app, and calling CFE_TIME_GetUTC()
within that handler. Sometimes this comes back with bad UTC information.
Note in order to //identify// when the UTC information is bad, it required a bit of a hack to the update code to first "poison" the global MET value before writing the correct value in the global variable. If it gets returned from CFE_TIME_GetRefence()
, the poisoned MET value then creates an incorrect UTC conversion, which is in turn identifiable in the application.
This proves that applications can indeed read the MET during update, even though the updater thread runs at a higher priority than the reader thread.
from cfe.
Trac comment by jphickey on 2017-10-17 14:56:46:
Note - it was easier to include a patch for the CFE_TIME_GetReference()
in with the rest of the changes for #74, rather than keeping it a separate changeset.
The fix is to keep two version counters, instead of just one. The "pending" counter is incremented before any changes start, and the "complete" counter is incremented when all changes are complete. A reader task then samples them in the //opposite// order, where the "complete" version counter is read before any copying, and then it is checked against the "pending" counter after copying is complete. If these values are equal, then the copied data can be trusted. If they are not equal, then it must be retried.
This "version" paradigm was preserved (rather than using a lock) since it allows multiple reader tasks to execute concurrently, but a mutex lock would force all reader threads to be serialized, negatively affecting performance.
Testing with the #74 fix, no corrupt UTC samples were observed using the same "stress test" approach described in my previous comment. Therefore nothing more beyond the fix for this other ticket needs to be done.
from cfe.
Trac comment by jhageman on 2019-03-05 14:58:28:
Milestone renamed
from cfe.
Related Issues (20)
- Add encode/decode hooks for TBL services load/dump routines
- EVS_GenerateEventTelemetry has a race condition HOT 2
- TBL main task blocked for duration of CFE_TBL_DumpToFile call
- Possible PortMessage buffer truncation HOT 2
- Correct SendHk command naming mismatches
- TBL: consolidate repeated logic blocks
- Switch rtems workflows to generic-rtems
- Improper stack object access in the msg api functional test
- Introduce transaction object for CFE TBL
- Improve application developer guide documentation
- Use consistent time definition for TBL subsystem data structures
- Remove conditionally-compiled code in TBL
- Add "foreach" function for access descriptor looping
- Use proper resource identifers for table validation and dump state structs
- Static analysis issues JSC 2.1
- address sanitizer option detect segv in es_UT.c
- Update platform defined values to be more 'flight like'/work with BVT tests
- SB memory pool misleading reporting and ES API confusing HOT 1
- Improve CFE_SB_AllocateMessageBuffer error reporting HOT 1
- Send informational CMake message(s) to stdout instead of stderr
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cfe.