Bug 766461

Summary: can't create transaction lock on /var/lib/rpm/.rpm.lock
Product: [openSUSE] openSUSE 12.2 Reporter: Carlos Lange <carlosflange>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED INVALID QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: Beta 1   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST logs before starting actual installation

Description Carlos Lange 2012-06-11 18:46:35 UTC
Created attachment 494359 [details]
YaST logs before starting actual installation

User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1145.0 Safari/537.1 SUSE/21.0.1145.0

During the first phase of installation I noticed the following error:
can't create transaction lock on /var/lib/rpm/.rpm.lock (No such file or directory).

I checked and the directory exists:
lrwxrwxrwx 1 root root  27 Jun 11 02:38 rpm -> /mounts/mp_0000/var/lib/rpm
# cd /mounts/mp_0000/var/lib
# ls -l rpm
drwxr-xr-x 2 root root  3 May 10 07:51 rpm

but the problem is that the device has no space left:

# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop2       30M   30M     0 100% /mounts/mp_0000


Reproducible: Always

Steps to Reproduce:
1.Reach Installation Settings
2.Ctrl+Alt+F1
3. error: can't create transaction lock on /var/lib/rpm/.rpm.lock (No such file or directory)
4. Ctrl+Alt+F2
5. 
# ls -l /var/lib
# cd /mounts/mp_0000/var/lib
# ls -l rpm
# df -h .

Actual Results:  
I am not sure what is the impact of this error. There were other problems with the installation (network setup failed, Xorg broke because of i915_dri, and Plasma is not well), but I am not sure either is related. I am just reporting in case this is useful.
Comment 2 Thomas Fehr 2012-06-12 08:32:01 UTC
I would assume this is from libzypp initialisation code in inst-sys.
Here are the relevant line from y2log file:

2012-06-11 08:51:57 <1> linux(2588) [zypp] librpmDb.cc(globalInit):145 librpm init done: (_target:i586-linux) (_dbpath:/var/lib/rpm)
2012-06-11 08:51:57 <1> linux(2588) [zypp] RpmDb.cc(initDatabase):322 Calling initDatabase: '(/)/var/lib/rpm'
2012-06-11 08:51:57 <1> linux(2588) [zypp] librpmDb.cc(unblockAccess):341 Unblock access
2012-06-11 08:51:57 <1> linux(2588) [zypp++] librpmDb.cc(DbDirInfo):519 '(/)/var/lib/rpm':
2012-06-11 08:51:57 <1> linux(2588) [zypp++] librpmDb.cc(DbDirInfo):519   Dir:    /var/lib/rpm{d 0755 0/0}
2012-06-11 08:51:57 <1> linux(2588) [zypp++] librpmDb.cc(DbDirInfo):519   V4:     /var/lib/rpm/Packages{does not exist}
2012-06-11 08:51:57 <1> linux(2588) [zypp++] librpmDb.cc(DbDirInfo):519   V3:     /var/lib/rpm/packages.rpm{does not exist}
2012-06-11 08:51:57 <1> linux(2588) [zypp++] librpmDb.cc(DbDirInfo):519   V3ToV4: /var/lib/rpm/packages.rpm3{does not exist}
2012-06-11 08:51:57 <1> linux(2588) [zypp] RpmDb.cc(internal_initDatabase):451 Creating new rpm4 database in /var/lib/rpm{d 0755 0/0}
2012-06-11 08:51:57 <1> linux(2588) [zypp++] RpmDb.cc(internal_initDatabase):464 Initial state: NO_INIT: '(/)/var/lib/rpm'[librpmDb CLOSED '(/)/var/lib/rpm']
2012-06-11 08:51:57 <1> linux(2588) [zypp] librpmDb.cc(dbAccess):237 Set new database location: '(/)/var/lib/rpm'
2012-06-11 08:51:57 <3> linux(2588) [zypp] librpmDb.cc(D):79 rpmdbInit error(-1): {NULL(/)/var/lib/rpm}
2012-06-11 08:51:57 <5> linux(2588) [zypp] Exception.cc(log):137 librpmDb.cc(D):82 THROW:    Failed to initialize database: Root: / dbPath: /var/lib/rpm
2012-06-11 08:51:57 <5> linux(2588) [zypp] Exception.cc(log):137 
2012-06-11 08:51:57 <5> linux(2588) [zypp] Exception.cc(log):137 librpmDb.cc(newLibrpmDb):201 CAUGHT:   Rpm Exception
2012-06-11 08:51:57 <5> linux(2588) [zypp] Exception.cc(log):137 librpmDb.cc(newLibrpmDb):204 RETHROW:  Rpm Exception
2012-06-11 08:51:57 <5> linux(2588) [zypp] Exception.cc(log):137 RpmDb.cc(initDatabase):359 CAUGHT:   Rpm Exception
2012-06-11 08:51:57 <1> linux(2588) [zypp] librpmDb.cc(blockAccess):328 Block access
2012-06-11 08:51:57 <3> linux(2588) [zypp] RpmDb.cc(initDatabase):361 Cleanup on error: state NO_INIT
2012-06-11 08:51:57 <5> linux(2588) [zypp] Exception.cc(log):137 RpmDb.cc(initDatabase):369 RETHROW:  Rpm Exception
2012-06-11 08:51:57 <1> linux(2588) [zypp] RpmDb.cc(~RpmDb):242 ~RpmDb()
2012-06-11 08:51:57 <1> linux(2588) [zypp] RpmDb.cc(~RpmDb):245 ~RpmDb() end
2012-06-11 08:51:57 <3> linux(2588) [Pkg] Target_Load.cc(TargetInitInternal):79 TargetInit has failed: Rpm Exception
2012-06-11 08:51:57 <3> linux(2588) [Interpreter] PackageSystem.ycp:59 Rpm Exception
Comment 3 Michael Andres 2012-06-12 12:41:39 UTC
AFAIK harmless. Yast always does this TargetInit(/) in instsys ignoring the rpmdb error. There is probably a reason for this...

Probably INVALID, but I pass it to the yast guys for review.
Comment 4 Jiří Suchomel 2012-06-13 07:35:00 UTC
So, invalid