Ticket #119 (closed bug: fixed)

Opened 13 years ago

Last modified 13 years ago

ffado-cache: [PATCH] Incomplete Deserializing and Serializing Sequence leads to Seqfault!

Reported by: slack Assigned to: ppalmers
Priority: critical Milestone: FFADO 2.0
Component: Version:
Keywords: Cc:
The device the bug applies to:

Description

Simply starting ffado-dbus-server multiple times:

First time (creating a new cache): The "global_id" numbers are created starting with 0.

Second time (reading the cache in and writing it out): The "global_id" numbers are now starting with 80.

Third time: The "global_id" numbers are now starting with 160.

Forth time: The "global_id" numbers are now starting with 240.

Fifth time.... "Segmentation fault"

Only manually removing the cache file resolves the problem.

Then the cycle begins again...

Attachments

libffado-2.0-svn1204_deserializing_fixes.diff (1.7 kB) - added by slack on 05/25/08 04:04:35.

Change History

05/25/08 04:03:55 changed by slack

Update:

I have tracked down the problem and the attached patch fixes all problems if using the cache!!!

It is only a quick and dirty fix but it does work for me :-)

Hope this helps...

05/25/08 04:04:35 changed by slack

  • attachment libffado-2.0-svn1204_deserializing_fixes.diff added.

05/25/08 04:10:59 changed by slack

It looks like the formatting in the preview shows only the first hunk of the diff.

Please use the link "Original Format" to download the complete fix.

05/26/08 13:16:14 changed by slack

  • summary changed from ffado-cache: Deserializing and Serializing Sequence leads to Seqfault! to ffado-cache: [PATCH] Incomplete Deserializing and Serializing Sequence leads to Seqfault!.

05/27/08 13:32:26 changed by ppalmers

(In [1228]) apply fix from #119 (addresses #119)

05/30/08 09:42:06 changed by slack

Thanks for applying, Peter.

I had some time to look a little bit further into this and I want to share my findings.

I realized that my fix does not solve the real problem.

It only removes all errors while deserializing the cache and therefore the bug is just not triggered.

There is the static variable inside src/libavc/general/avc_plug.cpp.

int Plug::m_globalIdCounter = 0;

It needs to be initialized not only at the beginning but also before every deserializing or discovering.

If I understand the code in src/devicemanager.cpp correctly, any error condition in

avDevice->loadFromCache()

causes the call of

avDevice->discover()

where the incorrect value of m_globalIdCounter is used.

In my case it just reached 80 when the first error occured....

Hope this helps

06/01/08 03:54:28 changed by ppalmers

  • status changed from new to assigned.
  • owner set to ppalmers.

r1238 should fix this issue.

06/01/08 03:54:37 changed by ppalmers

  • status changed from assigned to closed.
  • resolution set to fixed.