afry-south / dragonfly-fcb

ÅF Dragonfly Quadrotor UAV Project
Other
7 stars 3 forks source link

Deadlock USB Com threads? #78

Closed stenbergd closed 9 years ago

stenbergd commented 9 years ago

It seems possible a deadlock can occur if several queue items (more than queue length) are inserted into the tx message queue too fast.

Get to the root of why this occurs and make adjustments. The deadlock occurs between rx/tx usb com threads.

Perhaps do not use max queue/semaphore/mutex pend times. A second should do well.

But it would be best if this could be avoided completely.

stenbergd commented 9 years ago

This could be an issue when we get too many commands and user types "help" in CLI

stenbergd commented 9 years ago

Reduced the queue/semaphore pend time to 1000 ms. And also increased the TX queue size. But still, we should try to redesign some to fix this issue in a more robust way.

stenbergd commented 9 years ago

It seems the buffer gets messed up after pend timeout. Review DeleteLastEnteredBytes etc.

stenbergd commented 9 years ago

Fixed satisfactorily.