Bug 1304440 - unixCurrentTime is set to 0, which crashes programs (e.g. qgis)
unixCurrentTime is set to 0, which crashes programs (e.g. qgis)
Product: Fedora
Classification: Fedora
Component: sqlite3 (Show other bugs)
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Paul Nasrat
Depends On:
  Show dependency treegraph
Reported: 2016-02-03 10:56 EST by Maarten Vergauwen
Modified: 2016-02-26 02:24 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-25 03:53:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Maarten Vergauwen 2016-02-03 10:56:20 EST
Description of problem:

The current official version of sqlite (3100200) defines 'unixCurrentTime' as 0. Programs using this pointer-to-function crash.
E.g. qgis uses this when saving a layer.
gdb shows:

#1  0x00007fffef0c63b3 in sqlite3OsCurrentTimeInt64 (pVfs=0x13237b0, pTimeOut=0x13a96a8) at sqlite3.c:17851
17851       rc = pVfs->xCurrentTime(pVfs, &r);
(gdb) print *pVfs
$1 = {iVersion = 1, szOsFile = 32, mxPathname = 512, pNext = 0x7fffef3a8078 <aVfs.12680+504>, zName = 0x3941ff0 "OGRSQLITEVFS_0x3941ff0", pAppData = 0x3941ff0, 
  xOpen = 0x7ffff4a72650 <OGRSQLiteVFSOpen(sqlite3_vfs*, char const*, sqlite3_file*, int, int*)>, xDelete = 
    0x7ffff4a72630 <OGRSQLiteVFSDelete(sqlite3_vfs*, char const*, int)>, xAccess = 0x7ffff4a72540 <OGRSQLiteVFSAccess(sqlite3_vfs*, char const*, int, int*)>, 
  xFullPathname = 0x7ffff4a72910 <OGRSQLiteVFSFullPathname(sqlite3_vfs*, char const*, int, char*)>, xDlOpen = 
    0x7ffff4a724b0 <OGRSQLiteVFSDlOpen(sqlite3_vfs*, char const*)>, xDlError = 0x7ffff4a724c0 <OGRSQLiteVFSDlError(sqlite3_vfs*, int, char*)>, xDlSym = 
    0x7ffff4a724d0 <OGRSQLiteVFSDlSym(sqlite3_vfs*, void*, char const*)>, xDlClose = 0x7ffff4a724e0 <OGRSQLiteVFSDlClose(sqlite3_vfs*, void*)>, xRandomness = 
    0x7ffff4a724f0 <OGRSQLiteVFSRandomness(sqlite3_vfs*, int, char*)>, xSleep = 0x7ffff4a72500 <OGRSQLiteVFSSleep(sqlite3_vfs*, int)>, xCurrentTime = 
    0x7ffff4a72510 <OGRSQLiteVFSCurrentTime(sqlite3_vfs*, double*)>, xGetLastError = 0x7ffff4a72520 <OGRSQLiteVFSGetLastError(sqlite3_vfs*, int, char*)>, 
  xCurrentTimeInt64 = 0x0, xSetSystemCall = 0x0, xGetSystemCall = 0x0, xNextSystemCall = 0x0}

Note the last 4: all pointers-to-function, set to 0x0.

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

How reproducible:
Always, e.g. by using qgis

Steps to Reproduce:
1. Launch qgis
2. Open an existing project
3. Right-click on a layer and select "save as" --> crash

Actual results:

Expected results:
No crash

Additional info:
sqlite can be patched. If one compiles the current source (sqlite-amalgamation-201602020204) and links to that library, the pointer-to-function is no longer 0 and there is no crash
Comment 1 Daniele Viganò 2016-02-18 07:55:36 EST
Same issue here.
Comment 2 Fedora Update System 2016-02-18 13:55:59 EST
gdal-1.11.4-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ac31c49ec3
Comment 3 Fedora Update System 2016-02-18 13:56:45 EST
gdal-2.0.2-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f567363a07
Comment 4 Daniele Viganò 2016-02-18 15:31:45 EST
gdal-2.0.2-3.fc23 works for me on Fedora 23 using QGIS 2.10.1 from official repo and using QGIS 2.12.3-2 from https://copr.fedorainfracloud.org/coprs/dani/QGIS-latest-stable/

Right-click on a layer and select "save as" worked for me.

Comment 5 Maarten Vergauwen 2016-02-19 02:23:47 EST
I confirm: with gdal-2.0.2-3.fc23 from updates-testing and qgis-2.10.1-3.fc23 from the official repo, the bug seems fixed (i.e. 'save as' works).

Thank you!
Comment 6 Fedora Update System 2016-02-25 03:53:35 EST
gdal-1.11.4-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2016-02-26 02:24:25 EST
gdal-2.0.2-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

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