Created attachment 1216166 [details] small c code to show the problem Description of problem: The cosine computed for a specific value is completely wrong, actually the system libraries return the sine! Version-Release number of selected component (if applicable): Fedora 24 fully up to date How reproducible: Always on whichever Fedora 24 system using gcc, gfortran or g77 Steps to Reproduce: 1.take the short c code (bugcos.c) in attachment... 2... compile and link with gcc -o bugcos -lbsd -lm bugcos.c 3... run bugcos observe the results on the screen Actual results: 0.9941004006194649 Expected results: -0.1084637888339666, 0.9941004006194649 is the sine of that angle not the cosine Additional info: I could not stress more how serious is this bug. Indeed we found it because it was crashing some complex simulations for LHC here at CERN, however I am afraid that other argument values and not only this one (which is already a big problem if you meet it) could run into similar issues. Please note that fedora 23 is immune, and that moving slightly outside from that argument value makes the cosine suddenly become ok (as you can check printing all 2000 values computed in the attached c code). The problem can be reproduced with g77 (actually we found it initially with g77), gfortran and gcc, ergo it is a system library problem. Again, the consequences of such macroscopic bug are hard to imagine, we were lucky our calculations were full of checks and crashed detecting the anomaly.
I can reproduce this on F24. I can _not_ reproduce this on F25. So something was changed, either compiler, binutils, glibc, combination. Are you able to upgrade to F25? Are you able to help us narrow down exactly when this changed for you? It would help us narrow down the area we have to look at for changes. Otherwise I'll have to start a bisect pass between 2.23 and 2.24
I fixed this upstream a couple of months ago, which is how f25 got it: https://sourceware.org/bugzilla/show_bug.cgi?id=20357
Hi I see that the issue has been fixed upstream already. Would it be possible to backport the patch to Fedora 24 or upgrade the F24 glibc ? To move all out machines to F25 which is still in beta test is not an attractive option, rather are there aby expected drawbacks if we just install the Fedora 25 glibc on Fedora 24 (which anyway will solve the issue for us only)? Thanks
(In reply to Siddhesh Poyarekar from comment #2) > I fixed this upstream a couple of months ago, which is how f25 got it: > > https://sourceware.org/bugzilla/show_bug.cgi?id=20357 Thanks, I'll backport this to the 2.23 stable branch upstream and Fedora 24.
glibc-2.23.1-11.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-055349b681
glibc-2.23.1-11.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-055349b681
glibc-2.23.1-11.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.