Bug 971343 - createrepo is not successful
createrepo is not successful
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: createrepo (Show other bugs)
6.4
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: packaging-team-maint
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-06 06:18 EDT by hailu1107
Modified: 2015-08-24 23:30 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-26 05:24:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description hailu1107 2013-06-06 06:18:53 EDT
Description of problem:
Hello! When I use windows file sharing in rhel6.4 mounted above and creates createrepo time. Prompt error, the error message is as follows:
Spawning worker 0 with 407 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs

(process:1567): GLib-CRITICAL **: g_timer_stop: assertion `timer != NULL' failed

(process:1567): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 291, in <module>
    main(sys.argv[1:])
  File "/usr/share/createrepo/genpkgmetadata.py", line 269, in main
    mdgen.doRepoMetadata()
  File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 982, in doRepoMetadata
    rp.getOtherdata(complete_path, csum)
  File "/usr/lib64/python2.6/site-packages/sqlitecachec.py", line 61, in getOtherdata
    self.repoid))
TypeError: Can not create db_info table: database is locked


Version-Release number of selected component (if applicable):

createrepo-0.9.9-17.el6.noarch

rhel6.4

How reproducible:
 using createrepo 


Steps to Reproduce:
For example:
1.mount //192.168.0.97/d /data#(192.168.0.97 is windows)
2.cd /data/mu33/
3. createrepo ./

Actual results:
createrepo successful;
Expected results:
Can not create db_info table: database is locked
but create two files
Additional info

(process:1567): GLib-CRITICAL **: g_timer_stop: assertion `timer != NULL' failed

(process:1567): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 291, in <module>
    main(sys.argv[1:])
  File "/usr/share/createrepo/genpkgmetadata.py", line 269, in main
    mdgen.doRepoMetadata()
  File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 982, in doRepoMetadata
    rp.getOtherdata(complete_path, csum)
  File "/usr/lib64/python2.6/site-packages/sqlitecachec.py", line 61, in getOtherdata
    self.repoid))
TypeError: Can not create db_info table: database is locked
Comment 2 Petr Šabata 2013-06-06 08:41:28 EDT
Definitely not a cpuspeed issue :)
Switching component.
Comment 3 hailu1107 2013-06-07 02:06:39 EDT
(In reply to Petr Šabata from comment #2)
> Definitely not a cpuspeed issue :)
> Switching component.

I think this is about sqlite
Comment 4 Zdeněk Pavlas 2013-06-07 02:58:46 EDT
Probably sqlite does not work on windows shares.  Does the following work?

$ cd /data/mu33/
$ sqlite3 test.sqlite 'CREATE TABLE db_info(foo)'
Comment 5 hailu1107 2013-06-13 00:14:35 EDT
(In reply to Zdeněk Pavlas from comment #4)
> Probably sqlite does not work on windows shares.  Does the following work?
> 
> $ cd /data/mu33/
> $ sqlite3 test.sqlite 'CREATE TABLE db_info(foo)'

when I do this,please look:
[root@examp packages]# sqlite3 test.sqlite 'CREATE TABLE db_info(foo)'
Error: database is locked
[root@examp packages]#
Comment 6 hailu1107 2013-06-13 00:21:27 EDT
(In reply to Zdeněk Pavlas from comment #4)
> Probably sqlite does not work on windows shares.  Does the following work?
> 
> $ cd /data/mu33/
> $ sqlite3 test.sqlite 'CREATE TABLE db_info(foo)'

It's say:database is locked.
Must be sqlite3 do not release lock.
You say:“sqlite does not work on windows shares?Are you sure?”
Comment 7 Zdeněk Pavlas 2013-06-13 04:34:51 EDT
> database is locked.

Yes, it tries to lock the database file, even if it's just creating it.

$ strace sqlite3 test.sqlite 'CREATE TABLE ..'
open("/home/zpavlas/test.sqlite", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
...
fcntl64(3, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=1073741824, len=1}, 0xbf999ca8) = 0
fcntl64(3, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=1073741826, len=510}, 0xbf999ca8) = 0
fcntl64(3, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=1073741824, len=1}, 0xbf999ca8) = 0

> You say:“sqlite does not work on windows shares?Are you sure?”

It should, unless the network file system is buggy.  Since the cli example does not work, it is buggy.  Or maybe it's just mounted with record locking disabled.

In theory, we could change yum-metadata-parser (used by createrepo when building sqlite files) to use sqlite3_open_v2() and specify a VFS of "unix-none" and it would skip the file locking altogether (it's not needed in our use cases), but I don't think it's worth the effort and possible breakage of stuff that may depend on this.
Comment 8 RHEL Product and Program Management 2013-10-13 19:30:18 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 9 Valentina Mukhamedzhanova 2014-03-26 05:24:20 EDT
You can also workaround this with --no-database.

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