This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5729: bigdataipc example fail - GateMP_attach fail

Part Number: AM5729

Tool/software:

Hi. I'm trying to use bigdataipc example on processor_sdk_rtos_am57xx_5_03_00_07. (host linux)

But there's an issue when I run the linux side application

debian@beaglebone:~$ sudo ./app_host DSP1
[sudo] password for debian:
--> main:
--> Main_main:
remoteProcId : 4
--> App_create:
MessageQ init
MessageQ create
msgqName : DSP1:MsgQ:01
status : -6
App_create: Failed opening MessageQ
<-- App_create:
<-- Main_main:

 Host: Test Failed, error -6
<-- main:


So I tried to lookup the lad.txt file and found this.
debian@beaglebone:~$ sudo cat /tmp/LAD/lad.txt

[0.599470]
Initializing LAD... [0.599962] NameServer_setup: entered, refCount=0
[0.600002] NameServer_setup: creating listener thread
[0.600198] NameServer_setup: exiting, refCount=1
[0.600297] NameServer_create(): 'GateMP'
[0.600345]
    opening FIFO: /tmp/LAD/LADCMDS
[0.601237] listener_cb: Entered Listener thread.
[0.601266] NameServer: waiting for unblockFd: 0, and socks: maxfd: 0
[3451.074152] Retrieving command...
[3451.074445]
LAD_CONNECT:
[3451.074481]     client FIFO name = /tmp/LAD/1430
[3451.074508]     client PID = 1430
[3451.074534]     assigned client handle = 0
[3451.074671]     FIFO /tmp/LAD/1430 created
[3451.074801]     FIFO /tmp/LAD/1430 opened for writing
[3451.074876]     sent response
[3451.074909] DONE
[3451.074933] Retrieving command...
[3451.074976] Sending response...
[3451.075014] Retrieving command...
[3451.075054] LAD_MULTIPROC_GETCONFIG: calling MultiProc_getConfig()...
[3451.075083] MultiProc_getConfig() - 5 procs
[3451.075108] # processors in cluster: 5
[3451.075131] cluster baseId: 0
[3451.075153]   ProcId 0 - "HOST"
[3451.075177]   ProcId 1 - "IPU2"
[3451.075200]   ProcId 2 - "IPU1"
[3451.075224]   ProcId 3 - "DSP2"
[3451.075247]   ProcId 4 - "DSP1"
[3451.075269]     status = 0
[3451.075292] DONE
[3451.075314] Sending response...
[3451.075348] Retrieving command...
[3451.075584] LAD_NAMESERVER_SETUP: calling NameServer_setup()...
[3451.075619] NameServer_setup: entered, refCount=1
[3451.075644] NameServer_setup: already setup
[3451.075666] NameServer_setup: exiting, refCount=2
[3451.075690]     status = 1
[3451.075713] DONE
[3451.075736] Sending response...
[3451.075772] Retrieving command...
[3451.075810] LAD_MESSAGEQ_GETCONFIG: calling MessageQ_getConfig()...
[3451.075836]     status = 0
[3451.075860] DONE
[3451.075883] Sending response...
[3451.075918] Retrieving command...
[3451.075954] LAD_MESSAGEQ_SETUP: calling MessageQ_setup()...
[3451.075980] MessageQ_setup: entered, refCount=0
[3451.076005] NameServer_create(): 'MessageQ'
[3451.076036] MessageQ_setup: exiting, refCount=1
[3451.076060]     status = 0
[3451.076083] DONE
[3451.076168] Sending response...
[3451.076224] Retrieving command...
[3451.076475] NameServer_attach: --> procId=1, refCount=0
[3451.076555] NameServer_attach: created send socket: 5, procId 1
[3451.076618] NameServer_attach: connect failed: procId=1, errno=22 (Invalid argument)
[3451.076665]     closing send socket: 5
[3451.076715] NameServer_attach: <-- refCount=0, status=-1
[3451.076743] Sending response...
[3451.076780] Retrieving command...
[3451.076854] NameServer_attach: --> procId=2, refCount=0
[3451.076905] NameServer_attach: created send socket: 5, procId 2
[3451.076938] NameServer_attach: connect failed: procId=2, errno=22 (Invalid argument)
[3451.076966]     closing send socket: 5
[3451.077010] NameServer_attach: <-- refCount=0, status=-1
[3451.077038] Sending response...
[3451.077074] Retrieving command...
[3451.077112] NameServer_attach: --> procId=3, refCount=0
[3451.077153] NameServer_attach: created send socket: 5, procId 3
[3451.077186] NameServer_attach: connect failed: procId=3, errno=22 (Invalid argument)
[3451.077214]     closing send socket: 5
[3451.077255] NameServer_attach: <-- refCount=0, status=-1
[3451.077282] Sending response...
[3451.077318] Retrieving command...
[3451.077355] NameServer_attach: --> procId=4, refCount=0
[3451.077396] NameServer_attach: created send socket: 5, procId 4
[3451.077448] NameServer_attach: created receive socket: 7, procId 4
[3451.077528] NameServer: back from select()
[3451.077572] NameServer: listener thread, event: REFRESH
[3451.077606] NameServer: waiting for unblockFd: 0, and socks: maxfd: 7
[3451.077625] NameServer_attach: <-- refCount=1, status=0
[3451.077693] Sending response...
[3451.077730] Retrieving command...
[3451.077851] LAD_GATEMP_ISSETUP: calling GateMP_isSetup()...
[3451.077880]     status = 0
[3451.077905] DONE
[3451.077929] Sending response...
[3451.077965] Retrieving command...
[3451.078005] LAD_GATEMP_ATTACH: calling GateMP_attach(4)...
[3451.078051] NameServer_getRemote: Sending request via sock: 5
[3451.078139] NameServer_getRemote: requesting from procId 4, GateMP: _GateMP_TI_dGate
[3451.078189] NameServer_getRemote: pending on waitFd: 1
[3451.118301] NameServer_getRemote: select timed out.
[3451.118342] GateMP_attach: failed to open default gate on procId 4
[3451.118365]     status = -5
[3451.118385] DONE
[3451.118405] Sending response...
[3451.118446] Retrieving command...
[3451.118484] LAD_GATEMP_ISSETUP: calling GateMP_isSetup()...
[3451.118507]     status = 0
[3451.118527] DONE
[3451.118547] Sending response...
[3451.118578] Retrieving command...
[3451.118648] LAD_GATEHWSPINLOCK_GETCONFIG: calling GateHWSpinlock_getConfig()...
[3451.118674] GateHWSpinlock_getConfig()        baseAddr = 0x4a0f6000
[3451.118695]   size = 0x1000
        offset = 0x800
