Code Monkey home page Code Monkey logo

Comments (9)

uholeschak avatar uholeschak commented on July 19, 2024

This is easy to fix. Change this line in scancode.conf:
special[] = NOKILL

from fossology.

alpianon avatar alpianon commented on July 19, 2024

After upgrading to 4.4.0 (installation from sources)I encountered the same issue, but randomly: it happens roughly on 1 out of 10 uploads or so (both big and small, so upload size doesn't seem to matter). I applied the suggested fix, and now it seems to work. I guess that this issue should be investigated a little bit more. What could I do to provide more debug info?

from fossology.

uholeschak avatar uholeschak commented on July 19, 2024

Use my patch above and it will not be killed any more.
I am using now an automated script that patches the docker image after installation (with multiple fixes).

from fossology.

alpianon avatar alpianon commented on July 19, 2024

yes @uholeschak but IIUC this means that the scancode agent does not do something that it is supposed to do, or that something else wrong is happening so that the scheduler believes the agent is hanging and needs to be killed. So your workaround works but IMHO it would be better to find and fix the issue

from fossology.

uholeschak avatar uholeschak commented on July 19, 2024

No this is not a bug, simply your system is to slow and a timeout occurs.

from fossology.

alpianon avatar alpianon commented on July 19, 2024

16 CPUs 3.3MHz, 32GB RAM, fast SSD... I keep monitoring everything with top, the CPU used by scancode is always at 100%, but that happens also with nomos, which is even slower but it doesn't get killed 🤔

from fossology.

uholeschak avatar uholeschak commented on July 19, 2024

I expect the watchdog processing in scancode is buggy. If the summary time is to long it always gets killed.
It seems that the alive handling in scancode is not working.
The timeout is fixed and could not be changed only switched off.
Another solution would be keeping the uploads small.

from fossology.

alpianon avatar alpianon commented on July 19, 2024

Use my patch above and it will not be killed any more. I am using now an automated script that patches the docker image after installation (with multiple fixes).

@uholeschak could you share the script? It would be super-useful! Thanks 🙂

from fossology.

uholeschak avatar uholeschak commented on July 19, 2024

Basically the bat is like this (only the scancode patch in this case):
The chmod fixes an additional rights problem,

SETLOCAL EnableDelayedExpansion

set "BatDir=%~dp0"
set "ContainerId=%1"

IF "!ContainerId!"=="" (
  echo missing container id
  EXIT /b 1
)

docker exec -i "!ContainerId!" sh -c "chmod a+xrw -R /root" || EXIT /b 1

docker cp "!BatDir!\scancode.conf.diff" "!ContainerId!:/usr/local/etc/fossology/mods-enabled/scancode/scancode.conf.diff" || EXIT /b 1
docker exec -i "!ContainerId!" sh -c "cd /usr/local/etc/fossology/mods-enabled/scancode && patch -N < /usr/local/etc/fossology/mods-enabled/scancode/scancode.conf.diff"

scancode.conf.diff:

--- scancode.conf	2023-11-22 10:38:18.000000000 +0100
+++ scancode_mod.conf	2023-12-08 17:52:33.757401300 +0100
@@ -20,4 +20,4 @@
 ; A comma separated list of values.
 ; Directives:
 ;     EXCLUSIVE: the agent cannot run concurrently with any other agent.
-special[] =
+special[] = NOKILL

from fossology.

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.