The first file upload works well, while the second file upload will lead to an ET_ILLEGAL_RESSOURCE exception in xtcp, in file xtcp_server.xc, at location: (or, as a non image version:
Code: Select all
static transaction do_recv(chanend xtcp, int &client_ready,
int datalen, unsigned char data[])
{
xtcp :> client_ready; <--- ET_ILLEGAL_RESSOURCE exception here
if (client_ready) {
xtcp <: datalen;
for (int i=0;i<datalen;i++)
xtcp <: data[i];
}
}
the debug info (info reg/program/stack)
Code: Select all
info reg
r0 0x80021802 -2147346430
r1 0x0 0
r2 0x45 69
r3 0x67fdc 425948
r4 0x80021802 -2147346430
r5 0x67fdc 425948
r6 0x2 2
r7 0x1 1
r8 0x7fbf8 523256
r9 0x67fe0 425952
r10 0x1 1
r11 0xffffffff -1
cp 0x53cc8 343240
dp 0x55190 348560
sp 0x7f470 521328
lr 0x40088 262280 _InitChildThread + 0
pc 0x4ad3c 306492 xtcpd_recv + 76
sr 0x10 16
spc 0x4ad3c 306492 xtcpd_recv + 76
ssr 0x100 256
et 0x14 20
ed 0x80021802 -2147346430
sed 0x80021802 -2147346430
kep 0x40080 262272
ksp 0x4ba30 309808
info program
Program stopped at 0x4ad3c.
It stopped with signal ET_ILLEGAL_RESOURCE, Resource exception.
Type "info stack" or "info registers" for more information.
info stack
#0 do_recv () at C:/Users/Lars/Desktop/xCoreWorkspaceTest/lib_xtcp_xor/src/xtcp_server.xc:337
#1 xtcpd_recv (xtcp=@0x7fbf8, linknum=1, num_xtcp=2, s=@0x67fdc, datalen=25, data=<value optimized out>) at C:/Users/Lars/Desktop/xCoreWorkspaceTest/lib_xtcp_xor/src/xtcp_server.xc:361
#2 0x00053c14 in xtcpd_recv.thunk.10 ()
#3 0xffffffff in ?? ()
Backtrace stopped: frame did not save the PC
and the disassembly:
Code: Select all
361 master do_recv(xtcp[linknum], client_ready, datalen, data);
0004ad38: outct (rus) res[r4], 0x1 *
0004ad3a: nop (0r)
337 xtcp :> client_ready;
0004ad3c: in (2r) r0, res[r4] * <--- ET_ILLEGAL_RESSOURCE exception here
0004ad3e: nop (0r)
338 if (client_ready) {
0004ad40: bf (lru6) r0, -0xa
0004ad44: ldc (ru6) r0, 0x0
Based on what I understand, xtcp :> client_ready; should grab data from the channel and block/wait for data if no data is available, so the illegal ressource must be the channel itself? As the first file transfer works, the channel should be ok?