xmos / xscope_fileio

FileIO interface over xscope
Other
2 stars 10 forks source link

run_on_target hangs forever if files aren't closed #58

Closed xhuw closed 1 year ago

xhuw commented 1 year ago

If an app exits without cleaning up open file handles, maybe some unrelated error occurred. then xcope_fileio.run_on_target hangs forever

https://github.com/xmos/xscope_fileio/blob/52cff0826b2773beec49044a0729bb000c011379/xscope_fileio/__init__.py#L108

To reproduce:

// main.c

#include "xscope_io_device.h"

int main() {

    xscope_file_t fp = xscope_open_file("foobbar", "wb" );
    return 1;
}
# compile with a clone of xscope_fileio at ../modules/xscope_fileio

xcc -target=XCORE-AI-EXPLORER \
    main.c \
    ../modules/xscope_fileio/xscope_fileio/src/* \
    -I ../modules/xscope_fileio/xscope_fileio/api \
    -I ../modules/xscope_fileio/xscope_fileio \
    -fxscope
import xscope_fileio as x
x.run_on_target("K38LMM3N", "a.xe")  # hangs forever
mbanth commented 1 year ago

This issue is now tracked in Jira AP-148.