Coder Social home page Coder Social logo

Comments (5)

cfi-gb avatar cfi-gb commented on July 19, 2024

@tuxmaster You need sqlite3 (and the sqlite3 devel packages) >= 3.8.3 on your system. Current trunk is checking for these requirements with the following commits: d205189 and f044820

A search like https://www.google.come/search?q="failed%3A+near+"("%3A+syntax+error"+"openvas" gives quite some hits and backgrounds like https://lists.wald.intevation.org/pipermail/openvas-discuss/2017-August/011362.html

from gvmd.

tuxmaster avatar tuxmaster commented on July 19, 2024

Yes it will fix it.

from gvmd.

fcolista avatar fcolista commented on July 19, 2024

Seems there is a regression of this bug with openvas 10.
The OS is Alpine Linux (runs on musl libc) edge version on x86_64
I get these errors when I start a task on gsa:

md manage:WARNING:2019-04-09 19h36.51 UTC:2469: sql_prepare_internal: sqlite3_prepare failed: not an error
md manage:WARNING:2019-04-09 19h36.51 UTC:2469: init_iterator: sql_prepare failed

This happens with the following packages installed:

sqlite-3.27.2
gvm-libs-10.0.0
gvmd-8.0.0
openvas-scanner-6.0.0
greenbone-security-assistant-8.0.0

What I've noticed (perhaps is linked to this problem), is that importing the nvt i got tons of these WARNING:

md manage:WARNING:2019-04-09 19h27.24 utc:1035: parse_ctime: Failed to parse time '2018-02-27T19:15:33.110Z'

Please note that Alpine doesn't use /etc/TZ to set local time, rather tzdata

I've not tested with PostgreSQL as yet.
BTW, appears to be impossible to build gvmd supporting both postgres and sqlite...
Please let me know what else I can do for testing, thanks.
.: Francesco

from gvmd.

fcolista avatar fcolista commented on July 19, 2024

Small update.
Seems that somehow I'm hitting a limit:

md manage:WARNING:2019-04-09 19h59.02 UTC:4052: sql_prepare_internal: sqlite3_prepare failed: no more rows available
md manage:WARNING:2019-04-09 19h59.02 UTC:4052: sql_x_internal: sql_prepare failed
md manage:WARNING:2019-04-09 19h59.02 UTC:4052: sql_close: attempt to close db with open statement(s)

No more rows available.
But this is impossible, since the limit is 140Terabyte and SQLite documentation states:

Maximum Number Of Rows In A Table

The theoretical maximum number of rows in a table is 264 (18446744073709551616 or about 1.8e+19). This limit is unreachable since the maximum database size of 140 terabytes will be reached first. A 140 terabytes database can hold no more than approximately 1e+13 rows, and then only if there are no indices and if each row contains very little data.

SQlite on Alpine is built with the following options:

-DSQLITE_ENABLE_FTS4 \
	-DSQLITE_ENABLE_FTS3_PARENTHESIS \
	-DSQLITE_ENABLE_FTS3 \
	-DSQLITE_ENABLE_FTS5 \
	-DSQLITE_ENABLE_COLUMN_METADATA \
	-DSQLITE_SECURE_DELETE \
	-DSQLITE_ENABLE_UNLOCK_NOTIFY \
	-DSQLITE_ENABLE_RTREE \
	-DSQLITE_ENABLE_GEOPOLY \
	-DSQLITE_USE_URI \
	-DSQLITE_ENABLE_DBSTAT_VTAB \
	-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
	-DSQLITE_ENABLE_JSON1"

.: Francesco

from gvmd.

cfi-gb avatar cfi-gb commented on July 19, 2024

@fcolista Thanks for your report. Please open a new issue as your problem is unrelated to the original report:

The initial report was about the host system of the OP not providing a recent SQLite version (>= 3.8.3) and wasn't a bug in openvasmd/gvmd but a packaging issue.

A general advice is to move away from SQLite to PostgreSQL for the reasons outlined in the following comments: #347 (comment), #347 (comment), #347 (comment)

from gvmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.