casExpandRecvBuffer modifies the contents of the buffer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
High
|
mdavidsaver |
Bug Description
For the following data base run in a SoftIOC (3.16.2):
record(waveform, "PXD:H9999:
field(FTVL, "UCHAR")
field(NELM, "262144")
}
record(waveform, "PXD:H9999:
field(FTVL, "UCHAR")
field(NELM, "262144")
}
the sequence of PV accesses created by this minimal sequence:
// vi: ft=cpp
program seqtest("")
option +c; /* dont wait for db connections */
option +r; /* make functions reentrant, multiple instances */
option +d; /* toggle runtime debugging messages */
option +W; /* extra warnings. */
%%int i;
unsigned char memswdata_
assign memswdata_array_set to "PXD:H9999:
unsigned char memoffsetdata_
assign memoffsetdata_
ss dhhseq_small {
state init {
entry {
for( i = 0; i < sizeof memswdata_
for( i = 0; i < sizeof memoffsetdata_
pvPut(
pvPut(
}
when() {} state done
}
state done {
when () {} state done
}
}
gives this error message on the softIOC side:
CAS: request from 192.168.0.1:44512 => CAS: Missaligned protocol rejected
CAS: Request from 192.168.0.1:44512 => cmmd=30720 cid=0x7800002c type=17023 count=0 postsize=44
CAS: Request from 192.168.0.1:44512 => available=
CAS: forcing disconnect from 192.168.0.1:44512
and a segfault on the sequence side.
This report is (for now) about the softIOC.
I can reliably produce this behavior on two different systems (SL7 and Debian) when both the softIOC and the sequence run on the same host. Communication is via the lo interface, so the data packets are large.
During the second pvPut, the receive buffer is to be expanded a second time, and during this call, the contents change:
before casExpandRecvBuffer
start of buffer=00 13 ffffff80
after casExpandRecvBuffer
start of buffer=78 00 00
I will try to follow this even further, but for now I'm creating this report to have a place to track my findings.
Might there be a relation to https:/
Changed in epics-base: | |
status: | Fix Committed → Fix Released |
Could you try repeating your test with EPICS_CA_ AUTO_ARRAY_ BYTES=0 in the environment? This might help to narrow down which code path is involved.
Can you confirm that your "start of buffer=..." takes into account the offset pointer 'message_ buffer: :stk'?