Skip to content

Message registration: Same module appearing twice in the configuration file results in two copies to be stamped out #4835

Closed

Description

@e-kayrakli

I came across this while using --saveUsedModules, which happens to save modules that are core and not normally have to be included in ServerModules.cfg. That resulted in GenSymIO to appear both in my config file, and also a list somewhere in the registration infra where we list default modules. The infra was happy to go through GenSymIO twice, stamping out same functions twice quitely.

End result was a Chapel compiler error because of doubly-defined functions.

Activity

  1. added
    bug
    on Aug 28, 2025
  2. 1RyanK commented on Sep 17, 2025

    @1RyanK
    Contributor

    I started a server with --saveUsedModules and ran the following:

    In [1]: a = ak.arange(5)
    
    In [2]: a * 2
    Out[2]: array([0 2 4 6 8])
    
    In [3]: ak.tile(a, 2)
    Out[3]: array([0 1 2 3 4 0 1 2 3 4])
    
    In [4]: ak.shutdown()

    Now my UsedModules.cfg looks like this:

    (arkouda-dev) ryan@vbox:~/projects/arkouda\ $ cat UsedModules.cfg 
    SequenceMsg
    ManipulationMsg
    OperatorMsg
    

    I ran a make in that directory and no compiler error occurred. Did this issue somehow get fixed since you posted it? Or can you tell me how to better reproduce this?

  3. e-kayrakli commented on Sep 17, 2025

    @e-kayrakli
    ContributorAuthor

    Not focusing on --saveUsedModules:

    I can't compile Arkouda built with MyModules.cfg:

    ApplyMsg
    ApplyMsg
    

    with error message

    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:66: In module 'Commands':
    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:83: error: cannot capture routine with name 'ark_reg_isPythonModuleSupported' because it is overloaded
    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:76: note: declared here
    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:465: note: declared here
    

    That shows the redefinition.

    The root issue here is that if you use the same module name twice in the module config file, and if that module uses attribute-based message registration, the framework stamps out functions twice.

    I think this should be ignored, ideally with a warning issued just to make sure that the user is aware of it.

  4. 1RyanK commented on Sep 17, 2025

    @1RyanK
    Contributor

    I was also missing the switch to using a different modules file. That makes sense.

  5. self-assigned this
    on Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions