I'm largely writing this update just to keep everyone informed in lieu of
submitting a fix, because I've made no real progress.  I now know a bunch
of things that *don't* fix it, but nothing that really does.

I have nailed down the symptoms better, but can't really make sense of
them.  Valgrind shows me that the problem always begins with a "Syscall
param write(buf) points to uninitialised byte(s)" inside
/lib/ld-2.11.2.so, inside snd_seq_drain_output, inside startClocks, inside
startClocksApproved (delayed for Jack).  Then comes a cascade of "Invalid
write of size 4", then we crash.

But we're not passing it that anything that can fail to be initialized! 
We pass the fatal call two things:
 * The same m_midiHandle we use for a driver's entire lifetime.
 * A NULL event.  Alsa docs say this is OK.

I looked at the other events - I test it on a file of 72 simultaneous
notes - and every note and controller we ever pass to Alsa really, really
looks to be initialized correctly.

The closest thing I have to a fix is what I tried about the race
condition.  That makes it a lot rarer, but it still happens.  I actually
wait for clocks after STARTING_TO_PLAY, not before, because the sequencer
wants to starts clocks after we give the driver its first mapped events.

I have a few more things to try:
 * Some types like MappedEvent::Audio are passed thru like events but do
nothing.  They might be uninitialized.  Now that I understand Alsa
better, I see that they don't belong.  I'll remove them and see what
happens.
 * I have a desperate hypothesis that the race condition might result in
half-written events.  I hope that's not it, because that's tough to fix.

Other than that, I can't see how to fix it.

        Tom Breton (Tehom)



------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to