Bug 27983 - phoronix-test-suite fails to download tests and for some to compile them
Summary: phoronix-test-suite fails to download tests and for some to compile them
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: David GEIGER
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-29 20:52 CET by Aurelian R
Modified: 2021-04-08 07:25 CEST (History)
0 users

See Also:
Source RPM: phoronix-test-suite-10.0.1-1.mga8.noarch
CVE:
Status comment:


Attachments
Patch for pts that works for 10.0.1 version and also 10.2.0(latest released) (696 bytes, patch)
2021-01-07 12:13 CET, Aurelian R
Details | Diff
spec file for pts-10.2.0( can be downgraded to current cauldron version) (13.89 KB, text/plain)
2021-01-07 12:16 CET, Aurelian R
Details

Description Aurelian R 2020-12-29 20:52:08 CET
Description of problem:
phoronix-test-suite fails to download new tests and for some to compile them. It used to work fine few weeks or couple of months back.  

Steps to Reproduce:
1. Install phoronix-test-suite (if it was already installed and used then just move or delete $(HOME)/.phoronix-test-suite )
2. run "$ phoronix-test-suite" to initialize and add any optional modules to it if you like
2. Run a benchmark test like y-cruncher or n-queens. Erros are spawn when downloading the files:

$ phoronix-test-suite benchmark y-cruncher


Phoronix Test Suite v10.0.1

    To Install:    pts/y-cruncher-1.1.0

    Determining File Requirements .........................................................................................................................................................................................................
    Searching Download Caches .............................................................................................................................................................................................................

    1 Test To Install
        1 File To Download [26.39MB]
        150MB Of Disk Space Is Needed
        4 Seconds Estimated Install Time

    pts/y-cruncher-1.1.0:
        Test Installation 1 of 1
        1 File Needed [26.39 MB]
        Downloading: y-cruncher-v0.7.8.9503-static.tar.xz                                                                                                                                                                         [26.39MB]
PHP Fatal error:  Uncaught TypeError: Unsupported operand types: int / CurlHandle in /usr/share/phoronix-test-suite/pts-core/objects/pts_network.php:303
Stack trace:
#0 [internal function]: pts_network::curl_status_callback()
#1 /usr/share/phoronix-test-suite/pts-core/objects/pts_network.php(187): curl_exec()
#2 /usr/share/phoronix-test-suite/pts-core/objects/pts_network.php(113): pts_network::curl_download()
#3 /usr/share/phoronix-test-suite/pts-core/objects/client/pts_test_installer.php(413): pts_network::download_file()
#4 /usr/share/phoronix-test-suite/pts-core/objects/client/pts_test_installer.php(794): pts_test_installer::download_test_files()
#5 /usr/share/phoronix-test-suite/pts-core/objects/client/pts_test_installer.php(150): pts_test_installer::install_test_process()
#6 /usr/share/phoronix-test-suite/pts-core/objects/client/pts_test_installer.php(76): pts_test_installer::start_install()
#7 /usr/share/phoronix-test-suite/pts-core/commands/benchmark.php(40): pts_test_installer::standard_install()
#8 /usr/share/phoronix-test-suite/pts-core/objects/client/pts_client.php(1562): benchmark::run()
#9 /usr/share/phoronix-test-suite/pts-core/phoronix-test-suite.php(155): pts_client::execute_command()
#10 {main}
  thrown in /usr/share/phoronix-test-suite/pts-core/objects/pts_network.php on line 303

3. Manually downloading (http://www.numberworld.org/y-cruncher/versions.html) y-cruncher%20v0.7.8.9503-static.tar.xz to $(HOME)/.phoronix-test-suite/download-cache allows the test to be installed and to complete the benchmark. However, this is not working for the n-queens test( and maybe other basic tests), as it fails to compile it, but this is another issue.

The download errors may be related to the new version of php or curl as they look like the only ones involved. Even the latest git version of phoronix-test-suite(which had some php8 fixes) has identical errors.  

4. Always
Comment 1 Aurelien Oudelet 2020-12-30 18:16:29 CET
Hi, thanks for reporting this.
Assigned to the package maintainer.

(Please set the status to 'assigned' if you are working on it)

Assignee: bugsquad => geiger.david68210

Comment 2 Aurelian R 2021-01-06 20:19:35 CET
Curl error can be dirty fixed by changing line 303 in source file 
phoronix-test-suite/pts-core/objects/pts-network.php from

"  $downloaded_float = $download_size == 0 ? 0 : $downloaded / $download_size; " 

to something like 

"  $downloaded_float = $download_size; "

This fix does affect some cosmetics of phoronix-test-suite, but the program completes the downloads fine and allows the test to be installed and run just fine. It seems that the latest version of curl mainly works in pts only sometimes fails.  

Regarding n-queens benchmark error mentioned in comment0, it turns out that the installation of n-queens required static libs to be available on my Mga8 system, which of course they weren't at that time. 

Regards.
Comment 3 Aurelian R 2021-01-07 12:13:38 CET
Created attachment 12191 [details]
Patch for pts that works for 10.0.1 version and also 10.2.0(latest released)
Comment 4 Aurelian R 2021-01-07 12:16:49 CET
Created attachment 12192 [details]
spec file for pts-10.2.0( can be downgraded to current cauldron version)
Comment 5 David GEIGER 2021-01-25 07:55:51 CET
Fixed with phoronix-test-suite-10.0.1-2.mga8!
Comment 6 Aurelian R 2021-01-25 11:13:02 CET
 This will do just fine for now, better have the core software working than not at all :).
Regards.

Status: NEW => RESOLVED
Resolution: (none) => WORKSFORME

Comment 7 Aurelian R 2021-02-02 14:40:42 CET
 There is a new version that solves the main curl/php issues for Mageia 8.  

 https://github.com/phoronix-test-suite/phoronix-test-suite/releases/tag/v10.2.1

 Building and testing this last version went smoothly for my system(no need for patching).

Regards.

Resolution: WORKSFORME => (none)
Status: RESOLVED => REOPENED

Comment 8 David GEIGER 2021-02-02 18:04:10 CET
Ok thanks for this info!

So freeze push asked for this new release.
Comment 9 Aurelian R 2021-02-04 11:19:30 CET
  While most issues are solved it seems that the gui interface is broken. However, the gui interface is not maintained anymore in pts( this is stated in the message printed while starting "phoronix-test-suite gui" from a terminal). I suspect the gui interface is affected by changes in php, because with the same package version it works fine in Mga7 with php7 while in Mga8 it hangs in connecting to websocket server. I don't think this is a bug as it is an unsupported feature of the software which is clearly stated by it.
 
  This comment is here just to point out this unsupported feature, nothing more. Unless, of course, someone is brave to fix it for MGA8 :).

  I think this bug should be closed as the package is working fine from my point of view.
Comment 10 David GEIGER 2021-04-08 07:25:07 CEST
Closing of this bug  as fixed!

Resolution: (none) => FIXED
Status: REOPENED => RESOLVED


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