[3451.118716]     status = 0
[3451.118736] DONE
[3451.118755] Sending response...
[3451.118787] Retrieving command...
[3451.118949] LAD_GATEMP_START: calling GateMP_start()...
[3451.118976]     status = 0
[3451.118996] DONE
[3451.119016] Sending response...
[3451.119048] Retrieving command...
[3451.119086] LAD_GATEMP_GETNUMRESOURCES: calling GateMP_getNumResources()...
[3451.119108]     status = 0
[3451.119128] DONE
[3451.119148] Sending response...
[3451.119178] Retrieving command...
[3451.119246] LAD_NAMESERVER_GET: calling NameServer_get(0x159c218, '_GateMP_TI_dGate'[3451.119273] )...
[3451.119296] NameServer_getLocal: entry key: '_GateMP_TI_dGate' not found!
[3451.119317] NameServer_getRemote: no socket connection to processor 1
[3451.119338] NameServer_getRemote: no socket connection to processor 2
[3451.119358] NameServer_getRemote: no socket connection to processor 3
[3451.119378] NameServer_getRemote: Sending request via sock: 5
[3451.119399] NameServer_getRemote: requesting from procId 4, GateMP: _GateMP_TI_dGate
[3451.119434] NameServer_getRemote: pending on waitFd: 1
[3451.159545] NameServer_getRemote: select timed out.
[3451.159585]     value = 0x10
[3451.159607]     status = -6
[3451.159627] DONE
[3451.159647] Sending response...
[3451.159688] Retrieving command...
[3451.160033] LAD_MESSAGEQ_CREATE: calling MessageQ_create(0x4cd7f8, 0x4cd818)...
[3451.160066] MessageQ_create: creating 'HOST:MsgQ:01'
[3451.160090] MessageQ_create: returning obj=0x159e640, qid=0x80
[3451.160152]     status = 0
[3451.160175] DONE
[3451.160195] Sending response...
[3451.160227] Retrieving command...
[3451.160415] LAD_MESSAGEQ_ANNOUNCE: calling MessageQ_announce(0x4cd7f8, 0x159e640)...
[3451.160446] MessageQ_announce: announcing 0x159e640
[3451.160471] NameServer_add: Entered key: 'HOST:MsgQ:01', data: 0x80
[3451.160492]     status = 0
[3451.160513] DONE
[3451.160532] Sending response...
[3451.160564] Retrieving command...
[3451.160847] LAD_NAMESERVER_GETUINT32: calling NameServer_getUInt32(0x159e558, 'DSP1:MsgQ:01')...
[3451.160881] NameServer_getLocal: entry key: 'DSP1:MsgQ:01' not found!
[3451.160903] NameServer_getRemote: no socket connection to processor 1
[3451.160923] NameServer_getRemote: no socket connection to processor 2
[3451.160992] NameServer_getRemote: no socket connection to processor 3
[3451.161015] NameServer_getRemote: Sending request via sock: 5
[3451.161037] NameServer_getRemote: requesting from procId 4, MessageQ: DSP1:MsgQ:01
[3451.161106] NameServer_getRemote: pending on waitFd: 1
[3451.201223] NameServer_getRemote: select timed out.
[3451.201263]     value = 0x80
[3451.201284]     status = -6
[3451.201304] DONE
[3451.201323] Sending response...
[3451.201364] Retrieving command...
[3452.201795] LAD_GATEMP_ISSETUP: calling GateMP_isSetup()...
[3452.201837]     status = 0
[3452.201858] DONE
[3452.201878] Sending response...
[3452.201920] Retrieving command...
[3452.202005] LAD_GATEMP_DETACH: calling GateMP_detach(4)...
[3452.202031]     status = -5
[3452.202052] DONE
[3452.202073] Sending response...
[3452.202105] Retrieving command...
[3452.202315] NameServer_detach: --> procId=4, refCount=1
[3452.202375] NameServer: back from select()
[3452.202413] NameServer: listener thread, event: REFRESH
[3452.202442] NameServer: waiting for unblockFd: 0, and socks: maxfd: 0
[3452.202463] NameServer_detach: closing socket: 5
[3452.202586] NameServer_detach: closing socket: 7
[3452.202632] NameServer_detach: <-- refCount=0, status=0
[3452.202656] Sending response...
[3452.202689] Retrieving command...
[3452.203025] LAD_MESSAGEQ_DESTROY: calling MessageQ_destroy()...
[3452.203056] MessageQ_destroy: entered, refCount=1
[3452.203078] MessageQ_delete: deleting 0x159e640
[3452.203115] MessageQ_delete: returning 0
[3452.203149] MessageQ_destroy: exiting, refCount=0
[3452.203171]     status = 0
[3452.203191] DONE
[3452.203210] Sending response...
[3452.203242] Retrieving command...
[3452.203308] LAD_NAMESERVER_DESTROY: calling NameServer_destroy()...
[3452.203334] NameServer_destroy: entered, refCount=2
[3452.203355] NameServer_destroy(): refCount(1) > 0, exiting
[3452.203375] NameServer_destroy: exiting, refCount=1
[3452.203395]     status = 0
[3452.203415] DONE
[3452.203434] Sending response...
[3452.203466] Retrieving command...
[3452.203523]
LAD_DISCONNECT: [3452.203548]
    client handle = 0[3452.203569]
    closing FIFO /tmp/LAD/1430 (filePtr=0x159d3e8)
