[nas] (resend) hard hang in libaoss.so

Erik Auerswald auerswal at unix-ag.uni-kl.de
Thu Jul 4 04:57:57 MDT 2013


Hi,

On Wed, Jul 03, 2013 at 04:09:30PM -0400, Paul Fox wrote:
> i believe the problem is that if we take an alarm signal while still
> in the middle of disableProcessFlow(), we'll call disableProcessFlow()
> again.  so rather than clearing the processFlowEnabled flag when we're
> finished disabling, we should probably clear it beforehand, as in this
> patch.

The idea sounds right, and on Linux (or rather not on SCO) it should reduce
the race window significantly.

Does the following patch work as well?

---8<---
Index: server/dda/voxware/auvoxware.c
===================================================================
--- server/dda/voxware/auvoxware.c	(revision 285)
+++ server/dda/voxware/auvoxware.c	(working copy)
@@ -1326,6 +1326,8 @@
 {
 #ifndef sco
     int rate;
+
+    processFlowEnabled = AuFalse;
 #endif /* sco */
 
     if (NasConfig.DoDebug) {
@@ -1358,7 +1360,9 @@
         oneMoreTick();
 #endif
 
+#ifdef sco
         processFlowEnabled = AuFalse;
+#endif
 
         if (relinquish_device)
             closeDevice();
---8<---

This should keep the code on SCO unaltered.

> (i'm not _absolutely_ sure this is a good fix, since i'm debugging
> this remotely, on a system at home with no speakers connected, which
> isn't the most complete way to debug nasd.  but gdb says it's doing
> the right thing.  :-)

I have only read the code, not even compile tested the patch, so please
test. :-)

Thanks,
Erik

P.S. I don't really care about SCO compatibility, but I don't want to break
     code which might currently work.
     Removing all the #ifdef sco sections to improve maintainability needs
     to be seperate from this bug fix.
-- 
Backwards compatibility is more than "technically it still works". It's
something almost sacred.
                        -- Linus Torvalds


More information about the nas mailing list