mz-automation / libiec61850

Official repository for libIEC61850, the open-source library for the IEC 61850 protocols
http://libiec61850.com/libiec61850
GNU General Public License v3.0
857 stars 459 forks source link

i got a bug in /src/mms/iso_cotp/cotp.c the libiec version is 1.4.2.1 #455

Open tingkman opened 1 year ago

tingkman commented 1 year ago

i used version libiec61850-1.4.2.1, the app is got a error and Generate a core i used gdb app core,and get error in cotp.c warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. Core was generated by/mnt/tn/tn_kernal_335x_common'. Program terminated with signal SIGSEGV, Segmentation fault.

0 0xb49aa452 in CotpConnection_sendDataMessage (self=0xb2624488, payload=0xaccfe9fc) at src/mms/iso_cotp/cotp.c:257

257 src/mms/iso_cotp/cotp.c: No such file or directory. [Current thread is 1 (LWP 24877)] (gdb) bt #0 0xb49aa452 in CotpConnection_sendDataMessage (self=0xb2624488, payload=0xaccfe9fc) at src/mms/iso_cotp/cotp.c:257

1 0xb49976d8 in IsoConnection_sendMessage (self=0xb26907d8, message=0xaeb64d48) at src/mms/iso_server/iso_connection.c:656

2 0xb498396e in MmsServerConnection_sendMessage (self=0xb2648418, message=0xaeb64d48) at src/mms/iso_mms/server/mms_server_connection.c:781

3 0xb49a1204 in sendNextReportEntrySegment (self=0xaf3cbe58) at src/iec61850/server/mms_mapping/reporting.c:2751

4 0xb49a1350 in sendNextReportEntry (self=0xaf3cbe58) at src/iec61850/server/mms_mapping/reporting.c:2811

5 0xb49a15aa in Reporting_sendReports (self=0xb25000d8, connection=0xb2648418) at src/iec61850/server/mms_mapping/reporting.c:2927

6 0xb499c132 in mmsConnectionHandler (parameter=0xb25000d8, connection=0xb2648418, event=MMS_SERVER_CONNECTION_TICK) at src/iec61850/server/mms_mapping/mms_mapping.c:2399

7 0xb498065e in MmsServer_callConnectionHandler (self=0xaeb63aa0, connection=0xb2648418) at src/mms/iso_mms/server/mms_server.c:517

8 0xb4983844 in connectionTickHandler (parameter=0xb2648418) at src/mms/iso_mms/server/mms_server_connection.c:712

9 0xb4996de8 in IsoConnection_handleTcpConnection (self=0xb26907d8, isSingleThread=false) at src/mms/iso_server/iso_connection.c:169

10 0xb4997386 in handleTcpConnection (parameter=0xb26907d8) at src/mms/iso_server/iso_connection.c:471

11 0xb6f61f5c in ?? () from /lib/libpthread.so.0

Backtrace stopped: previous frame identical to this frame (corrupt stack?) ` image i look 257 row for bellow buffer[bufPos++] = currentChain->buffer[currentChainIndex];

i becompare 1.4.2.1 and 1.5.0 fond a different in sendbuffer

image

can it Deal with my issue ?

tingkman commented 1 year ago

image

tingkman commented 1 year ago

@stv0g @DavidKorczynski can you see my assiue

stv0g commented 1 year ago

Hi @tingkman, why did you referenced me in this issue? I am not actively involved in the development of this code..

tingkman commented 1 year ago

Hi @tingkman, why did you referenced me in this issue? I am not actively involved in the development of this code..

I thought you were familiar with that,sorry

mzillgith commented 1 year ago

The version you mentioned is very old. Why don't you try a newer version?