[3452.203610]     done, unlinking /tmp/LAD/1430
[3452.203750] DONE
[3452.203776] Retrieving command...
[3452.204435]    EOF detected on FIFO, closing FIFO: /tmp/LAD/LADCMDS
[3452.204502]
    opening FIFO: /tmp/LAD/LADCMDS



There were three issues in the log.

1st)

[3451.078005] LAD_GATEMP_ATTACH: calling GateMP_attach(4)...
[3451.078051] NameServer_getRemote: Sending request via sock: 5
[3451.078139] NameServer_getRemote: requesting from procId 4, GateMP: _GateMP_TI_dGate
[3451.078189] NameServer_getRemote: pending on waitFd: 1
[3451.118301] NameServer_getRemote: select timed out.
[3451.118342] GateMP_attach: failed to open default gate on procId 4
[3451.118365] status = -5
[3451.118385] DONE

2nd)


[3451.119246] LAD_NAMESERVER_GET: calling NameServer_get(0x159c218, '_GateMP_TI_dGate'[3451.119273] )...
[3451.119296] NameServer_getLocal: entry key: '_GateMP_TI_dGate' not found!
[3451.119317] NameServer_getRemote: no socket connection to processor 1
[3451.119338] NameServer_getRemote: no socket connection to processor 2
[3451.119358] NameServer_getRemote: no socket connection to processor 3
[3451.119378] NameServer_getRemote: Sending request via sock: 5
[3451.119399] NameServer_getRemote: requesting from procId 4, GateMP: _GateMP_TI_dGate
[3451.119434] NameServer_getRemote: pending on waitFd: 1
[3451.159545] NameServer_getRemote: select timed out.
[3451.159585] value = 0x10
[3451.159607] status = -6
[3451.159627] DONE

3rd)

[3451.160847] LAD_NAMESERVER_GETUINT32: calling NameServer_getUInt32(0x159e558, 'DSP1:MsgQ:01')...
[3451.160881] NameServer_getLocal: entry key: 'DSP1:MsgQ:01' not found!
[3451.160903] NameServer_getRemote: no socket connection to processor 1
[3451.160923] NameServer_getRemote: no socket connection to processor 2
[3451.160992] NameServer_getRemote: no socket connection to processor 3
[3451.161015] NameServer_getRemote: Sending request via sock: 5
[3451.161037] NameServer_getRemote: requesting from procId 4, MessageQ: DSP1:MsgQ:01
[3451.161106] NameServer_getRemote: pending on waitFd: 1
[3451.201223] NameServer_getRemote: select timed out.
[3451.201263] value = 0x80
[3451.201284] status = -6
[3451.201304] DONE



And surely dsp side log looks fine.

[ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
[ 0.000] [t=0x00057336] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
[ 0.000] [t=0x00074e8a] xdc.runtime.Main: --> smain:
[ 0.000] [t=0x00085a29] Server: msgqName : DSP1:MsgQ:01
[ 0.000] [t=0x0009ad3e] Server: Server_create: server is ready

Its code is almost same with its original code.

I have not seen any other post about this so, plz let me know what should I have to try to fix this.

Thx.