[
https://issues.apache.org/jira/browse/AXIS2C-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1592.
-------------------------------------
Resolution: Won't Fix
I am marking as Won't Fix because the ownership model between conf and
dep_engine has known inconsistencies in error paths, but these don't cause
crashes in normal
operation. If someone encounters this in practice, they can reopen with a
reproducible test
case.
Given:
- Low practical impact (crashes mainly with debug memory tools)
- Non-trivial test setup required
- Risk of introducing regressions in deployment code
The Challenge
To trigger this bug, you'd need a test that:
1. Causes axis2_dep_engine_load_client() to fail at a specific point (e.g.,
module not
found, invalid config)
2. Verifies cleanup happens without memory errors
Example test scenario:
// Create a client config pointing to a repo with a broken/missing module
axis2_conf_ctx_t *conf_ctx = axis2_build_client_conf_ctx(env,
"/path/with/broken/module");
// Should return NULL, and cleanup should not double-free
The test setup is non-trivial because you need to:
- Create a repository structure with a deliberately broken module reference
- Ensure the failure happens at the right point in the code path
- Different error paths have different levels of "fixedness"
> duplicate free: axis2_repos_listener and axis2_dep_engine when module load
> failed
> ---------------------------------------------------------------------------------
>
> Key: AXIS2C-1592
> URL: https://issues.apache.org/jira/browse/AXIS2C-1592
> Project: Axis2-C
> Issue Type: Bug
> Components: core/deployment, core/engine
> Affects Versions: 1.7.0
> Reporter: Sebastian Brandt
> Priority: Major
>
> When the loading of a module failes (a dll not found, axis2.xml not correct,
> etc) the engine and configuration are directly freed.
> This results in duplicate free.
> Ususally, this is not really a problem, as all ptrs in the structs that are
> freed twice are NULL, resulting in no additional problems.
> Still, with MSVC and _CRTDBG_MAP_ALLOC, this leads to crashes.
> Stack trace summary:
> 1) failed dep_engine_load_client calls repos_listener_free
> 2) failed dep_engine_load_client calls conf_free which calls dep_engine_free
> 3) which calls repos_listener_free (again)
> 4) failed axis2_build_client_conf_ctx calls dep_engine_free (again).
> Problem seems to be that the ownership is not agreed on between
> conf->dep_engine and dep_engine->conf.
> complete stack traces:
> > axis2_engine.dll!axis2_repos_listener_free(axis2_repos_listener *
> > repos_listener=0x03141920, const axutil_env * env=0x0312f3e0) Line 149
> > C
> axis2_engine.dll!axis2_dep_engine_load_client(axis2_dep_engine *
> dep_engine=0x03130510, const axutil_env * env=0x0312f3e0, const char *
> client_home=0x0312e144) Line 964 C
> axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env *
> env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 222 + 0x8 bytes
> C
> axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const
> axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144,
> axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 +
> 0x1b bytes C
> axis2_engine.dll!axis2_svc_client_create(const axutil_env *
> env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
>
> axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const
> axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418,
> const char * client_home=0x0312e144) Line 66 + 0xb bytes C
> > axis2_engine.dll!axis2_dep_engine_free(axis2_dep_engine *
> > dep_engine=0x03130510, const axutil_env * env=0x0312f3e0) Line 386 C
> axis2_engine.dll!axis2_conf_free(axis2_conf * conf=0x00000000, const
> axutil_env * env=0x0312f3e0) Line 357 C
> axis2_engine.dll!axis2_dep_engine_load_client(axis2_dep_engine *
> dep_engine=0x03130510, const axutil_env * env=0x0312f3e0, const char *
> client_home=0x0312e144) Line 965 C
> axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env *
> env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 222 + 0x8 bytes
> C
> axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const
> axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144,
> axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 +
> 0x1b bytes C
> axis2_engine.dll!axis2_svc_client_create(const axutil_env *
> env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
>
> axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const
> axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418,
> const char * client_home=0x0312e144) Line 66 + 0xb bytes C
> > axis2_engine.dll!axis2_repos_listener_free(axis2_repos_listener *
> > repos_listener=0x03141920, const axutil_env * env=0x0312f3e0) Line 149
> > C
> axis2_engine.dll!axis2_dep_engine_free(axis2_dep_engine *
> dep_engine=0x03130510, const axutil_env * env=0x0312f3e0) Line 570 C
> axis2_engine.dll!axis2_conf_free(axis2_conf * conf=0x00000000, const
> axutil_env * env=0x0312f3e0) Line 357 C
> axis2_engine.dll!axis2_dep_engine_load_client(axis2_dep_engine *
> dep_engine=0x03130510, const axutil_env * env=0x0312f3e0, const char *
> client_home=0x0312e144) Line 965 C
> axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env *
> env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 222 + 0x8 bytes
> C
> axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const
> axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144,
> axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 +
> 0x1b bytes C
> axis2_engine.dll!axis2_svc_client_create(const axutil_env *
> env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
>
> axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const
> axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418,
> const char * client_home=0x0312e144) Line 66 + 0xb bytes C
> > axis2_engine.dll!axis2_dep_engine_free(axis2_dep_engine *
> > dep_engine=0x03130510, const axutil_env * env=0x0312f3e0) Line 386 C
> axis2_engine.dll!axis2_build_client_conf_ctx(const axutil_env *
> env=0x0312f3e0, const char * axis2_home=0x0312e144) Line 228 + 0x7 bytes
> C
> axis2_engine.dll!axis2_svc_client_create_with_conf_ctx_and_svc(const
> axutil_env * env=0x0312f3e0, const char * client_home=0x0312e144,
> axis2_conf_ctx * conf_ctx=0x00000000, axis2_svc * svc=0x00000000) Line 174 +
> 0x1b bytes C
> axis2_engine.dll!axis2_svc_client_create(const axutil_env *
> env=0x0312f3e0, const char * client_home=0x0312e144) Line 126 C
>
> axis2_engine.dll!axis2_stub_create_with_endpoint_ref_and_client_home(const
> axutil_env * env=0x0312f3e0, axis2_endpoint_ref * endpoint_ref=0x0312f418,
> const char * client_home=0x0312e144) Line 66 + 0xb bytes C
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]