Bug 19895 - Stage2 failing in packages installation [* filesystem not installed] (MDK::Common::Various::internal_error() called from mygtk3.pm:109)
Summary: Stage2 failing in packages installation [* filesystem not installed] (MDK::Co...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: release_blocker normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: 6sta2
Depends on:
Blocks: 19930
  Show dependency treegraph
 
Reported: 2016-12-05 15:46 CET by Anne Nicolas
Modified: 2016-12-13 07:41 CET (History)
3 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
Failed i586 install (423.58 KB, application/x-xz)
2016-12-05 15:58 CET, Charles Edwards
Details
12/6 report.bug (125.81 KB, application/x-xz)
2016-12-07 00:09 CET, Charles Edwards
Details
more int64 init (1.49 KB, patch)
2016-12-10 09:47 CET, Thierry Vignaud
Details | Diff
12_9-report.bug (150.63 KB, application/x-xz)
2016-12-10 16:09 CET, Charles Edwards
Details
report.bug from 12-11 failed install (151.68 KB, application/x-xz)
2016-12-11 18:27 CET, Charles Edwards
Details
make sure ratio is an int64 (mga#19895) as this is the variable that cause issues (1.03 KB, patch)
2016-12-11 18:40 CET, Thierry Vignaud
Details | Diff

Description Anne Nicolas 2016-12-05 15:46:06 CET
Working on Mageia 6. It seems we have a problem on packages step. It just freezes after a short time.

Added a copy of what is happening in console.

I thought it was about missing grub2-editenv executable but it seems not as it's included in stage2.
Comment 1 Charles Edwards 2016-12-05 15:54:53 CET
I saw the same when trying the i586 install.
Attaching report.bug

CC: (none) => cae

Comment 2 Charles Edwards 2016-12-05 15:58:25 CET
Created attachment 8727 [details]
Failed i586 install

report.bug for failed i586 install.
Comment 3 Dick Gevers 2016-12-06 17:00:50 CET
Only for i586

Keywords: (none) => 6sta2
Hardware: All => i586

Comment 4 Marja Van Waes 2016-12-06 23:08:22 CET
(In reply to Anne Nicolas from comment #0)

> 
> Added a copy of what is happening in console.
> 

Where? :-)

(In reply to Charles Edwards from comment #2)
> Created attachment 8727 [details]
> 
> report.bug for failed i586 install.

Thanks, but that's with a very old stage2:

* second stage install running (DrakX v17.52)

We have version 17.62 now

I suppose you don't have access to the QA isos?

(In reply to Dick Gevers from comment #3)
> Only for i586

Can you supply a current report.bug.xz?

Assignee: bugsquad => mageiatools
Priority: Normal => release_blocker
Keywords: (none) => NEEDINFO
CC: (none) => marja11

Comment 5 Charles Edwards 2016-12-06 23:49:33 CET
Then the ISO was done using an old stage2.
I was using:

PATH: Mageia-6-sta2-i586-DVD
ISO:  Mageia-6-sta2-i586-DVD.iso
DATE: Mon Dec  5 01:07:06 CET 2016
MD5:  OK     SHA1: OK     SHA512: OK


The only 'old' i586 Mga6 iso that were done were RC1 and they actually
worked and produced a good install.
Comment 6 Charles Edwards 2016-12-07 00:05:43 CET
In case I sent the wrong report I am attaching another from an attempted install I just ran.
Comment 7 Charles Edwards 2016-12-07 00:09:07 CET
Created attachment 8733 [details]
12/6 report.bug

report.bug from 12/6 i586 install attempt.
Comment 8 Marja Van Waes 2016-12-07 11:17:50 CET
Comment on attachment 8727 [details]
Failed i586 install

(In reply to Charles Edwards from comment #7)
> Created attachment 8733 [details]
> 12/6 report.bug
> 
> report.bug from 12/6 i586 install attempt.

Thanks, that one's better :-)

* second stage install running (DrakX v17.62)

There's an avalanche of:

* step "installPackages" failed with error: output in file /mnt/etc/fstab failed: No such file or directory
* error: output in file /mnt/etc/fstab failed: No such file or directory

But I guess that's expected when the filesystem was _not_ installed:

* filesystem not installed, (no error)
* step "installPackages" took: 0:00:03
* step "installPackages" failed with error: INTERNAL ERROR:
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/mygtk3.pm:109
mygtk3::gtkval_modify() called from /usr/lib/libDrakX/install/steps_gtk.pm:662
install::steps_gtk::__ANON__() called from /usr/lib/perl5/vendor_perl/5.22.2/urpm/install.pm:368
urpm::install::install() called from /usr/lib/perl5/vendor_perl/5.22.2/urpm/main_loop.pm:269
::urpm::main_loop::_run_transaction() called from /usr/lib/perl5/vendor_perl/5.22.2/urpm/main_loop.pm:550
::urpm::main_loop::run() called from /usr/lib/libDrakX/install/pkgs.pm:944
install::pkgs::_install_raw() called from /usr/lib/libDrakX/install/pkgs.pm:811
install::pkgs::install() called from /usr/lib/libDrakX/install/steps.pm:443
install::steps::installPackages() called from /usr/lib/libDrakX/install/steps_gtk.pm:671
install::steps_gtk::__ANON__() called from /usr/lib/perl5/vendor_perl/5.22.2/MDK/Common/Func.pm:314
MDK::Common::Func::catch_cdie() called from /usr/lib/libDrakX/install/steps_gtk.pm:676
install::steps_gtk::installPackages() called from /usr/lib/libDrakX/install/install2.pm:112
install::install2::installStepsCall() called from /usr/lib/libDrakX/install/install2.pm:257
install::install2::installPackages() called from /usr/lib/libDrakX/install/install2.pm:793
(eval)() called from /usr/lib/libDrakX/install/install2.pm:792
install::install2::real_main() called from /usr/lib/libDrakX/install/install2.pm:777
install::install2::main() called from /usr/bin/runinstall2:30


I don't remember having seen this (repeated) error in the Xorg log before.. is that related to the not installed filesystem, too?:

 (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)

Attachment 8727 is obsolete: 0 => 1

Marja Van Waes 2016-12-07 11:18:45 CET

Summary: Stage2 failing in packages installation => Stage2 failing in packages installation [* filesystem not installed, (no error)]

Comment 9 Marja Van Waes 2016-12-07 23:43:25 CET
Btw, I've seen a "filesystem not installed" message in several logs of installs that did _not_ fail at the installPackages step. In those cases, it was followed by a message on the same line about a number of missing indexes that were being generated, e.g. ", Generating 18 missing index(es), please wait...".


That made me think that that is expected behaviour, and that "(no error)" shows there's an error :-)
Comment 10 Pascal Terjan 2016-12-08 00:01:45 CET
The source of the crash is:
            my $total_time = $ratio ? $dtime / $ratio : time();
            gtkval_modify(\$progress_total, $ratio);

gtkval_modify triggers an internal_error but I don't understand the code:

    my ($ref, $val, @to_skip) = @_;
    my $prev = '' . $ref;
    $$ref = $val;
    if ($prev ne '' . $ref) {
        internal_error();
    }

CC: (none) => pterjan

Comment 11 Pascal Terjan 2016-12-08 00:06:36 CET
Hmm wondering if there could be some more problem with 64 bit size on i586 which would do something strange to the ratio
Comment 12 Pascal Terjan 2016-12-08 00:23:14 CET
            my $ratio =
              $total_size == 0 ? 0 :
                install::pkgs::size2time($current_total_size + $amount, $total_size) / install::pkgs::size2time($total_size, $total_size);
            $ratio >= 1 and $ratio = 1;

The code is protected against $ratio being more than 1, but not against it being less than 0, for example if $current_total_size + $amount ended up negative due to some signed value overflowing.
Comment 13 Pascal Terjan 2016-12-08 00:26:39 CET
I guess we need an equivalent of http://gitweb.mageia.org/software/rpm/perl-URPM/commit/?id=8aceb9b6a318668d0795af52bf9ea9dbb33351d9 for $current_total_size
Pascal Terjan 2016-12-08 00:28:03 CET

Assignee: mageiatools => thierry.vignaud

Pascal Terjan 2016-12-08 00:28:37 CET

Keywords: NEEDINFO => (none)

Comment 14 Mageia Robot 2016-12-08 00:55:00 CET
commit ef6c9a6c0134c051c46d711e3f314e97ac12fba4
Author: Pascal Terjan <pterjan@...>
Date:   Wed Dec 7 23:54:48 2016 +0000

    Force use of int64 for installed package size on i586 (mga#19895)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=ef6c9a6c0134c051c46d711e3f314e97ac12fba4
Comment 15 Pascal Terjan 2016-12-08 00:55:27 CET
I didn't check if there are other places where we add the size
Comment 16 Pascal Terjan 2016-12-08 00:58:33 CET
There seems to be selectPackagesAlreadyInstalled in pkgs.pm and installPackages in steps_interactive.pm
Comment 17 Charles Edwards 2016-12-09 15:56:32 CET
The issue is still present with drakx-installer-stage2-17.63.

Can upload latest report.bug if desired, but errors shown are the same as in previous attachment.
Comment 18 Thierry Vignaud 2016-12-10 09:26:19 CET
Please attach it
Comment 19 Thierry Vignaud 2016-12-10 09:47:48 CET
Created attachment 8748 [details]
more int64 init

but I'm not sure it'll help
Comment 20 Charles Edwards 2016-12-10 16:08:21 CET
Adding report.bug for failed 12-9 boot.iso install using 
drakx-installer-stage2-17.63
Comment 21 Charles Edwards 2016-12-10 16:09:58 CET
Created attachment 8749 [details]
12_9-report.bug
Comment 22 Mageia Robot 2016-12-11 12:14:43 CET
commit 08d23a39f5ff5bdfe736190b1088dc534e5b1bb9
Author: Anne Nicolas <ennael@...>
Date:   Sun Dec 11 12:13:05 2016 +0100

    more int64 init (Thierry Viganud) (mga#19895)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=08d23a39f5ff5bdfe736190b1088dc534e5b1bb9
Comment 23 Charles Edwards 2016-12-11 18:25:58 CET
There must still be additional int64 that need to be changed.
Install using stage2-17.64 still fails in same manner on i586.

Attaching report.bug for failed 12-11 install.
Comment 24 Charles Edwards 2016-12-11 18:27:07 CET
Created attachment 8750 [details]
report.bug from 12-11 failed install
Comment 25 Thierry Vignaud 2016-12-11 18:35:32 CET
(In reply to Mageia Robot from comment #22)
> commit 08d23a39f5ff5bdfe736190b1088dc534e5b1bb9
> Author: Anne Nicolas <ennael@...>
> Date:   Sun Dec 11 12:13:05 2016 +0100
> 
>     more int64 init (Thierry Viganud) (mga#19895)
> ---
>  Commit Link:
>   
> http://gitweb.mageia.org/software/drakx/commit/
> ?id=08d23a39f5ff5bdfe736190b1088dc534e5b1bb9

That was intended for people to test else I would have commit it myself...
Thierry Vignaud 2016-12-11 18:36:41 CET

Summary: Stage2 failing in packages installation [* filesystem not installed, (no error)] => Stage2 failing in packages installation [* filesystem not installed] (MDK::Common::Various::internal_error() called from mygtk3.pm:109)

Comment 26 Thierry Vignaud 2016-12-11 18:40:59 CET
Created attachment 8751 [details]
make sure ratio is an int64 (mga#19895) as this is the variable that cause issues

Please don't blindly commit this this time.
This is intended for local testing
Comment 27 Anne Nicolas 2016-12-11 19:09:15 CET
I'm sorry I cannot read in your mind. Btw I have a very limited connection at the moment so it's a way to get proper resources at the moment
Comment 28 Thierry Vignaud 2016-12-12 14:42:19 CET
I think I got a proper fix for that one
Comment 29 Mageia Robot 2016-12-12 15:39:41 CET
commit ea1908ab2c9e4b9eedf1dfbfb0449bc049ecdcb8
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Sun Dec 11 18:39:05 2016 +0100

    make sure ratio is an int64 (mga#19895)
    
    as this is the variable that cause issues
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=ea1908ab2c9e4b9eedf1dfbfb0449bc049ecdcb8
Comment 30 Mageia Robot 2016-12-12 15:39:45 CET
commit 0e7e62b0248fc6ed4c3363fe76ba29f6a9274c10
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Dec 12 15:25:10 2016 +0100

    guard against ref to ref (eg: int64(0) vs 0)
    
    b/c ref(0) triggers "||=0" which would make the next commit to fail
    badly (mga#19895)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=0e7e62b0248fc6ed4c3363fe76ba29f6a9274c10
Comment 31 Mageia Robot 2016-12-12 15:39:49 CET
commit 2ad464a9746bf4274bf52b495c272cef50cce308
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Dec 12 15:27:42 2016 +0100

    make sure progress_total is int64 (mga#19895)
    
    Else gtkval_modify() would complain the ref changes from eg
    'SCALAR(0xbd2aa38)' to 'REF(0xbd2aa38)'
    Thus enables i586 install to go on
    
    Though "Time remaining" looks bogus...
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=2ad464a9746bf4274bf52b495c272cef50cce308
Comment 32 Thierry Vignaud 2016-12-12 15:46:21 CET
Fixed though remaining time might look bogus

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

Comment 33 Charles Edwards 2016-12-12 17:46:39 CET
Confirming resolution.

i586 install will now work on Athlon XP 32-bit cpu.

Throughout install time remaining stays at 15:29 and progress bar shows nothing.
Thierry Vignaud 2016-12-13 07:41:57 CET

Blocks: (none) => 19930


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