GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Database locks up with ArrayIndexOutOfBoundsException (cannot switch between databases) · Issue #1341 · ArcadeData/arcadedb

Database locks up with ArrayIndexOutOfBoundsException (cannot switch between databases) #1341

New issue
Copy link
New issue
Copy link
Closed
Closed
Database locks up with ArrayIndexOutOfBoundsException (cannot switch between databases)#1341
Copy link
Assignees
lvca
Milestone
23.12.1

Description

@decentropy
decentropy
opened on Nov 23, 2023
Issue body actions

Referencing this #1165 (comment)

It seems a database reaches some state where it freezes upon switching databases.
I don't know what causes this state (I am using simple cypher queries, nothing complicated)... however, I am attaching files to reproduce the error.

To reproduce the error

  1. Unzip attached database folders (where 'ea' seems to be in the locked state)
    databases.zip

  2. Start ArcadeDB using unzipped databases...e.g. docker command, but replace YOURPATH

docker run -p 2480:2480 -p 2424:2424 --name arcadedb \
    -v /YOURPATH/databases:/home/arcadedb/databases \
    -e JAVA_OPTS="-Darcadedb.server.rootPassword=playwithdata" \
    arcadedata/arcadedb:latest
  1. Open ArcadeDB studio...
    Querying 'ea' works fine. However switch to "parts' database, then switch back to 'ea' database... it will freeze/crash with ArrayIndexOutOfBoundsException

