[gambit-list] FFI and threads: abrupt exit 71

Dimitris Vyzovitis vyzo at hackzen.org
Sat Feb 23 02:01:38 EST 2013


I am running into an abrupt exit with error code 71 (OSError) when
multiple (scheme) threads are making ffi calls that upcall to scheme.

A simplified scenario (see attached file) is as follows:
2 or more threads make an ffi call.
The ffi call is a longer running procedure, that makes upcalls into
scheme procedures that do I/O.
This results in the program exiting abruptly with error code 71, and
no context information regarding the error (even when compiled and
running with full debugging).

For an illustration of the problem, see the attached file.

The following should print dots indefinitely, but instead quickly
terminates with 71.

$ gsc exit71.scm
$  gsi -e "(begin (load \"exit71\") (main))"
....<plenty of dots>.... $ echo $?
71

This is with gambit-4.6.6, system is GNU/Linux x86-64.

-- vyzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exit71.scm
Type: application/octet-stream
Size: 1689 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130222/b0126cf5/attachment.obj>


More information about the Gambit-list mailing list