-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
running 2 instances of scancode hangs #341
Comments
@55jr55 Which version of ScanCode are you running exactly? Which command line options are you using and on which operating system? |
Sorry, should have included that. Scancode 2.0 |
@55jr55 Thanks. When you say 2.0, I assume you meant the 2.0.0rc1 release candidate and not a develop branch checkout, right? |
Hum... I was not able to reproduce this. 1). On a fresh checkout or download, when you run scancode for the first time across any process, it self-configures itself meaning it creates a Python virtualenv isolated environment and installs all the vendored third-party libraries. This is something that happens only once and there NO mechanism to guard this with a file-based exclusive lock to ensure that only one process can execute this. Was this a fresh extract on first run? 2). When you run a license detection for the first time on a given installation, an index of license texts and rules is built. This is guarded by a multi-processes-safe and thread-safe file-based exclusive lock mechanism and ensure that the first process that acquires the lock creates the index and caches on disk while any other process waits for that to complete and then loads the cached index. This is fairly heavily tested so I would doubt this would be the place where this could hang. If you had run scancode license detection at least one before, then the cache would be have created and processes would just acquire a lock, load the index and release the lock fairly quickly. So I guess this is because of 1. and not of 2. Could you run this for me? Then once this is completed, start again your two scans in parallel and report if there is still a problem? |
Signed-off-by: Philippe Ombredanne <[email protected]>
I'd be happy to re-run after doing the clean and -h. I'm confused about which version of 2.0 I should be using. I had downloaded the zipped version of 2.0 about a week ago. I assume that was the develop branch. I've also cloned the repository so I can checkout and run from there. I don't see any release candidate though. |
ok, so you are on the develop branch. This should work as well as you as long as you pull the latest AND run Note that we typically do not create branches for releases in most cases, only a tag (and stable release are in master, unstable are in develop) |
I ran the two concurrent scans with 2.0rc1 and it does not hang. However, one of the scans dies with this error: [----------------#-------------------] 37166 Scanning: CSceAppInitializer.cp It does this with 2.0 dev and rc1 and each time it dies on file 37167. |
ok, then this a different issue with I think is the same as explained here: #267 (comment) The short-term work around is to try to scan smaller directory trees at once (or get much more RAM which is not practical of course). And eventually to avoid running multiple large scans in parallel. I will keep posted as soon as we have a the fix to stream things to disk |
The branch The fix was developed for this and #267 |
At this stage your bug should be fixed in develop. Closing this now. |
When I run two instances of scancode, each against a different source tree with no overlap, both instances hang almost immediately. Are there any options available for debugging?
The text was updated successfully, but these errors were encountered: