reader corruption test case pasted by evhan on Mon Feb 29 23:43:46 2016

(require-extension posix srfi-4)

(receive (in out)
  (create-pipe)
  (receive (pid ok? status)
    (process-wait
     (process-fork
      (lambda ()
        (file-close in)
        (with-output-to-port (open-output-file* out)
          (lambda ()
            (display "hello, world\n")
            (exit 0))))))
    (file-close out)
    (read-lines (open-input-file* in))))

;; NOTE The following don't need to run, but do need to be read by csi
;; in order to trigger the error (hence the datum comments). Fun, huh?

#;(define-syntax check
  (syntax-rules ()
    ((_ expr)
     (condition-case expr
       ((exn i/o file) 'ok)))))

#;(with-output-to-file "empty-file" void)

#;(call-with-output-file "empty-file"
  (lambda (out)
    (close-output-port out)
    (check (write '(foo) out))
    (check (fprintf out "blabla"))
    (check (begin (print-call-chain out) (void)))
    (check (print-error-message (make-property-condition 'exn 'message "foo") out))
    (check (with-output-to-port out
        	     (lambda () (print "foo"))))
    (check (with-output-to-port out
        	      (lambda () (print* "foo"))))
    (check (display "foo" out))
    (check (newline out))))

Execution trace on a musl system pasted by Kooda on Fri Mar 18 13:42:17 2016

execve("/usr/local/bin/csi", ["csi", "-s", "bug.scm"], [/* 16 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x7f8e59e0bda8) = 0
set_tid_address(0x7f8e59e0bde0)         = 3929
open("/usr/local/lib/libchicken.so.8", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=4496696, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\306\7\0\0\0\0\0"..., 960) = 960
mmap(NULL, 7229440, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x7f8e5949e000
mmap(0x7f8e59a25000, 1433600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x387000) = 0x7f8e59a25000
mmap(0x7f8e59a73000, 1114112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8e59a73000
close(3)                                = 0
mprotect(0x7f8e59a25000, 8192, PROT_READ) = 0
mprotect(0x7f8e59e0a000, 4096, PROT_READ) = 0
mprotect(0x7f8e5a03c000, 4096, PROT_READ) = 0
open("/etc/localtime", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
brk(0)                                  = 0x7f8e5aef9000
brk(0x7f8e5aeff000)                     = 0x7f8e5aeff000
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8e59fbb000
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8e59f3a000
brk(0x7f8e5af08000)                     = 0x7f8e5af08000
brk(0x7f8e5af0b000)                     = 0x7f8e5af0b000
brk(0x7f8e5af10000)                     = 0x7f8e5af10000
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGBUS, {0x7f8e5976351e, ~[RTMIN RT_1 RT_2], SA_RESTORER, 0x7f8e59bcb1c2}, NULL, 8) = 0
rt_sigaction(SIGFPE, {0x7f8e5976351e, ~[RTMIN RT_1 RT_2], SA_RESTORER, 0x7f8e59bcb1c2}, NULL, 8) = 0
rt_sigaction(SIGILL, {0x7f8e5976351e, ~[RTMIN RT_1 RT_2], SA_RESTORER, 0x7f8e59bcb1c2}, NULL, 8) = 0
rt_sigaction(SIGSEGV, {0x7f8e5976351e, ~[RTMIN RT_1 RT_2], SA_RESTORER, 0x7f8e59bcb1c2}, NULL, 8) = 0
brk(0x7f8e5af11000)                     = 0x7f8e5af11000
brk(0x7f8e5af12000)                     = 0x7f8e5af12000
brk(0x7f8e5af13000)                     = 0x7f8e5af13000
brk(0x7f8e5af14000)                     = 0x7f8e5af14000
brk(0x7f8e5af15000)                     = 0x7f8e5af15000
brk(0x7f8e5af16000)                     = 0x7f8e5af16000
brk(0x7f8e5af17000)                     = 0x7f8e5af17000
brk(0x7f8e5af18000)                     = 0x7f8e5af18000
brk(0x7f8e5af19000)                     = 0x7f8e5af19000
brk(0x7f8e5af1a000)                     = 0x7f8e5af1a000
brk(0x7f8e5af1b000)                     = 0x7f8e5af1b000
brk(0x7f8e5af1c000)                     = 0x7f8e5af1c000
brk(0x7f8e5af1d000)                     = 0x7f8e5af1d000
brk(0x7f8e5af1e000)                     = 0x7f8e5af1e000
brk(0x7f8e5af1f000)                     = 0x7f8e5af1f000
brk(0x7f8e5af20000)                     = 0x7f8e5af20000
brk(0x7f8e5af21000)                     = 0x7f8e5af21000
brk(0x7f8e5af22000)                     = 0x7f8e5af22000
brk(0x7f8e5af23000)                     = 0x7f8e5af23000
brk(0x7f8e5af24000)                     = 0x7f8e5af24000
brk(0x7f8e5af25000)                     = 0x7f8e5af25000
brk(0x7f8e5af26000)                     = 0x7f8e5af26000
brk(0x7f8e5af27000)                     = 0x7f8e5af27000
brk(0x7f8e5af28000)                     = 0x7f8e5af28000
brk(0x7f8e5af29000)                     = 0x7f8e5af29000
brk(0x7f8e5af2a000)                     = 0x7f8e5af2a000
brk(0x7f8e5af2b000)                     = 0x7f8e5af2b000
brk(0x7f8e5af2c000)                     = 0x7f8e5af2c000
rt_sigaction(SIGINT, {0x7f8e5976351e, ~[RTMIN RT_1 RT_2], SA_RESTORER, 0x7f8e59bcb1c2}, NULL, 8) = 0
stat("bug.scm", {st_mode=S_IFREG|0644, st_size=1176, ...}) = 0
open("/usr/local/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld-musl-x86_64.path", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("./bug.scm", O_RDONLY|O_CLOEXEC)   = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=1176, ...}) = 0
read(3, "(require-extension posix srfi-4)"..., 960) = 960
close(3)                                = 0
open("bug.scm", O_RDONLY)               = 3
readv(3, [{"", 0}, {"(require-extension posix srfi-4)"..., 1024}], 2) = 1024
stat("/usr/local/lib/chicken/8/posix.import.so", {st_mode=S_IFREG|0755, st_size=18256, ...}) = 0
stat("/usr/local/lib/chicken/8/posix.import", 0x7ffd904f0c58) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/chicken/8/posix.import.so", {st_mode=S_IFREG|0755, st_size=18256, ...}) = 0
open("/usr/local/lib/chicken/8/posix.import.so", O_RDONLY|O_CLOEXEC) = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat(4, {st_mode=S_IFREG|0755, st_size=18256, ...}) = 0
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\f\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 2113536, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x7f8e5929a000
mmap(0x7f8e5949c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x2000) = 0x7f8e5949c000
close(4)                                = 0
mprotect(0x7f8e5949c000, 4096, PROT_READ) = 0
brk(0x7f8e5af2d000)                     = 0x7f8e5af2d000
brk(0x7f8e5af2e000)                     = 0x7f8e5af2e000
brk(0x7f8e5af2f000)                     = 0x7f8e5af2f000
brk(0x7f8e5af30000)                     = 0x7f8e5af30000
stat("/usr/local/lib/chicken/8/srfi-4.import.so", {st_mode=S_IFREG|0755, st_size=18256, ...}) = 0
stat("/usr/local/lib/chicken/8/srfi-4.import", 0x7ffd90473dd8) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/chicken/8/srfi-4.import.so", {st_mode=S_IFREG|0755, st_size=18256, ...}) = 0
open("/usr/local/lib/chicken/8/srfi-4.import.so", O_RDONLY|O_CLOEXEC) = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat(4, {st_mode=S_IFREG|0755, st_size=18256, ...}) = 0
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\f\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 2113536, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x7f8e59096000
mmap(0x7f8e59298000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x2000) = 0x7f8e59298000
close(4)                                = 0
mprotect(0x7f8e59298000, 4096, PROT_READ) = 0
brk(0x7f8e5af31000)                     = 0x7f8e5af31000
brk(0x7f8e5af32000)                     = 0x7f8e5af32000
open("/usr/local/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
brk(0x7f8e5af33000)                     = 0x7f8e5af33000
brk(0x7f8e5af34000)                     = 0x7f8e5af34000
brk(0x7f8e5af35000)                     = 0x7f8e5af35000
brk(0x7f8e5af36000)                     = 0x7f8e5af36000
brk(0x7f8e5af37000)                     = 0x7f8e5af37000
brk(0x7f8e5af38000)                     = 0x7f8e5af38000
brk(0x7f8e5af39000)                     = 0x7f8e5af39000
open("/usr/local/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
getrusage(RUSAGE_SELF, {ru_utime={0, 4000}, ru_stime={0, 0}, ...}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 4000}, ru_stime={0, 0}, ...}) = 0
pipe([4, 5])                            = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
fork()                                  = 3930
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(3930, Process 3930 attached
 
[pid  3930] gettid()                    = 3930
[pid  3930] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid  3930] close(4)                    = 0
[pid  3930] brk(0x7f8e5af3a000)         = 0x7f8e5af3a000
[pid  3930] ioctl(5, TIOCGWINSZ, 0x7ffd9041c248) = -1 ENOTTY (Not a tty)
[pid  3930] getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
[pid  3930] getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
[pid  3930] writev(5, [{"hello, world\n", 13}, {NULL, 0}], 2) = 13
[pid  3930] lseek(3, -650, SEEK_CUR)    = 374
[pid  3930] exit_group(0)               = ?
[pid  3930] +++ exited with 0 +++
<... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3930
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3930, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
close(5)                                = 0
brk(0x7f8e5af3a000)                     = 0x7f8e5af3a000
readv(4, [{"", 0}, {"hello, world\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024}], 2) = 13
readv(4, [{"", 0}, {"hello, world\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024}], 2) = 0
readv(3, [{"", 0}, {"\n\n;; NOTE The following don't ne"..., 1024}], 2) = 802
readv(3, [{"", 0}, {"\n\n;; NOTE The following don't ne"..., 1024}], 2) = 0
writev(2, [{"", 0}, {"\nError", 6}], 2
Error) = 6
writev(2, [{"", 0}, {": ", 2}], 2: )      = 2
writev(2, [{"", 0}, {"(line 61) unterminated list, sta"..., 48}], 2(line 61) unterminated list, starting in line 36) = 48
writev(2, [{"", 0}, {"\n", 1}], 2
)      = 1
writev(2, [{"", 0}, {"\n\tCall history:\n", 16}], 2
	Call history:
) = 16
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##core#begin", 12}], 2##core#begin) = 12
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"display", 7}], 2display) = 7
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"\"", 1}], 2")      = 1
writev(2, [{"", 0}, {"h", 1}], 2h)       = 1
writev(2, [{"", 0}, {"e", 1}], 2e)       = 1
writev(2, [{"", 0}, {"l", 1}], 2l)       = 1
writev(2, [{"", 0}, {"l", 1}], 2l)       = 1
writev(2, [{"", 0}, {"o", 1}], 2o)       = 1
writev(2, [{"", 0}, {",", 1}], 2,)       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"w", 1}], 2w)       = 1
writev(2, [{"", 0}, {"o", 1}], 2o)       = 1
writev(2, [{"", 0}, {"r", 1}], 2r)       = 1
writev(2, [{"", 0}, {"l", 1}], 2l)       = 1
writev(2, [{"", 0}, {"d", 1}], 2d)       = 1
writev(2, [{"", 0}, {"\\", 1}], 2\)      = 1
writev(2, [{"", 0}, {"n", 1}], 2n)       = 1
writev(2, [{"", 0}, {"\"", 1}], 2")      = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"exit", 4}], 2exit)    = 4
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"0", 1}], 20)       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"display", 7}], 2display) = 7
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"\"", 1}], 2")      = 1
writev(2, [{"", 0}, {"h", 1}], 2h)       = 1
writev(2, [{"", 0}, {"e", 1}], 2e)       = 1
writev(2, [{"", 0}, {"l", 1}], 2l)       = 1
writev(2, [{"", 0}, {"l", 1}], 2l)       = 1
writev(2, [{"", 0}, {"o", 1}], 2o)       = 1
writev(2, [{"", 0}, {",", 1}], 2,)       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"w", 1}], 2w)       = 1
writev(2, [{"", 0}, {"o", 1}], 2o)       = 1
writev(2, [{"", 0}, {"r", 1}], 2r)       = 1
writev(2, [{"", 0}, {"l", 1}], 2l)       = 1
writev(2, [{"", 0}, {"d", 1}], 2d)       = 1
writev(2, [{"", 0}, {"\\", 1}], 2\)      = 1
writev(2, [{"", 0}, {"n", 1}], 2n)       = 1
writev(2, [{"", 0}, {"\"", 1}], 2")      = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"exit", 4}], 2exit)    = 4
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"0", 1}], 20)       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##core#lambda", 13}], 2##core#lambda) = 13
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"pid", 3}], 2pid)     = 3
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"ok?", 3}], 2ok?)     = 3
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"status", 6}], 2status)  = 6
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"file-close", 10}], 2file-close) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"out", 3}], 2out)     = 3
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"read-lines", 10}], 2read-lines) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-input-file*", 16}], 2open-input-file*) = 16
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##core#begin", 12}], 2##core#begin) = 12
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"file-close", 10}], 2file-close) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"out", 3}], 2out)     = 3
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"read-lines", 10}], 2read-lines) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-input-file*", 16}], 2open-input-file*) = 16
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"file-close", 10}], 2file-close) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"out", 3}], 2out)     = 3
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"read-lines", 10}], 2read-lines) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-input-file*", 16}], 2open-input-file*) = 16
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 8}], 2) = 8
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-input-file*", 16}], 2open-input-file*) = 16
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##sys#call-with-values", 22}], 2##sys#call-with-values) = 22
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##core#lambda", 13}], 2##core#lambda) = 13
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"()", 2}], 2())      = 2
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"create-pipe", 11}], 2create-pipe) = 11
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##core#lambda", 13}], 2##core#lambda) = 13
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"out", 3}], 2out)     = 3
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"receive", 7}], 2receive) = 7
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"pid", 3}], 2pid)     = 3
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"ok?", 3}], 2ok?)     = 3
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"s", 1}], 2s)       = 1
writev(2, [{"", 0}, {"...", 3}], 2...)     = 3
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"create-pipe", 11}], 2create-pipe) = 11
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##sys#call-with-values", 22}], 2##sys#call-with-values) = 22
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"##core#lambda", 13}], 2##core#lambda) = 13
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"()", 2}], 2())      = 2
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"process-wait", 12}], 2process-wait) = 12
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"process-fork", 12}], 2process-fork) = 12
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"lambda", 6}], 2lambda)  = 6
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"()", 2}], 2())      = 2
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"file-close", 10}], 2file-close) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"wi", 2}], 2wi)      = 2
writev(2, [{"", 0}, {"...", 3}], 2...)     = 3
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"process-wait", 12}], 2process-wait) = 12
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"process-fork", 12}], 2process-fork) = 12
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"lambda", 6}], 2lambda)  = 6
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"()", 2}], 2())      = 2
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"file-close", 10}], 2file-close) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"with-output-to-port", 19}], 2with-output-to-port) = 19
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-output-file*", 17}], 2open-output-file*) = 17
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"out", 3}], 2out)     = 3
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"...", 3}], 2...)     = 3
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"process-fork", 12}], 2process-fork) = 12
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"lambda", 6}], 2lambda)  = 6
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"()", 2}], 2())      = 2
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"file-close", 10}], 2file-close) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"with-output-to-port", 19}], 2with-output-to-port) = 19
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-output-file*", 17}], 2open-output-file*) = 17
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"out", 3}], 2out)     = 3
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"lambda", 6}], 2lambda)  = 6
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"()", 2}], 2())      = 2
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"di", 2}], 2di)      = 2
writev(2, [{"", 0}, {"...", 3}], 2...)     = 3
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"file-close", 10}], 2file-close) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"out", 3}], 2out)     = 3
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"read-lines", 10}], 2read-lines) = 10
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-input-file*", 16}], 2open-input-file*) = 16
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\n\t", 2}], 2
	)    = 2
writev(2, [{"", 0}, {"", 6}], 2)  = 6
writev(2, [{"", 0}, {"\t  ", 3}], 2	  )    = 3
writev(2, [{"", 0}, {"(", 1}], 2()       = 1
writev(2, [{"", 0}, {"open-input-file*", 16}], 2open-input-file*) = 16
writev(2, [{"", 0}, {" ", 1}], 2 )       = 1
writev(2, [{"", 0}, {"in", 2}], 2in)      = 2
writev(2, [{"", 0}, {")", 1}], 2))       = 1
writev(2, [{"", 0}, {"\t<--\n", 5}], 2	<--
) = 5
exit_group(70)                          = ?
+++ exited with 70 +++

Execution trace on a glibc system where the bug doesn’t occur pasted by Kooda on Fri Mar 18 13:45:01 2016

execve("/usr/local/bin/csi", ["csi", "-s", "bug.scm"], [/* 24 vars */]) = 0
brk(0)                                  = 0xe6f000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3891000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/x86_64/libchicken.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7ffd1760ee00) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/libchicken.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls", 0x7ffd1760ee00) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/x86_64/libchicken.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/x86_64", 0x7ffd1760ee00) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libchicken.so.8", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\313\7\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=4394608, ...}) = 0
mmap(NULL, 6076512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7db30a7000
mprotect(0x7f7db3416000, 2093056, PROT_NONE) = 0
mmap(0x7f7db3615000, 319488, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x36e000) = 0x7f7db3615000
mmap(0x7f7db3663000, 63584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7db3663000
close(3)                                = 0
open("/usr/local/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=107073, ...}) = 0
mmap(NULL, 107073, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7db3876000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200U\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1051056, ...}) = 0
mmap(NULL, 3146072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7db2da6000
mprotect(0x7f7db2ea6000, 2093056, PROT_NONE) = 0
mmap(0x7f7db30a5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xff000) = 0x7f7db30a5000
close(3)                                = 0
open("/usr/local/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3875000
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7db2ba2000
mprotect(0x7f7db2ba5000, 2093056, PROT_NONE) = 0
mmap(0x7f7db2da4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f7db2da4000
close(3)                                = 0
open("/usr/local/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0
mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7db27f7000
mprotect(0x7f7db2999000, 2093056, PROT_NONE) = 0
mmap(0x7f7db2b98000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f7db2b98000
mmap(0x7f7db2b9e000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7db2b9e000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3874000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3873000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3872000
arch_prctl(ARCH_SET_FS, 0x7f7db3873700) = 0
mprotect(0x7f7db2b98000, 16384, PROT_READ) = 0
mprotect(0x7f7db2da4000, 4096, PROT_READ) = 0
mprotect(0x7f7db30a5000, 4096, PROT_READ) = 0
mprotect(0x7f7db3893000, 4096, PROT_READ) = 0
munmap(0x7f7db3876000, 107073)          = 0
brk(0)                                  = 0xe6f000
brk(0xe90000)                           = 0xe90000
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3890000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\0\0\0\f\0\0\0\0"..., 4096) = 2945
lseek(3, -1863, SEEK_CUR)               = 1082
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0\r\0\0\0\0"..., 4096) = 1863
close(3)                                = 0
munmap(0x7f7db3890000, 4096)            = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db37f1000
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3770000
rt_sigaction(SIGBUS, {0x7f7db3351f5e, ~[RTMIN RT_1], SA_RESTORER, 0x7f7db282c0e0}, NULL, 8) = 0
rt_sigaction(SIGFPE, {0x7f7db3351f5e, ~[RTMIN RT_1], SA_RESTORER, 0x7f7db282c0e0}, NULL, 8) = 0
rt_sigaction(SIGILL, {0x7f7db3351f5e, ~[RTMIN RT_1], SA_RESTORER, 0x7f7db282c0e0}, NULL, 8) = 0
rt_sigaction(SIGSEGV, {0x7f7db3351f5e, ~[RTMIN RT_1], SA_RESTORER, 0x7f7db282c0e0}, NULL, 8) = 0
brk(0xeb1000)                           = 0xeb1000
rt_sigaction(SIGINT, {0x7f7db3351f5e, ~[RTMIN RT_1], SA_RESTORER, 0x7f7db282c0e0}, NULL, 8) = 0
stat("bug.scm", {st_mode=S_IFREG|0644, st_size=1176, ...}) = 0
open("/usr/local/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=107073, ...}) = 0
mmap(NULL, 107073, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7db3876000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
open("/lib/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/lib/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7ffd1760ec90)        = -1 ENOENT (No such file or directory)
open("/lib/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7ffd1760ec90)     = -1 ENOENT (No such file or directory)
open("/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7ffd1760ec90)    = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7ffd1760ec90) = -1 ENOENT (No such file or directory)
open("/usr/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=36864, ...}) = 0
munmap(0x7f7db3876000, 107073)          = 0
open("./bug.scm", O_RDONLY|O_CLOEXEC)   = 3
read(3, "(require-extension posix srfi-4)"..., 832) = 832
close(3)                                = 0
open("bug.scm", O_RDONLY)               = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1176, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db3890000
read(3, "(require-extension posix srfi-4)"..., 4096) = 1176
stat("/usr/local/lib/chicken/8/posix.import.so", {st_mode=S_IFREG|0755, st_size=16128, ...}) = 0
stat("/usr/local/lib/chicken/8/posix.import", 0x7ffd175e5ef0) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/chicken/8/posix.import.so", {st_mode=S_IFREG|0755, st_size=16128, ...}) = 0
open("/usr/local/lib/chicken/8/posix.import.so", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\f\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=16128, ...}) = 0
mmap(NULL, 2108504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f7db25f4000
mprotect(0x7f7db25f7000, 2093056, PROT_NONE) = 0
mmap(0x7f7db27f6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f7db27f6000
close(4)                                = 0
stat("/usr/local/lib/chicken/8/srfi-4.import.so", {st_mode=S_IFREG|0755, st_size=14016, ...}) = 0
stat("/usr/local/lib/chicken/8/srfi-4.import", 0x7ffd1756ca60) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/chicken/8/srfi-4.import.so", {st_mode=S_IFREG|0755, st_size=14016, ...}) = 0
open("/usr/local/lib/chicken/8/srfi-4.import.so", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\f\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=14016, ...}) = 0
mmap(NULL, 2106392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f7db23f1000
mprotect(0x7f7db23f3000, 2097152, PROT_NONE) = 0
mmap(0x7f7db25f3000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f7db25f3000
close(4)                                = 0
open("/usr/local/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=107073, ...}) = 0
mmap(NULL, 107073, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f7db3755000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7f7db3755000, 107073)          = 0
open("/usr/local/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=107073, ...}) = 0
mmap(NULL, 107073, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f7db3755000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7f7db3755000, 107073)          = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 8000}, ru_stime={0, 4000}, ...}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 8000}, ru_stime={0, 4000}, ...}) = 0
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f7db38739d0) = 3970
wait4(3970, Process 3970 attached
 
[pid  3970] close(4)                    = 0
[pid  3970] fcntl(5, F_GETFL)           = 0x1 (flags O_WRONLY)
[pid  3970] fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid  3970] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db388f000
[pid  3970] lseek(5, 0, SEEK_CUR)       = -1 ESPIPE (Illegal seek)
[pid  3970] getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
[pid  3970] getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
[pid  3970] write(5, "hello, world\n", 13) = 13
[pid  3970] exit_group(0)               = ?
[pid  3970] +++ exited with 0 +++
<... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3970
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3970, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
close(5)                                = 0
fcntl(4, F_GETFL)                       = 0 (flags O_RDONLY)
fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7db388f000
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
read(4, "hello, world\n", 4096)         = 13
read(4, "", 4096)                       = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f7db3890000, 4096)            = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 8000}, ru_stime={0, 4000}, ...}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 12000}, ru_stime={0, 4000}, ...}) = 0
exit_group(0)                           = ?
+++ exited with 0 +++

gdb trace with glibc pasted by Kooda on Fri Mar 18 15:26:32 2016

#0  lseek64 () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff64c0c65 in _IO_new_file_seekoff (fp=0x6c81f0, offset=0, dir=1, mode=3) at fileops.c:1091
#2  0x00007ffff64c2207 in _IO_new_file_attach (fp=fp@entry=0x6c81f0, fd=fd@entry=5) at fileops.c:440
#3  0x00007ffff64b69b3 in _IO_new_fdopen (fd=5, mode=<optimized out>) at iofdopen.c:162
#4  0x00007ffff72e296f in f_3893 (c=2, av=0x7ffffffcf1c0) at posixunix.c:9560
#5  0x00007ffff6f3980d in f_23704 (c=2, av=0x7ffffffcf1c0) at library.c:51610


/* k3891 in open-output-file* in k3808 in k3567 in k3467 in k3464 in k3461 in k3458 in k3455 in k3452 */
static void C_ccall f_3893(C_word c,C_word *av){
C_word tmp;
C_word t0=av[0];
C_word t1=av[1];
C_word t2;
C_word t3;
C_word *a;
if(!C_demand(C_calculate_demand(2,c,5))){C_save_and_reclaim((void *)f_3893,2,av);}
a=C_alloc(2);
t2=C_fdopen(&a,2,((C_word*)t0)[2],t1);
C_debugger(&(C_debug_info[85]),c,av);
f_3852(((C_word*)t0)[4],lf[61],((C_word*)t0)[2],C_SCHEME_FALSE,t2);}

Execution trace with glibc 2.22 added by Kooda on Fri Mar 18 21:33:10 2016

execve("/usr/local/bin/csi", ["csi", "-s", "bug.scm"], [/* 23 vars */]) = 0
brk(NULL)                               = 0x17d1000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1d00000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/x86_64/libchicken.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7ffe0c131730) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/libchicken.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls", 0x7ffe0c131730) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/x86_64/libchicken.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/x86_64", 0x7ffe0c131730) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libchicken.so.8", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\310\7\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=4332304, ...}) = 0
mmap(NULL, 6024064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f40e1522000
mprotect(0x7f40e1884000, 2097152, PROT_NONE) = 0
mmap(0x7f40e1a84000, 315392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x362000) = 0x7f40e1a84000
mmap(0x7f40e1ad1000, 64384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f40e1ad1000
close(3)                                = 0
open("/usr/local/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=44311, ...}) = 0
mmap(NULL, 44311, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f40e1cf5000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320T\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1038784, ...}) = 0
mmap(NULL, 3133704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f40e1224000
mprotect(0x7f40e1321000, 2093056, PROT_NONE) = 0
mmap(0x7f40e1520000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfc000) = 0x7f40e1520000
close(3)                                = 0
open("/usr/local/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14640, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cf4000
mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f40e1020000
mprotect(0x7f40e1022000, 2097152, PROT_NONE) = 0
mmap(0x7f40e1222000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f40e1222000
close(3)                                = 0
open("/usr/local/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\7\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1709784, ...}) = 0
mmap(NULL, 3816000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f40e0c7c000
mprotect(0x7f40e0e16000, 2097152, PROT_NONE) = 0
mmap(0x7f40e1016000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19a000) = 0x7f40e1016000
mmap(0x7f40e101c000, 14912, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f40e101c000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cf3000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cf2000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cf1000
arch_prctl(ARCH_SET_FS, 0x7f40e1cf2700) = 0
mprotect(0x7f40e1016000, 16384, PROT_READ) = 0
mprotect(0x7f40e1222000, 4096, PROT_READ) = 0
mprotect(0x7f40e1520000, 4096, PROT_READ) = 0
mprotect(0x7f40e1d02000, 4096, PROT_READ) = 0
munmap(0x7f40e1cf5000, 44311)           = 0
brk(NULL)                               = 0x17d1000
brk(0x17f2000)                          = 0x17f2000
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cff000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 127
lseek(3, -71, SEEK_CUR)                 = 56
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 71
close(3)                                = 0
munmap(0x7f40e1cff000, 4096)            = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1c70000
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1bef000
rt_sigaction(SIGBUS, {0x7f40e17c287d, ~[RTMIN RT_1], SA_RESTORER, 0x7f40e0caf500}, NULL, 8) = 0
rt_sigaction(SIGFPE, {0x7f40e17c287d, ~[RTMIN RT_1], SA_RESTORER, 0x7f40e0caf500}, NULL, 8) = 0
rt_sigaction(SIGILL, {0x7f40e17c287d, ~[RTMIN RT_1], SA_RESTORER, 0x7f40e0caf500}, NULL, 8) = 0
rt_sigaction(SIGSEGV, {0x7f40e17c287d, ~[RTMIN RT_1], SA_RESTORER, 0x7f40e0caf500}, NULL, 8) = 0
brk(0x1813000)                          = 0x1813000
rt_sigaction(SIGINT, {0x7f40e17c287d, ~[RTMIN RT_1], SA_RESTORER, 0x7f40e0caf500}, NULL, 8) = 0
stat("bug.scm", {st_mode=S_IFREG|0644, st_size=1176, ...}) = 0
open("/usr/local/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=44311, ...}) = 0
mmap(NULL, 44311, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f40e1cf5000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=32768, ...}) = 0
open("/lib/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/lib/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7ffe0c1315b0)        = -1 ENOENT (No such file or directory)
open("/lib/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7ffe0c1315b0)     = -1 ENOENT (No such file or directory)
open("/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7ffe0c1315b0)    = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7ffe0c1315b0) = -1 ENOENT (No such file or directory)
open("/usr/lib/bug.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
munmap(0x7f40e1cf5000, 44311)           = 0
open("./bug.scm", O_RDONLY|O_CLOEXEC)   = 3
read(3, "(require-extension posix srfi-4)"..., 832) = 832
close(3)                                = 0
open("bug.scm", O_RDONLY)               = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1176, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cff000
read(3, "(require-extension posix srfi-4)"..., 4096) = 1176
stat("/usr/local/lib/chicken/8/posix.import.so", {st_mode=S_IFREG|0755, st_size=16120, ...}) = 0
stat("/usr/local/lib/chicken/8/posix.import", 0x7ffe0c1097a0) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/chicken/8/posix.import.so", {st_mode=S_IFREG|0755, st_size=16120, ...}) = 0
open("/usr/local/lib/chicken/8/posix.import.so", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\f\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=16120, ...}) = 0
mmap(NULL, 2108376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f40e0a79000
mprotect(0x7f40e0a7c000, 2093056, PROT_NONE) = 0
mmap(0x7f40e0c7b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f40e0c7b000
close(4)                                = 0
stat("/usr/local/lib/chicken/8/srfi-4.import.so", {st_mode=S_IFREG|0755, st_size=14040, ...}) = 0
stat("/usr/local/lib/chicken/8/srfi-4.import", 0x7ffe0c099e80) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/chicken/8/srfi-4.import.so", {st_mode=S_IFREG|0755, st_size=14040, ...}) = 0
open("/usr/local/lib/chicken/8/srfi-4.import.so", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\f\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=14040, ...}) = 0
mmap(NULL, 2106296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f40e0876000
mprotect(0x7f40e0878000, 2097152, PROT_NONE) = 0
mmap(0x7f40e0a78000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f40e0a78000
close(4)                                = 0
open("/usr/local/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=44311, ...}) = 0
mmap(NULL, 44311, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f40e1be4000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/posix.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7f40e1be4000, 44311)           = 0
open("/usr/local/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=44311, ...}) = 0
mmap(NULL, 44311, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f40e1be4000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/srfi-4.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7f40e1be4000, 44311)           = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 12000}, ru_stime={0, 0}, ...}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 12000}, ru_stime={0, 0}, ...}) = 0
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f40e1cf29d0) = 12745
wait4(12745, strace: Process 12745 attached
 
[pid 12745] close(4)                    = 0
[pid 12745] fcntl(5, F_GETFL)           = 0x1 (flags O_WRONLY)
[pid 12745] fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid 12745] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cfe000
[pid 12745] getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
[pid 12745] getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
[pid 12745] write(5, "hello, world\n", 13) = 13
[pid 12745] lseek(3, -802, SEEK_CUR)    = 374
[pid 12745] exit_group(0)               = ?
[pid 12745] +++ exited with 0 +++
<... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 12745
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12745, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
close(5)                                = 0
fcntl(4, F_GETFL)                       = 0 (flags O_RDONLY)
fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40e1cfe000
read(4, "hello, world\n", 4096)         = 13
read(4, "", 4096)                       = 0
read(3, "\n\n;; NOTE The following don't ne"..., 4096) = 802
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f40e1cff000, 4096)            = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 12000}, ru_stime={0, 0}, ...}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 12000}, ru_stime={0, 4000}, ...}) = 0
exit_group(0)                           = ?
+++ exited with 0 +++