Bug 491636 - CAPS plugins incorrectly produce silence (-ffast-math, -ffinite-math-only)
CAPS plugins incorrectly produce silence (-ffast-math, -ffinite-math-only)
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: ladspa-caps-plugins (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-23 08:56 EDT by Daniel Thompson
Modified: 2016-01-22 12:07 EST (History)
2 users (show)

See Also:
Fixed In Version: 0.4.2-4.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-24 06:18:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Tweak build system to disable problematic optimization. (379 bytes, patch)
2009-03-23 08:56 EDT, Daniel Thompson
no flags Details | Diff

  None (edit)
Description Daniel Thompson 2009-03-23 08:56:11 EDT
Created attachment 336285 [details]
Tweak build system to disable problematic optimization.

Description of problem:

Many of the CAPS plugins incorrectly produce silence rather than anything derived from the input. Also plugins run *really* slowly.


Version-Release number of selected component:

ladspa-caps-plugins-0.4.2-2.fc9.i386

How reproducible:

Apply (for example) the AmpVTS plugin.


Steps to Reproduce:

1. Generate a test file (I used audacity to generate 30 second sine wave in .wav
   file).
2. applyplugin sine.wav sine-ampvts.wav /usr/lib/ladspa/caps.so AmpVTS \
   0 2.25 0.5 1 0.75 0.250075 0.750025

  
Actual results:

Peak output: 0
(should take less than 2 seconds on modern h/ware)


Expected results:

Peak output: 20861.3  [value will vary based on test signal, expect non-zero]
(takes >45 seconds)


Additional info:

Caused by the application of gcc's -ffinite-math-only option (via -ffast-math). At present I have no idea if this is a 
Also affects x86_64 systems (presumably for the same reason).
Comment 1 Daniel Thompson 2009-03-23 09:00:12 EDT
(In reply to comment #0)
> At present I have no idea if this is a 

Sorry, pressed commit by accident.

This sentence was going to observe that I've no idea if this is a problem in the compiler or a problem in the code exposed by using a 'better' compiler. Instinct and experience suggest probably the later ;-)
Comment 2 Daniel Thompson 2009-03-23 09:02:04 EDT
(In reply to comment #0)
> Actual results:
> 
> Peak output: 0
> (should take less than 2 seconds on modern h/ware)
> 
> 
> Expected results:
> 
> Peak output: 20861.3  [value will vary based on test signal, expect non-zero]
> (takes >45 seconds)

Rats. Not having a good day.

I've reversed these comments. If *does* take >45 seconds, it *should* take no more than 2.
Comment 3 Hans de Goede 2009-03-23 11:45:12 EDT
Thanks for reporting this, can you please try the version here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1254588

I simply completely removed -ffast-math from the flags used for compilation completely as it is not part of the standard build flags for Fedora, I  only put it in there in the first place as upstream uses it as its default, and usally
-ffast-math is safe to use when upstream does so.
Comment 4 Daniel Thompson 2009-03-23 16:51:45 EDT
(In reply to comment #3)
> Thanks for reporting this, can you please try the version here:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=1254588

Tested on x86_64 and things look much better. Will try i386 tomorrow.

> I simply completely removed -ffast-math from the flags used for compilation
> completely as it is not part of the standard build flags for Fedora, I  only
> put it in there in the first place as upstream uses it as its default, and
> usally
> -ffast-math is safe to use when upstream does so.  

Fair enough. I'll try to get in touch with the author regarding the problem though. For tools like CAPS performance does matter (though correctness more so) so it would nice to be able to get the flag back on if we understand what is going on (most CAPS plugins deliberately inject non-audible noise to keep the f.p. maths from taking slow paths: the author cares about this stuff).
Comment 5 Daniel Thompson 2009-03-24 05:45:15 EDT
Looks fine on i386 as well.
Comment 6 Hans de Goede 2009-03-24 06:13:57 EDT
Thanks for testing!

I've just done an official build with the same fix, this will show up in
rawhide when it unfreezes from the beta freeze (so when the beta is released).
Comment 7 Hans de Goede 2009-03-24 06:18:25 EDT
Thanks for testing!

I've just done an official build with the same fix, this will show up in
rawhide when it unfreezes from the beta freeze (so when the beta is released).
Comment 8 Daniel Thompson 2009-03-24 15:55:05 EDT
For the benefit of anyone using bugzilla search...

It looks like this problem first appeared in Fedora 9 and therefore affects affects both F9 and F10.
Comment 9 Hans de Goede 2009-03-24 16:08:27 EDT
(In reply to comment #8)
> For the benefit of anyone using bugzilla search...
> 
> It looks like this problem first appeared in Fedora 9 and therefore affects
> affects both F9 and F10.  

Ok, that is good to know, so ladspa-caps-plugin is busted in F-9 and F-10 too? If so I'll do an update there to fix this.
Comment 10 Daniel Thompson 2009-03-24 17:08:14 EDT
(In reply to comment #9)
> > It looks like this problem first appeared in Fedora 9 and therefore affects
> > affects both F9 and F10.  
> 
> Ok, that is good to know, so ladspa-caps-plugin is busted in F-9 and F-10 too?
> If so I'll do an update there to fix this.  

Indeed. Had I been having a good day with bugzilla I'd have marked the fact I was running F10 in the Version: field.

So it is certainly broken in F10 and the package has the same name in F9 and F10.

Strictly speaking I don't know if packages called ladspa-caps-plugins-0.4.2-2.fc9.i386 are built with same compiler in F9 and F10 (does the same name mean they are not rebuilt at all or only that the .spec file hasn't been changed?).
Comment 11 Hans de Goede 2009-03-25 05:57:00 EDT
(In reply to comment #10)
> Strictly speaking I don't know if packages called
> ladspa-caps-plugins-0.4.2-2.fc9.i386 are built with same compiler in F9 and F10
> (does the same name mean they are not rebuilt at all or only that the .spec
> file hasn't been changed?).  

It means they have not been rebuild at all, the .fc# extension is created
automatically at build time. So the contents of the F-9 and F-10 rpms are
identical. Note the rpms themself may not have to same md5sum due to being
re-signed with another key (rpms have their signature embedded).

So if you're seeing this on F-10, it will be there on F-9 as well. I will prepare updates for both F-9 and F-10.
Comment 12 Fedora Update System 2009-03-25 06:03:19 EDT
ladspa-caps-plugins-0.4.2-4.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/ladspa-caps-plugins-0.4.2-4.fc10
Comment 13 Fedora Update System 2009-03-25 06:04:22 EDT
ladspa-caps-plugins-0.4.2-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/ladspa-caps-plugins-0.4.2-4.fc9
Comment 14 Fedora Update System 2009-03-25 12:07:18 EDT
ladspa-caps-plugins-0.4.2-4.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2009-03-25 12:07:40 EDT
ladspa-caps-plugins-0.4.2-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.