Activity

  1. dominik-bergen-fnt commented on Nov 23, 2023

    @dominik-bergen-fnt
    dominik-bergen-fnt
    on Nov 23, 2023
    Contributor
    More actions

    I encountered the same issue when using multiple databases. I figured out that the problem disappeared after setting database permissions individually for each database: In the config/server-users.jsonl file, change "databases":{"*":["admin"]} to "databases":{"parts":["admin"],"ea":["admin"]}.

    Here is the stack trace of the error before changing the server-users.jsonl file:

    java.lang.ArrayIndexOutOfBoundsException: Index 457 out of bounds for length 1
    at com.arcadedb.server.security.ServerSecurityDatabaseUser.requestAccessOnFile(ServerSecurityDatabaseUser.java:83)
    at com.arcadedb.database.EmbeddedDatabase.checkPermissionsOnFile(EmbeddedDatabase.java:590)
    at com.arcadedb.engine.Bucket.count(Bucket.java:276)
    at com.arcadedb.database.EmbeddedDatabase.lambda$countType$6(EmbeddedDatabase.java:452)
    at com.arcadedb.database.EmbeddedDatabase.executeInReadLock(EmbeddedDatabase.java:1401)
    at com.arcadedb.database.EmbeddedDatabase.countType(EmbeddedDatabase.java:447)
    at com.arcadedb.query.sql.executor.FetchFromSchemaTypesStep.syncPull(FetchFromSchemaTypesStep.java:75)
    at com.arcadedb.query.sql.executor.LimitExecutionStep.syncPull(LimitExecutionStep.java:48)
    at com.arcadedb.query.sql.executor.SelectExecutionPlan.fetchNext(SelectExecutionPlan.java:44)
    at com.arcadedb.query.sql.parser.LocalResultSet.fetchNext(LocalResultSet.java:44)
    at com.arcadedb.query.sql.parser.LocalResultSet.(LocalResultSet.java:40)
    at com.arcadedb.query.sql.parser.SelectStatement.execute(SelectStatement.java:207)
    at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:85)
    at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:69)
    at com.arcadedb.query.sql.SQLQueryEngine.query(SQLQueryEngine.java:82)
    at com.arcadedb.database.EmbeddedDatabase.query(EmbeddedDatabase.java:1364)
    at com.arcadedb.server.ServerDatabase.query(ServerDatabase.java:489)

    If I'm correct, this is the reason: When using the * wildcard for database access, only one ServerSecurityDatabaseUser instance is created, and the fileAccessMap is overwritten for each database which is present (see method updateFileAccess). But I'm not an ArcadeDB developer, so I'm not really sure if my assumptions are correct.

  2. lvca commented on Nov 23, 2023

    @lvca
    lvca
    on Nov 23, 2023
    Member
    More actions

    @dominik-bergen-fnt I can't reproduce the issue wth the latest 23.11.1-SNAPSHOT. What version are you using?

  3. lvca
    self-assigned this
    on Nov 23, 2023
  4. lvca
    added
    bug
    on Nov 23, 2023
  5. lvca
    added this to the 23.11.1 milestone on Nov 23, 2023
  6. lvca commented on Nov 23, 2023

    @lvca
    lvca
    on Nov 23, 2023
    Member
    More actions

    @decentropy I installed your 2 databases, then executed this cypher query MATCH (g:Goal) RETURN g on both switching everytime, but no issues. I'm using 23.11.1-SNAPSHOT where we should be have fixed this issue.

  7. lvca
    added
    unable to reproduce
    waiting for user
    on Nov 23, 2023
  8. decentropy commented on Nov 24, 2023

    @decentropy
    decentropy
    on Nov 24, 2023
    Author
    More actions

    @lvca
    hmm.. I am also trying with 23.11.1 (installed yesterday).
    I re-downloaded the zip above to double-check, unzipped over my databases folder, and can replicate the error upon switching databases. I use Ubuntu and $ java -version = openjdk version "11.0.20.1" 2023-08-24

    @dominik-bergen-fnt
    Thank you for the workaround. Making that change resolved the error.
    Perhaps I can find a way to script those permissions... as my app will create & switch DBs frequently.
    (just one minor tweak... leave in the * entry in addition to DB entries, so you can access future DBs)

    Reacted by Dominik Bergen
  9. dominik-bergen-fnt commented on Nov 24, 2023

    @dominik-bergen-fnt
    dominik-bergen-fnt
    on Nov 24, 2023
    Contributor
    More actions

    @lvca
    I tested it with the official Docker image (23.9.1) and with the Java embedded server on Windows (23.9.1, 23.10.1 and 23.11.1-SNAPSHOT; OpenJDK 17).

  10. lvca commented on Nov 24, 2023

    @lvca
    lvca
    on Nov 24, 2023
    Member
    More actions

    @dominik-bergen-fnt The latest version should have fixed the issue, but @decentropy still sees the issue. I'd love to be able to reproduce it so I can fix it. Maybe I'm gonna try a new test case where it continuously switches database and see what happens.

  11. lvca
    modified the milestones: 23.11.1, 23.12.1 on Nov 30, 2023
  12. topofocus commented on Dec 4, 2023

    @topofocus
    topofocus
    on Dec 4, 2023
    More actions

    Perhaps that's related.
    I repeatedly observed, (on Version 23.3.1) that the first insert operation after changing the database fails. I attached a screenshot of a recent test (In the ruby adapter, I included this behavior into the error-correction of the post-http-request, it works with a delay of one second). Subsequent inserts into the same database are successful.
    Bildschirmfoto_2023-12-04_10-30-07

  13. lvca commented on Dec 4, 2023

    @lvca
    lvca
    on Dec 4, 2023
    Member
    More actions

    @topofocus are you able to reproduce the issue with the latest 23.11.1?

  14. topofocus commented on Dec 7, 2023

    @topofocus
    topofocus
    on Dec 7, 2023
    More actions

    After my experience with 23.9 I will definitively not update my production environment and instead keep on responding to known issues. This walk around works for me (don't change a running system). I merely was very surprised about the cause of this bug and wanted to add additional insights (even if I am not sure, if its related).

    Reacted by Luca Garulli
  15. lvca
    removed
    unable to reproduce
    waiting for user
    on Dec 12, 2023
  16. lvca commented on Dec 12, 2023

    @lvca
    lvca
    on Dec 12, 2023
    Member
    More actions

    I was able to find this issue and reproduce it constantly when switching databases on the same server. Working to a fix.

  17. lvca
    added a commit that references this issue on Dec 12, 2023

    fix: fixed security issue with using multiple dbs on the same server

    d327d78
  18. lvca commented on Dec 12, 2023

    @lvca
    lvca
    on Dec 12, 2023
    Member
    More actions

    Ok, fixed! Thanks for the report (and the patient).

    Reacted by Dominik Bergen
  19. lvca
    closed this as completedon Dec 12, 2023
  20. lvca
    added
    fixed
    on Dec 12, 2023
  21. mergify
    added a commit that references this issue on Aug 10, 2025

    chore(deps): bump jline.version from 3.30.4 to 3.30.5 [skip ci]

    e7e2b7e
  22. mergify
    added 2 commits that reference this issue on May 31, 2026

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-js…

    1fcdd13

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-st…

    e21790d
  23. tae898
    added 4 commits that reference this issue on Jun 28, 2026

    fix: fixed security issue with using multiple dbs on the same server

    948f66e

    chore(deps): bump jline.version from 3.30.4 to 3.30.5 [skip ci]

    b77173f

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-js…

    d50bea5

    chore(deps-dev): bump testcontainers from 12.0.0 to 12.0.1 in /e2e-st…

    520f149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    • 23.12.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.