OpenCAPI / ocse

OpenCAPI Simulation Engine. Used to verify application and acceleration development(s) using a co-simulation environment
Apache License 2.0
3 stars 5 forks source link

Unexpected 0x30 from client on socket 0x06 #7

Closed luyong6 closed 3 years ago

luyong6 commented 5 years ago

Hi,

Today in Nimbix development server, we met an ERROR reported by OCSE:

ERROR: Unexpected 0x30 from client on socket 0x06

Its happening has some randomness, I mean, on a different machine it may happen or may not. So I have a little difficulties to tell you under which case it surely happens. We saw this when we testing hls_memcopy_1024 (in the master 6035b8c) and run $ACTION_ROOT/tests/hw_test.sh

I checked the OCSE code. 0x30 is a valid OCSE variable, which means OCSE_FIND.

But in ocl.c, line 246, it enters the default clause of a switch block, saying it is an unexpected word read from the socket. Should the "case" include OCSE_FIND and potential other keywords?

luyong6 commented 5 years ago

@LanceThompson @shgoupf

LanceThompson commented 5 years ago

Hi - I've seen this on occassion as well (usually with a different opcode) but it is som random, I have not been able to reproduce it with any regularity. My best guess is that the host side application died and left ocse in a state where it was waiting for something "runtime" in the socket. When the host application gets restarted, it presents a "startup" opcode that ocse does not expect. I've found that if the host application stops unexpectedly that the best practice is to also terminate ocse and restart. Sometimes this problem self heals by waiting long enough for ocse to discover that the application is no longer present (by running the event simulation a little longer), and allow ocse to close the socket that was for the failing opcode.

bmesnet commented 3 years ago

Issue never reproduced - closing