What is the bug or the crash? Importing a csv-File (~12 Mio rows) to Geopackage in QGIS 3.40.2 ignores rows and just imports a little than 5 Mio rows (datasets) - without any error-message.