#4367 (ok 4.4.7) Import status infinite loop

4.1.13
fixed
Normal
2015-05-16
2014-04-16
No

Bug in script import_status.php at line 80

// wait until message is available
while ($_SESSION['Import_message']['message'] == null) {
usleep(250000); // 0.25 sec
}

This create a neverending loop, becouse session isn't accessible by another process. So the solution is close and reopen sessions like this:

// wait until message is available
$counter = 0;
while ($_SESSION['Import_message']['message'] == null) {
$a++;
session_write_close();
usleep(1000000); // 1.00 sec
session_start();
if($counter>20) {
$_SESSION['Import_message']['message'] = 'TIMEOUT';
Break;
}
}

Discussion

  • Lukáš Evan

    Lukáš Evan - 2014-04-16

    UPDATE FIX :

    // wait until message is available
    $counter = 0;
    while ($_SESSION['Import_message']['message'] == null) {
    $counter++;
    session_write_close();
    usleep(1000000); // 1.00 sec
    session_start();
    if($counter>20) {
    $_SESSION['Import_message']['message'] = 'TIMEOUT';
    Break;
    }
    }

     
  • Marc Delisle

    Marc Delisle - 2014-04-16

    Thanks. Which mechanism are you using for upload progress, and which PHP version?

     
    • Lukáš Evan

      Lukáš Evan - 2014-04-22

      Hi, sorry wasn`t noticed for your reply:

      PHP Version 5.3.28-pl0-gentoo

      i just downloaded phpmyadmin (latest version) unpack and use without any configuration set - login to db and click on import, select small file and start it.

       
  • Marc Delisle

    Marc Delisle - 2014-04-22

    According to http://docs.phpmyadmin.net/en/latest/faq.html?highlight=progress#seeing-an-upload-progress-bar, you must have certain extensions to be able to see the progress bar. Which one are you using?

     
    • Lukáš Evan

      Lukáš Evan - 2014-04-24

      ? Man iam not using any special, as i say

      just downloaded latest vesrion of phpmyadmin (none configuration set) and after login into db click on import

      this create a 3 processes on apache, and one of them is import_status.php which create a neverending loop to check session status and phpmyadmin is waiting to change session too from import_status

      so import is tooooooo long

      no one progress bar using, just clear latest version of phpmyadmin

       
      Last edit: Lukáš Evan 2014-04-24
    • Lukáš Evan

      Lukáš Evan - 2014-04-24

      Btw server phpinfo here -> http://dasims.savana-hosting.cz/phpinf/

      But this is bug if u use A or B i think :) U must close and reopen SESSION if ur cheking it in while cycle.

       
  • Hugues Peccatte

    Hugues Peccatte - 2014-04-27

    Hi,
    Do you have this issue with any imported files or just one please?
    Is there data and/or structure in the file?
    Could we have the file please?
    Thanks.

     
  • Marc Delisle

    Marc Delisle - 2014-04-27

    Hugues,
    when testing, I found out that import_status.php freezes. When this script calls session.inc.php which calls session_start(), it stalls. I believe that this is because the session file is already open and something was written to it by another script.

     
  • Marc Delisle

    Marc Delisle - 2014-04-29

    Lukáš,
    your server has the "upload progress" extension (version 1.0.3.1). Indeed there is a session problem.

    At least, with version 4.2.0-rc1, those who do not have this extension, nor the APC one, should no longer see a call to import_status.php.

     
  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • sopak

    sopak - 2015-05-13

    this bug is still in master version.

     
    Last edit: sopak 2015-05-13
  • Madhura Jayaratne

    • summary: Import status infinite loop --> (ok 4.4.7) Import status infinite loop
    • status: open --> resolved
     
  • Marc Delisle

    Marc Delisle - 2015-05-16
    • Status: resolved --> fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks