cms-gem-daq-project / reg_utils

0 stars 9 forks source link

Bug Report: RPC Not Connected Error, Multiple RPC Connection Pointers? #43

Closed bdorney closed 5 years ago

bdorney commented 5 years ago

Brief summary of issue

It seems if the package is built from commit 60e4e25a839bd521c5ccee4e99c8f83914f8a783 everything is good; however if the package is built from the current HEAD of master (7b9cf050c63dae5f3a9b5803389130cff2f039fa) when trying to use any python tool from a downstream repo that opens an rpc connection an rpc not connected error is thrown.

Types of issue

Expected Behavior

An rpc connection error should not be thrown.

Current Behavior

On commit 60e4e25a839bd521c5ccee4e99c8f83914f8a783:

% confChamber.py -c eagle60 -g3 --vfatmask=0x7f3f3f --run                        
2019.01.15.14.46
Open pickled address table if available  /opt/cmsgemos/etc/maps/amc_address_table_top.pickle...
Initializing AMC eagle60
opened connection
Configuring VFATs with chamber_vfatDACSettings dictionary values
biased VFATs
Set CFG_THR_ARM_DAC to 100
VFATs set to run mode
Chamber Configured

On commit 7b9cf050c63dae5f3a9b5803389130cff2f039fa we get:

% confChamber.py -c eagle60 -g3 --vfatmask=0x7f3f3f --run                        
Open pickled address table if available  /opt/cmsgemos/etc/maps/amc_address_table_top.pickle...
Initializing AMC eagle60
opened connection
Caught NotConnectedException: Not connected to rpc service

Steps to Reproduce (for bugs)

  1. Build reg_utils/python/reg_interface package from current HEAD,
  2. Call any downstream python tool

Possible Solution (for bugs)

I recall this being due to some import * shenanigans last time.

There's probably an import that has changed somewhere that causes an additional rpc pointer to be loaded by mistake.

Context (for feature requests)

Breaks python API.

Unable to use the new set-phase feature of gbt.py.

jsturdy commented 5 years ago

Naively I would suspect:

https://github.com/cms-gem-daq-project/reg_utils/compare/60e4e2..7b9cf0#diff-c8fab9570e152060b686bf71b698c7b7L15-L18

jsturdy commented 5 years ago

However, this change is 4 months old, and @mexanick states it doesn't affect "current" functionality:

https://github.com/cms-gem-daq-project/reg_utils/commit/4a9ceb68ed78645c4dd1a4ebdc1d88ab04d53a86

bdorney commented 5 years ago

@mexanick any ideas on this issue?

mexanick commented 5 years ago

I think @jsturdy is right. Could you please revert this trivial change? I believe rpcman would act as legacy while librwreg provides refactored functional which causes incompatibility such as an attempt to load inexisting module and thus you receive the RPCConnectionError

bdorney commented 5 years ago

I think @jsturdy is right. Could you please revert this trivial change? I believe rpcman would act as legacy while librwreg provides refactored functional which causes incompatibility such as an attempt to load inexisting module and thus you receive the RPCConnectionError

The trivial change we are talking about is this commit right?

https://github.com/cms-gem-daq-project/reg_utils/commit/4a9ceb68ed78645c4dd1a4ebdc1d88ab04d53a86

mexanick commented 5 years ago

yes

bdorney commented 5 years ago

Addressed by #46