[#6730] mcapi node delete not clean enough
Submitted By: Mingquan Pan
Open Date
2011-08-16 00:41:49 Close Date
2011-12-29 04:16:46
Priority:
Medium Assignee:
steven miao
Status:
Closed Fixed In Release:
N/A
Found In Release:
2011R1 Release:
Category:
N/A Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
5013
App binary format:
N/A
Summary: mcapi node delete not clean enough
Details:
mcapi node delete not clean enough, so that the second case which use the same node would fail with error: File exist.
root:/bin> scl1
...
sm_debug:feb1f280 COREB: CoreB Send Close PASSED
sm_debug: 150 : 149
sm_debug:received 150
sm_debug:feb1f300 COREB: CoreB Test PASSED
sm_debug: 151 : 150
sm_debug:received 151
MCAPI_DEBUG:domain 0 node 0 endpoint 200sm_debug:ioctl type 0
MCAPI_DEBUG:index 100 200
MCAPI_DEBUG:index 200 200
sm_debug:session status index 1, avail 1
ailable avail = 1type 7000003
MCAPI_DEBUG:domain 0 node 0 endpoint 200
MCAPI_DEBUG:index 100 200
MCAPI_DEBUG:index 200 200
sm_debug:recv sleep on queue index sm_recv_scalar index 1
sm_debug:scalar0 11223344, scalar1 55667788
sm_debug:leave recv scalar
CoreA endpoint=200 has received 8 byte(s): [1122334455667788]
MCAPI_DEBUG:domain 0 node 0 endpoint 200
MCAPI_DEBUG:index 100 200
MCAPI_DEBUG:index 200 200
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices: n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 200
MCAPI_DEBUG:index 100 200
MCAPI_DEBUG:index 200 200
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0xc8 (database indices: n=0,e=200) rc=1
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:domain 0 node 1 endpoint 6
root:/bin>
root:/bin>
root:/bin>
root:/bin> pkt1
MCAPI_DEBUG:mcapi_trans_initialize 843
MCAPI_DEBUG:mcapi_trans_initialize_ 798
semget
: File exists
MCAPI_DEBUG:mcapi_trans_initialize_ 807
WRONG: line=49
root:/bin>
Follow-ups
--- Mingquan Pan 2011-08-25 23:00:30
"File exists" doesn't show up now, but it still fails to run the same
case twice. like:
the second time:
root:/bin>
root:/bin>
root:/bin> icc_loader -f -e mcapi_msg1
wrism_debug:sm_find_session bits 00000000 localep 0
task_init_addr 3c001c4
sm_debug:table bits1 00000000
sm_debug:table index 0
sm_debug:table bits2 00000001
sm_debug:create ep index 0 srcep 0 type 2
sm_debug:session 02a05828
sm_debug:size of session 60
sm_debug:sm_send_packet: 0 02a05828
sm_debug:sm_send_packet: len 268 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:alloc buffer 2a04000
sm_debug:sm_task_sendmsg msg type 2000000
sm_debug:sm_task_sendmsg init addr03c001c4
sm_debug:sm_send_packet: len 268 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 10
COREB: sm_handle_control_message type 2000000
COREB: sm_handle_control_message 2000000 2000000
root:/bin>
root:/bin>
root:/bin> msg1
MCAPI_DEBUG:mcapi_trans_initialize 853
MCAPI_DEBUG:mcapi_trans_initialize_ 812
semget
MCAPI_DEBUG:mcapi_trans_initialize_ 841 db size eb72csm_debug:sm_find_session
bits 00000000 localep 100
ialize_ 845ble bits1 00000000
sm_debug:table index 0
sm_debug:table bits2 00000001
sm_debug:create ep index 0 srcep 100 type 4
sm_debug:session 02a05828
sm_debug:size of session 60
MCAPIsm_debug:sm_send_packet: 0 02a05828
node=0, port=100
ep1 64
MCAPI_DEBUG: mcapi_trans_get_endpoint_internal node_num=1, port_num=5
node=1, port=5
ep2 10005
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices:
n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:index 0, re 100, rn 0
MCAPI_DEBUG:index 0, re 5, rn 1
sm_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:alloc buffer 2a13ce0
sm_debug:sm_default_sendmsg session type 4
sm_debug:sm_default_sendmsg: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 11
endpoint=100 has sent: [1Hesm_debug:sm_send_packet: 0 02a05828
llo MCAPI]
coreA: The 0 time sending, status 1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices:
n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:index 0, re 100, rn 0
MCAPI_DEBUG:index 0, re 5, rn 1
sm_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:alloc buffer 2a13d20
sm_debug:sm_default_sendmsg session type 4
sm_debug:sm_default_sendmsg: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 12
endpoint=100 has sent: [1Hello MCAPI]sm_debug:sm_send_packet: 0 02a05828
00_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices:
n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:index 0, re 100, rn 0
MCAPI_DEBUG:index 0, re 5, rn 1
sm_debug:alloc buffer 2a13d60
sm_debug:sm_default_sendmsg session type 4
sm_debug:sm_default_sendmsg: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 13
endpoint=100 has sent: [1Hello MCAPI]sm_debug:sm_send_packet: 0 02a05828
sm_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices:
n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:index 0, re 100, rn 0
MCAPI_DEBUG:index 0, re 5, rn 1
sm_debug:alloc buffer 2a13da0
sm_debug:sm_default_sendmsg session type 4
sm_debug:sm_default_sendmsg: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_packet: len 12 type 4000000 dst 1 dstep 5 src 0 srcep 100
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 14
endpoint=100 has sent: [1Hello MCAPI]sm_debug:session status index 0, avail 0
--- Mingquan Pan 2011-09-01 03:52:49
If the same case like msg1, I can have successfully run it several times.
But if followed with another case, like scl1, it looks still have problems.
COREB: CoreB Test PASSED
COREB: before run task
COREB: before run task
COREB: before run task
MCAPI_DEBUG:domain 0 node 0 endpoint 100sm_debug:session status index 0, avail
1
MCAsm_debug:recv sleep on queue index sm_recv_packet index 0point endpoint=0x64
(database indices: n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_msg_available avail = 1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices:
n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
session_idx 0
sm_debug:recv 1Hello MCAPI
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 18
COREB: sm_handle_control_message type 4000001
MCAPI_DEBUG:index 0, se 5, sn 1
MCAPI_DEBUG:buffer 1Hello MCAPI
node=1, port=5
endpoint=100 has received: [1Hello MCAPI]
CoreA : message recv. The 3 time receiving ok, status 1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices:
n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:domain 0 node 1 endpoint 5
root:/bin> COREB: @@@ wake up
COREB: before run task
COREB: before run task
root:/bin>
root:/bin> icc_loader -f -e mcapi_scl1
writing to 0x03c00000, 0x50d8 bytes: OKsm_debug:sm_find_session bits
00000000 localep 0
task_init_addr 3c002c4
task_exit_addr ffffffff
sm_debug:table bits1 00000000
sm_debug:table index 0
sm_debug:table bits2 00000001
sm_debug:create ep index 0 srcep 0 type 2
sm_debug:session 02913828
sm_debug:size of session 60
sm_debug:sm_send_packet: 0 02913828
sm_debug:sm_send_packet: len 332 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:alloc buffer 2912200
sm_debug:sm_task_sendmsg msg type 2000000
sm_debug:sm_task_sendmsg init addr03c002c4
sm_debug:sm_send_packet: len 332 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 19
COREB: sm_handle_control_message type 2000000
COREB: sm_handle_control_message 2000000 2000000
COREB: task exit 0
COREB: task init 3c002c4 exit 0
COREB: @@@ gen pool create0
COREB: @@@ gen pool create1
COREB: sm_send_message_internal() dst 0 src 1 2000001
sm_debug:sm_find_session bits 00000001 localep 0
sm_debug:index 0 ,local ep 0 type 2
sm_debug:session 02913828 index 0 msg type2000001
sm_debug:sm_task_recvmsg msg type 2000001
sm_debug:sm_task_recvmsg free 2912200
COREB: finish sm_handle_control_message
COREB: @@@ wake up
COREB: before run task
COREB: before run task1
root:/bin>
root:/bin>
root:/bin>
root:/bin> scl1
MCAPI_DEBUG:mcapi_trans_initialize 853
MCAPI_DEBUG:mcapi_trans_initialize_ 812
semget
MCAPI_DEBUG:mcapi_trans_initialize_ 841 db size eb72csm_debug:sm_find_session
bits 00000000 localep 100
MCAPI_DEBUG:mcapi_trans_initialize_ 845
sm_debug:table bits1 00000000
sm_debug:table index 0
sm_debug:table bits2 00000001
sm_debug:create ep index 0 srcep 100 type 4
sm_debug:session 02913828
sm_debug:size of session 60
MCAPI_DEBUG: node index 0 ep index 0sm_debug:sm_find_session bits 00000001
localep 200
sm_debug:index 0 ,local ep 100 type 4
sm_debug:table bits1 00000001
sm_debug:table index 1
sm_debug:table bits2 00000003
sm_debug:create ep index 1 srcep 200 type 4
sm_debug:session 02913864
sm_debug:size of session 60
MCAPI_DEBUG: node index 0 ep index 1sm_debug:session status index 0, avail 0
node=0, port=200
ep2 c8
MCAPI_DEBUG: mcapi_trans_get_endpoint_internal node_num=1, port_num=5
node=1, port=5
MCAPI_DEBUG: mcapi_trans_get_endpoint_internal node_num=1, port_num=6
node=1, port=6
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
MCAPI_DEBUG:mcapi_trans_valid_endpoint endpoint=0x64 (database indices:
n=0,e=100) rc=1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:index 100 100
sm_debug:sm_send_message_internal: dst 1 src 0
MCAPI_DEBUG:mcapi_trans_channel_connected status = 0
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:mcapi_trans_sclchan_connect_i se 100 re 5 rn= 1
MCAPI_DEBUG:domain 0 node 0 endpoint 100
MCAPI_DEBUG:domain 0 node 1 endpoint 5
MCAPI_DEBUG:index 100 100
sm_debug:send message cpu 1 sent 20
COREB: sm_handle_control_message type 7000007
--- Mingquan Pan 2011-09-15 23:20:07
It now can continously run mcapi cases several times, but if run pkt1 case for
the second time, it still would print error:
root:/bin> icc_loader -f -e mcapi_pkt1
writing to 0x03c00000, 0x4e50 bytes: OKsm_debug:sm_find_session bits
00000002 localep 0
task_init_addr 3c001ac
task_exit_addr ffffffff
sm_debug:index 1 ,local ep 200 type 7
sm_debug:table bits1 00000002
sm_debug:table index 0
sm_debug:table bits2 00000003
sm_debug:create ep index 0 srcep 0 type 2
sm_debug:session 02b5b828
sm_debug:size of session 60
sm_debug:sm_send_packet: 0 02b5b828
sm_debug:sm_send_packet: len 332 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:alloc buffer 2b5a000
sm_debug:sm_task_sendmsg msg type 2000000
sm_debug:sm_task_sendmsg init addr03c001ac
sm_debug:sm_send_packet: len 332 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:sm_send_message_internal: dst 1 src 0 02000000
sm_debug:send message cpu 1 sent 181
COREB: sm_handle_control_message type 2000000
COREB: sm_handle_control_message 2000000 2000000
COREB: task exit 0
COREB: task init 3c001ac exit 0
COREB: @@@ gen pool create0
COREB: @@@ gen pool create1
COREB: session table 3d00000
COREB: sm_send_message_internal() dst 0 src 1 2000001
sm_debug:sm_find_session bits 00000003 localep 0
sm_debug:index 0 ,local ep 0 type 2
sm_debug:session 02b5b828 index 0 msg type2000001
sm_debug:sm_task_recvmsg msg type 2000001
sm_debug:sm_task_recvmsg free 2b5a000
COREB: finish sm_handle_control_message task status 1
COREB: finish1 sm_handle_control_message task status 1
COREB: before run task 3c001ac
COREB: [icc_task_init] 83
COREB: mcapi_initialize 160
COREB: mcapi_trans_initialize 713
COREB: mcapi_trans_initialize_ 680
COREB: mcapi_trans_initialize_ 700 db size 7d86c
COREB: mcapi_trans_initialize_ 706
COREB: mcapi_trans_add_node 203
COREB: [icc_task_init] 87
COREB: domain name 1 domain id 0
COREB: create ep
COREB: create ep index 0 srcep 5
COREB: node index 0 ep index 0
COREB: mcapi pktchan test ep1 10005
COREB: domain name 1 domain id 0
COREB: create ep
COREB: index 0 ,local ep 5
COREB: create ep index 1 srcep 6
COREB: node index 0 ep index 1
COREB: mcapi pktchan test ep2 10006
COREB: mcapi pktchan test ep3 c8
root:/bin>
root:/bin> pkt1
MCAPI_DEBUG:mcapi_trans_initialize 865
MCAPI_DEBUG:mcapi_trans_initialize_ 824
semget
MCAPI_DEBUG:mcapi_trans_initialize_ 853 db size eb72csm_debug:sm_find_session
bits 00000002 localep 100
sm_debug:index 1 ,local ep 200 type 7 857
sm_debug:table bits1 00000002
sm_debug:table index 0
sm_debug:table bits2 00000003
sm_debug:create ep index 0 srcep 100 type 4
sm_debug:session 02b5b828
sm_debug:size of session 60
MCAPI_DEBUG: node index 0 ep index 0sm_debug:sm_find_session bits 00000003
localep 200
node=0, port=100
ep1 64
sm_debug:index 0 ,local ep 100 type 4
sm_debug:index 1 ,local ep 200 type 7
sm_debug:already bound index 1 srcep 200
sm_debug:create session failed srcep 200
pkt1:
/home/test/work/cruise/checkouts/uclinux-dist/lib/libmcapi/libmcapi-2.0/mcapi_trans_stub.c:
899: mcapi_trans_endpoint_create: Assertion `endpoint_index >= 0' failed.
ABRT
--- Mingquan Pan 2011-12-29 04:40:34
This issue is gone now, so close this bug.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found