Bug 395040

Summary: crash after package selection
Product: [openSUSE] openSUSE 11.0 Reporter: Olaf Hering <ohering>
Component: libzyppAssignee: Michael Andres <ma>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: jreidinger, lars.vogdt, ma, peter
Version: RC 3   
Target Milestone: ---   
Hardware: PowerPC   
OS: Linux   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: bug395040.tar.bz2

Description Olaf Hering 2008-05-28 11:56:08 UTC
openSUSE-11.0-RC1-DVD-ppc-Build0130 on ibook g4

after leaving the package selection, yast crashes



loading file:/var/adm/mount/license.tar.gz -> /license.tar.gz
sha1 fb6c112ece3996c70a901da0b0042e772fa54ecf
sha1 ok
loading file:/var/adm/mount/part.info -> /part.info
error 37: Couldn't open file /var/adm/mount/part.info
loading file:/var/adm/mount/control.xml -> /control.xml
sha1 b6cadeb1218e09a51c277a8c1278750d05423fd1
sha1 ok
loading file:/var/adm/mount/driverupdate -> /download/file_0006
error 37: Couldn't open file /var/adm/mount/driverupdate
No new driver updates found.
starting setctsid `showconsole` inst_setup yast
starting hald... ok
starting syslogd (logging to /dev/tty4)... ok
starting klogd... ok
ATTENTION: Starting shell... (use 'exit' to proceed)
Welcome to the inst-sys on coconut 2.6.25.4-8-default ppc
inst-sys:/ # inst_setup_ssh -n root
sshd found, prepare remote login
using built-in ssh keys
setting root pwd to 'root'
Starting SSH daemon  ...
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0a:95:aa:0c:fa brd ff:ff:ff:ff:ff:ff
    inet 10.10.2.36/16 brd 10.10.255.255 scope global eth0
      ***  sshd has been started  ***
inst-sys:/ # exit
starting yast...
Probing connected terminal...
Initializing virtual console...
Found a Linux console terminal on /dev/console (128 columns x 48 lines).
*** Starting YaST2 ***
error: cannot open Packages index using db3 - No such file or directory (2)
terminate called after throwing an instance of 'zypp::Exception'
  what():  Cannot open file /etc/zypp/locks
YaST got signal 6 at YCP file /mounts/mp_0001/usr/share/YaST2/clients/inst_packages.ycp:49
/usr/lib/YaST2/startup/YaST2.call: line 480:  2878 Aborted                 (core dumped) $OPT_FBITERM y2base "$Y2_MODULE_NAME" $
Y2_MODE_FLAGS $Y2_MODULE_ARGS $Y2_MODE $Y2_UI_ARGS
ATTENTION: Starting shell... (use 'exit' to proceed)
Welcome to the inst-sys on coconut 2.6.25.4-8-default ppc
inst-sys:/ #
Comment 1 Olaf Hering 2008-05-28 11:58:09 UTC
Created attachment 218579 [details]
bug395040.tar.bz2
Comment 2 Olaf Hering 2008-05-28 12:14:32 UTC
this crash does not happen if I do not go into the software selection screen
Comment 3 Olaf Hering 2008-05-29 11:10:39 UTC
I can reproduce it with rc1.
Comment 4 Olaf Hering 2008-05-29 11:24:44 UTC
go to software selection
go to details
search for 'firmware'
select adaptec firmware
disable 'Autocheck' checkbox
enable all firmwares with 'space key -> down -> space key -> down ...'
click on accept
Comment 5 Josef Reidinger 2008-05-29 12:47:04 UTC
Yes, it is missing catch block in locks around reading saved locks.
try touch /etc/zypp/locks this ca help
Comment 6 Michael Andres 2008-05-29 12:59:27 UTC
No. The call to zypp::Locks::instance.save is not appropriate. 

Locks are part of the pool status, and updated on commit. Even if we wanted to update them outside commit, this can not be done by calling zypp::Locks::instance.save. The Pool does not use zypp::Locks, nor does it update zypp::Locks to reflect changes.
Comment 7 Josef Reidinger 2008-05-29 13:04:31 UTC
(In reply to comment #6 from Michael Andres)
> No. The call to zypp::Locks::instance.save is not appropriate. 
> 
> Locks are part of the pool status, and updated on commit. Even if we wanted to
> update them outside commit, this can not be done by calling
> zypp::Locks::instance.save. The Pool does not use zypp::Locks, nor does it
> update zypp::Locks to reflect changes.
> 

Hmm, maybe it is another bug, but when you want manipulate with locks you must load it in Locks instance via load and then you can manipulate like adding, removing or cleaning and if you call load and locks file doesn't exist then it(PoolQuery serialize) throw exception which is not catched.
try simple rm /etc/zypp/locks; zypper al test and it fail
and because this is ebook, then package manager add lock for ppc64 which and manipulate with locks.
Comment 8 Michael Andres 2008-05-29 13:17:14 UTC
Right, if one calls zypp::Locks::instance.save, catching the exception is 
necessary. 

But actual the error is the call to zypp::Locks::instance.save. Esp. in the instsys, where /etc/zypp (if it would exist) was located in the ramdisk.

Locks are to be saved in the target system, this is why target::commit handles
this.

I'll revert the wrong 'fix' for bug #332853. This will fix the abort here.
Comment 9 Michael Andres 2008-05-29 13:37:41 UTC
Fixed with pt-pkg-2.16.47. 
Comment 10 peter czanik 2008-06-11 14:45:58 UTC
Oops. RC3 has 2.16.46 and crashes :-(
Comment 11 Michael Andres 2008-06-11 16:34:01 UTC
I'll check it.
Comment 12 Michael Andres 2008-06-12 09:02:45 UTC
I'm sorry, the package was not submitted in sufficient time. The fix will most probably be shipped as an update.
Comment 13 Michael Andres 2008-06-20 15:47:36 UTC
Package/patchinfo submitted for 11.0 online update.
Comment 14 Lars Vogdt 2008-06-25 13:50:18 UTC
Reopend as I can't find a reference for this bug in your yast2-qt-pkg changelog. Michael, can you have a look and submit a new package containing the fix for this bug in the changelog, please?
Comment 15 Michael Andres 2008-06-26 10:05:23 UTC
(In reply to comment #8 from Michael Andres)
> 
> I'll revert the wrong 'fix' for bug #332853. This will fix the abort here.
> 

The fixed fix for bug #332853 also fixes this. But I added this bugs number to the change log and resubmitted it.
Comment 16 Lars Vogdt 2008-06-26 11:09:25 UTC
(In reply to comment #15 from Michael Andres)
> The fixed fix for bug #332853 also fixes this. But I added this bugs number to
> the change log and resubmitted it.

Thanks - it's clearer now (even for me).
=> checked in.
Comment 17 Anja Stock 2008-07-07 15:30:32 UTC
released