Fatal: (SIGSEGV) Bad handle or reference, Error

In reply to avi_rohan:

The issue is that you are calling set_config_parms() AFTER you are creating the environment. You need to ensure that all your config_db set() calls are done BEFORE creating the env.