After some debugging:

(gdb) p *((struct dict_application_data *)data)
$33 = {application_id = 4, application_name = 0x7fffdc224000 "Diameter Credit Control Application"}
(gdb) bt
#0  fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffde60, parent=parent@entry=0x0, ref=ref@entry=0x7fffffffdd40) at ./libfdproto/dictionary.c:1519
#1  0x00007fffdc21d23b in dict_dcca_entry (conffile=<optimized out>) at ./extensions/dict_dcca/dict_dcca.c:75
#2  0x00007ffff7282cae in fd_ext_load () from /lib/x86_64-linux-gnu/libfdcore.so.6
#3  0x00007ffff727b27d in fd_core_parseconf () from /lib/x86_64-linux-gnu/libfdcore.so.6
#4  0x00007ffff7e5a8ad in ogs_diam_init (mode=mode@entry=3, conffile=0x55555563b410 "/etc/freeDiameter/smf.conf", fd_config=fd_config@entry=0x5555555df760 <g_diam_conf>) at ../lib/diameter/common/init.c:51
#5  0x00005555555869dc in smf_fd_init () at ../src/smf/fd-path.c:34
#6  0x00005555555624c6 in smf_initialize () at ../src/smf/init.c:78
#7  0x0000555555561fc6 in app_initialize (argv=argv@entry=0x7fffffffe290) at ../src/smf/app.c:26
#8  0x0000555555561e46 in main (argc=<optimized out>, argv=0x7fffffffe498) at ../src/main.c:219
(gdb) c
Continuing.

Thread 1 "open5gs-smfd" hit Breakpoint 3, fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffdc80, parent=0x5555557edc60, ref=ref@entry=0x0)
    at ./libfdproto/dictionary.c:1519
