SQLite error and tasks stuck

Hello everyone,

Currently I am experiencing huge problems when scanning targets.
I have a distributed OpenVAS setup, meaning I have one management instance and several distributed scanner machines.
Since about two weeks, every time a tasks gets started, the tasks seems to be stuck at 1%. From time to time, a single tasks jumps to ~80% out of nowhere, but this is rather an exception.

When observing the openvasmd.log file, I get a lot of the following error warnings:
md manage:WARNING:2018-09-07 05h02.11 utc:25512: sql_exec_internal: sqlite3_step failed: interrupted
md manage:WARNING:2018-09-07 05h02.11 utc:25512: sqlv: sql_exec_internal failed

I am running OpenVAS on a Ubuntu 16.04 server.

Many thanks in advance for any ideas or solutions.

Best regards,
laughing_man

Hi,

please see the existing threads about the “stuck tasks” available here:

1 Like

Hi. I am also facing the same problem where my scans are stuck at 1%. Are there any known solution?

@sp0re Please have a look at the previously posted links, both contains the information on the solution and further discussions around it.

1 Like

I have the same issue with tasks and these messages are in my logs too. I use the latest stable (GVM-9) versions of packages on Debian 8. So I have nothing to update as it is suggested in two similar topics.

In addition to the description of the problem: I have 3 tasks: 2 with a small number of hosts (3-5) and 1 with nearly 1,5K hosts. It looks like little tasks work correctly only when the big task is not running. But sql errors are always in logs.

Still, need help.

I have the same issue on scheduled tasks only, debian 9.

The update of the NVT cache and rebuilds of the database doesn’t help.
I also have the latest stable versions on git.

edit: to be more precise. Most of the scheduled tasks stay in requested mode for the whole scheduled periods (I set it to 5 hrs) and at the end, it stops and shows the task at 1% (stopped). In the processes, I can see that a openvasmd process was created for each scheduled task that didn’t start and these processes consume 100% of the CPU.

I have the same issue on scheduled tasks only

I confirm it: only scheduled tasks are stuck. But not always with “Requested” status and 1% progress. Sometimes it just “Stopped” with 0% progress and without new reports. The logs say:

Task Name (20dbdff0-d3f9-401e-9e0f-3709ac2ba5c7) could not be started by admin
manage_schedule: omp_start_task and omp_resume_task failed
manage_schedule: child failed
reschedule_task: rescheduling task ‘20dbdff0-d3f9-401e-9e0f-3709ac2ba5c7’
Task Name (20dbdff0-d3f9-401e-9e0f-3709ac2ba5c7) could not be resumed by admin

The posted errors looks similar to the ones posted in the following github issue:

It looks like the referenced pull request in the issue above might contain a fix for this:

12 posts were split to a new topic: Sqlite error / manager daemon authentication error

I manage to start multiple tasks at the same time using schedules when I don’t specify any authentication method to them.
I think the problem occurs when you have the same credentials used in both tasks and you start both of them at the same time. access to the sqlite db works for the first one and fails for every other ones (without retrying to access it ?) and that’s why the tasks get stuck at requested.

Maybe this message will help someone.

edit: the referenced pull request didn’t fix the problem for me

If the referenced pull request didn’t solved your issue i would suggest to open a new report at Issues · greenbone/gvmd · GitHub