Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output/bin/qgis_diagramtest segfaults #22214

Closed
qgib opened this issue Feb 2, 2016 · 8 comments
Closed

output/bin/qgis_diagramtest segfaults #22214

qgib opened this issue Feb 2, 2016 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)
Original Redmine Issue: 14212
Affected QGIS version: master
Redmine category:data_provider/ogr
Assignee: Sandro Santilli


Another case of segfault-on-exit

QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/qgsproviderregistry.cpp: 237: (clean) [0ms] cleanup:spatialite
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/qgsproviderregistry.cpp: 237: (clean) [0ms] cleanup:virtual
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/qgsproviderregistry.cpp: 237: (clean) [0ms] cleanup:wcs
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/qgsproviderregistry.cpp: 237: (clean) [0ms] cleanup:wms
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/auth/qgsauthmethodregistry.cpp: 154: (~QgsAuthMethodRegistry) [0ms] cleanup: Basic
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/auth/qgsauthmethodregistry.cpp: 154: (~QgsAuthMethodRegistry) [0ms] cleanup: Identity-Cert
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/auth/qgsauthmethodregistry.cpp: 154: (~QgsAuthMethodRegistry) [0ms] cleanup: PKI-PKCS#12
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/auth/qgsauthmethodregistry.cpp: 154: (~QgsAuthMethodRegistry) [0ms] cleanup: PKI-Paths
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/qgsmaprenderercustompainterjob.cpp: 41: (~QgsMapRendererCustomPainterJob) [1ms] QPAINTER destruct
QDEBUG : TestQgsDiagram::cleanupTestCase() src/core/qgsmaprenderercustompainterjob.cpp: 41: (~QgsMapRendererCustomPainterJob) [0ms] QPAINTER destruct
QFATAL : TestQgsDiagram::cleanupTestCase() Received signal 11
FAIL!  : TestQgsDiagram::cleanupTestCase() Received a fatal error.
   Loc: [Unknown file(0)]
Totals: 3 passed, 1 failed, 0 skipped
********* Finished testing of TestQgsDiagram *********
Aborted (core dumped)

See also #22178

Last tested with 490236f

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)


It actually seem to be the same issue of #22178 as this is valgrind finding:

==15933== Invalid read of size 8
==15933==    at 0xC2D65A5: OGR_DS_Destroy (ogrdatasource.cpp:69)
==15933==    by 0x2E1EB4A6: qgsConnectionPool_ConnectionDestroy(QgsOgrConn*) (qgsogrconnpool.h:45)
==15933==    by 0x2E1EC2A5: QgsConnectionPoolGroup<QgsOgrConn*>::~QgsConnectionPoolGroup() (qgsconnectionpool.h:77)
==15933==    by 0x2E1FDB0D: QgsOgrConnPoolGroup::~QgsOgrConnPoolGroup() (in /usr/src/qgis/build/0-master/output/lib/qgis/plugins/libogrprovider.so)
==15933==    by 0x2E1FDB49: QgsOgrConnPoolGroup::~QgsOgrConnPoolGroup() (qgsogrconnpool.h:59)
==15933==    by 0x2E1EB7E5: QgsOgrConnPool::unref(QString const&) (qgsogrconnpool.h:113)
==15933==    by 0x2E1EB850: QgsOgrConnPool::unrefS(QString const&) (qgsogrconnpool.h:126)
==15933==    by 0x2E1F88BB: QgsOgrFeatureSource::~QgsOgrFeatureSource() (qgsogrfeatureiterator.cpp:412)
==15933==    by 0x2E1F8947: QgsOgrFeatureSource::~QgsOgrFeatureSource() (qgsogrfeatureiterator.cpp:413)
==15933==    by 0x5AD4DF9: QgsVectorLayerFeatureSource::~QgsVectorLayerFeatureSource() (qgsvectorlayerfeatureiterator.cpp:79)
==15933==    by 0x5AD4EA9: QgsVectorLayerFeatureSource::~QgsVectorLayerFeatureSource() (qgsvectorlayerfeatureiterator.cpp:80)
==15933==    by 0x5AC8741: QgsVectorLayerDiagramProvider::~QgsVectorLayerDiagramProvider() (qgsvectorlayerdiagramprovider.cpp:74)
==15933==  Address 0x31965110 is 0 bytes inside a block of size 280 free'd
==15933==    at 0x4C2C131: operator delete(void*) (vg_replace_malloc.c:510)
==15933==    by 0xC080FF5: GDALDriverManager::~GDALDriverManager() (gdaldrivermanager.cpp:183)
==15933==    by 0xC081158: GDALDriverManager::~GDALDriverManager() (gdaldrivermanager.cpp:289)
==15933==    by 0x2B979B4D: cleanupProvider (qgsgdalprovider.cpp:3024)
==15933==    by 0x5A5A0F1: QgsProviderRegistry::clean() (qgsproviderregistry.cpp:244)
==15933==    by 0x5A5A205: QgsProviderRegistry::~QgsProviderRegistry() (qgsproviderregistry.cpp:253)
==15933==    by 0x5A5A2A5: QgsProviderRegistry::~QgsProviderRegistry() (qgsproviderregistry.cpp:254)
==15933==    by 0x5842EA2: QgsApplication::exitQgis() (qgsapplication.cpp:868)
==15933==    by 0x409DC6: TestQgsDiagram::cleanupTestCase() (testqgsdiagram.cpp:115)
==15933==    by 0x4084E7: TestQgsDiagram::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (testqgsdiagram.moc:55)
==15933==    by 0x4FBB907: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==15933==    by 0x532408E: ??? (in /usr/lib/x86_64-linux-gnu/libQtTest.so.4.8.6)


  • category_id was changed from Authentication system to Data Provider/OGR

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)


The ref/unref management in QgsOgrFeatureIterator is not clear to me, and surely doesn't seem to be RAII compliant.
What are ref/unref calls needed for ? I'd rather just drop them completely.

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)


I confirm removing the ref / unref methods and calls fixes the crash.

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)


Also, valgrind shows no additional leak

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)


Patch for review: #2755


  • pull_request_patch_supplied was changed from 0 to 1

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)


The suggested fix in pull 2755 reverts changed meant to fix #21150 -- I'll look at that ticket to see if it breaks

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Sandro Santilli (@strk)


Ticket #21150 does not break. The shapefile is closed some time after the layer is closed. This is based on an expiration time for connections in the now-centralized connection pool (it seems to be an hard-coded 60 seconds).

@qgib
Copy link
Contributor Author

qgib commented Feb 3, 2016

Author Name: Sandro Santilli (@strk)


I cannot reproduce as of b6c714a
Assuming fixed by 0512538


  • resolution was changed from to fixed/implemented
  • status_id was changed from In Progress to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers Crash/Data Corruption labels May 25, 2019
@qgib qgib added this to the Version 2.14 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

1 participant