1519    {
(gdb) bt
#0  fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffdc80, parent=0x5555557edc60, ref=ref@entry=0x0) at ./libfdproto/dictionary.c:1519
#1  0x00007ffff7e6323a in ogs_dict_gx_entry (conffile=conffile@entry=0x0) at ../lib/diameter/gx/dict.c:154
#2  0x00007ffff7e64955 in ogs_diam_gx_init () at ../lib/diameter/gx/message.c:97
#3  0x000055555558eb69 in smf_gx_init () at ../src/smf/gx-path.c:1396
#4  0x00005555555869e9 in smf_fd_init () at ../src/smf/fd-path.c:38
#5  0x00005555555624c6 in smf_initialize () at ../src/smf/init.c:78
#6  0x0000555555561fc6 in app_initialize (argv=argv@entry=0x7fffffffe290) at ../src/smf/app.c:26
#7  0x0000555555561e46 in main (argc=<optimized out>, argv=0x7fffffffe498) at ../src/main.c:219
(gdb) p *((struct dict_application_data *)data)
$34 = {application_id = 16777238, application_name = 0x7ffff7e67019 "Gx"}
(gdb) c
Continuing.

Thread 1 "open5gs-smfd" hit Breakpoint 1, ogs_dict_gy_entry (conffile=conffile@entry=0x0) at ../lib/diameter/gy/dict.c:147
147     {
(gdb) c
Continuing.

Thread 1 "open5gs-smfd" hit Breakpoint 3, fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffde80, parent=parent@entry=0x0, ref=ref@entry=0x0)
    at ./libfdproto/dictionary.c:1519
1519    {
(gdb) p *((struct dict_application_data *)data)
$35 = {application_id = 4, application_name = 0x7ffff7e4f000 "Gy"}
(gdb) 
[...]
1690            if (ret == EEXIST) {
(gdb) 
1692                    switch (type) {
(gdb) 
1706                                    TRACE_DEBUG(FULL, "Application %s already in dictionary", new->data.application.application_name);
(gdb) 
1708                                    if (fd_os_cmp(locref->data.application.application_name, locref->datastr_len,
(gdb) 
1710                                            TRACE_DEBUG(FULL, "Conflicting application name");
(gdb) 
1839                    if (ref)
(gdb) 
1850                            CHECK_MALLOC( dict_obj_info[CHECK_TYPE(type) ? type : 0].dump_data(&buf, &len, &offset, data) );
(gdb) 
1853                    TRACE_DEBUG(INFO, "An error occurred while adding the following data in the dictionary: %s", buf);
(gdb) 
1855                    if (ret == EEXIST) {
(gdb) 
1856                            offset=0;
(gdb) 
1857                            CHECK_MALLOC( dump_object(&buf, &len, &offset, locref, 0, 0, 0) );
(gdb) 
1858                            TRACE_DEBUG(INFO, "Conflicting entry in the dictionary: %s", buf);
(gdb) 
1860                    free(buf);
(gdb) 
1863            free(new);
(gdb) 
1864            return ret;

Now it's clear that application_id 4 is used twice:

	/* DCCA */
	{
	    struct dict_application_data data = {        4, "Diameter Credit Control Application" 			};
	    CHECK_dict_new( DICT_APPLICATION, &data, NULL, &dcca);
	} 
int ogs_diam_gy_init(void)
{
    application_id_t id = OGS_DIAM_GY_APPLICATION_ID;

    ogs_assert(ogs_dict_gy_entry(NULL) == 0);

defined at:
https://github.com/open5gs/open5gs/blob/main/lib/diameter/gy/message.h#L34

/* Gy interface, 3GPP TS 32.299 */

#define OGS_DIAM_GY_APPLICATION_ID 4


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: <open5gs/open5gs/issues/3074/2796155952@github.com>

linuxmaniac left a comment (open5gs/open5gs#3074)

After some debugging:

(gdb) p *((struct dict_application_data *)data)
$33 = {application_id = 4, application_name = 0x7fffdc224000 "Diameter Credit Control Application"}
(gdb) bt
#0  fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffde60, parent=parent@entry=0x0, ref=ref@entry=0x7fffffffdd40) at ./libfdproto/dictionary.c:1519
#1  0x00007fffdc21d23b in dict_dcca_entry (conffile=<optimized out>) at ./extensions/dict_dcca/dict_dcca.c:75
#2  0x00007ffff7282cae in fd_ext_load () from /lib/x86_64-linux-gnu/libfdcore.so.6
#3  0x00007ffff727b27d in fd_core_parseconf () from /lib/x86_64-linux-gnu/libfdcore.so.6
#4  0x00007ffff7e5a8ad in ogs_diam_init (mode=mode@entry=3, conffile=0x55555563b410 "/etc/freeDiameter/smf.conf", fd_config=fd_config@entry=0x5555555df760 <g_diam_conf>) at ../lib/diameter/common/init.c:51
#5  0x00005555555869dc in smf_fd_init () at ../src/smf/fd-path.c:34
#6  0x00005555555624c6 in smf_initialize () at ../src/smf/init.c:78
#7  0x0000555555561fc6 in app_initialize (argv=argv@entry=0x7fffffffe290) at ../src/smf/app.c:26
#8  0x0000555555561e46 in main (argc=<optimized out>, argv=0x7fffffffe498) at ../src/main.c:219
(gdb) c
Continuing.

Thread 1 "open5gs-smfd" hit Breakpoint 3, fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffdc80, parent=0x5555557edc60, ref=ref@entry=0x0)
    at ./libfdproto/dictionary.c:1519
1519    {
(gdb) bt
#0  fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffdc80, parent=0x5555557edc60, ref=ref@entry=0x0) at ./libfdproto/dictionary.c:1519
#1  0x00007ffff7e6323a in ogs_dict_gx_entry (conffile=conffile@entry=0x0) at ../lib/diameter/gx/dict.c:154
#2  0x00007ffff7e64955 in ogs_diam_gx_init () at ../lib/diameter/gx/message.c:97
#3  0x000055555558eb69 in smf_gx_init () at ../src/smf/gx-path.c:1396
#4  0x00005555555869e9 in smf_fd_init () at ../src/smf/fd-path.c:38
#5  0x00005555555624c6 in smf_initialize () at ../src/smf/init.c:78
#6  0x0000555555561fc6 in app_initialize (argv=argv@entry=0x7fffffffe290) at ../src/smf/app.c:26
#7  0x0000555555561e46 in main (argc=<optimized out>, argv=0x7fffffffe498) at ../src/main.c:219
(gdb) p *((struct dict_application_data *)data)
$34 = {application_id = 16777238, application_name = 0x7ffff7e67019 "Gx"}
(gdb) c
Continuing.

Thread 1 "open5gs-smfd" hit Breakpoint 1, ogs_dict_gy_entry (conffile=conffile@entry=0x0) at ../lib/diameter/gy/dict.c:147
147     {
(gdb) c
Continuing.

Thread 1 "open5gs-smfd" hit Breakpoint 3, fd_dict_new (dict=0x55555576cb70, type=type@entry=DICT_APPLICATION, data=data@entry=0x7fffffffde80, parent=parent@entry=0x0, ref=ref@entry=0x0)
    at ./libfdproto/dictionary.c:1519
1519    {
(gdb) p *((struct dict_application_data *)data)
$35 = {application_id = 4, application_name = 0x7ffff7e4f000 "Gy"}
(gdb) 
[...]
1690            if (ret == EEXIST) {
(gdb) 
1692                    switch (type) {
(gdb) 
1706                                    TRACE_DEBUG(FULL, "Application %s already in dictionary", new->data.application.application_name);
(gdb) 
1708                                    if (fd_os_cmp(locref->data.application.application_name, locref->datastr_len,
(gdb) 
1710                                            TRACE_DEBUG(FULL, "Conflicting application name");
(gdb) 
1839                    if (ref)
(gdb) 
1850                            CHECK_MALLOC( dict_obj_info[CHECK_TYPE(type) ? type : 0].dump_data(&buf, &len, &offset, data) );
(gdb) 
1853                    TRACE_DEBUG(INFO, "An error occurred while adding the following data in the dictionary: %s", buf);
(gdb) 
1855                    if (ret == EEXIST) {
(gdb) 
1856                            offset=0;
(gdb) 
1857                            CHECK_MALLOC( dump_object(&buf, &len, &offset, locref, 0, 0, 0) );
(gdb) 
1858                            TRACE_DEBUG(INFO, "Conflicting entry in the dictionary: %s", buf);
(gdb) 
1860                    free(buf);
(gdb) 
1863            free(new);
(gdb) 
1864            return ret;

Now it's clear that application_id 4 is used twice:

	/* DCCA */
	{
	    struct dict_application_data data = {        4, "Diameter Credit Control Application" 			};
	    CHECK_dict_new( DICT_APPLICATION, &data, NULL, &dcca);
	} 
int ogs_diam_gy_init(void)
{
    application_id_t id = OGS_DIAM_GY_APPLICATION_ID;

    ogs_assert(ogs_dict_gy_entry(NULL) == 0);

defined at:
https://github.com/open5gs/open5gs/blob/main/lib/diameter/gy/message.h#L34

/* Gy interface, 3GPP TS 32.299 */

#define OGS_DIAM_GY_APPLICATION_ID 4


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: <open5gs/open5gs/issues/3074/2796155952@github.com>