Bug 1304440

Summary: unixCurrentTime is set to 0, which crashes programs (e.g. qgis)
Product: [Fedora] Fedora Reporter: Maarten Vergauwen <maarten.vergauwen>
Component: sqlite3Assignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED ERRATA QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 23CC: Bert.Deknuydt, dennyvatwork, maarten.vergauwen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-25 08:53:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Maarten Vergauwen 2016-02-03 15:56:20 UTC
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):
sqlite-3.10.2-1.fc23.x86_64

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:
crash

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 12:55:36 UTC
Same issue here.

Comment 2 Fedora Update System 2016-02-18 18:55:59 UTC
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 18:56:45 UTC
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 20:31:45 UTC
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.

Thanks!

Comment 5 Maarten Vergauwen 2016-02-19 07:23:47 UTC
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 08:53:35 UTC
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 07:24:25 UTC
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.