From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 491067F0BA for ; Tue, 30 Aug 2016 06:13:42 +0200 (CEST) IronPort-PHdr: 9a23:W1pVVhwlH2JYOl3XCy+O+j09IxM/srCxBDY+r6Qd0u0UIJqq85mqBkHD//Il1AaPBtSCra4ZwLqK++C4ACpbvsbH6ChDOLV3FDY7yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9dazJHdvZhsGzkuSz4IH7YgNShTP7b6khAg+xqFDpt8QMm4ZVDyct0BLS6i9QeulM325vI1y7kBP158P295lmpXcD88k9/tJNBP2pN58zSqZVWWwr Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=pierreonf@gmail.com; spf=Pass smtp.mailfrom=pierreonf@gmail.com; spf=None smtp.helo=postmaster@mail-it0-f41.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of pierreonf@gmail.com) identity=pra; client-ip=209.85.214.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pierreonf@gmail.com"; x-sender="pierreonf@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of pierreonf@gmail.com designates 209.85.214.41 as permitted sender) identity=mailfrom; client-ip=209.85.214.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pierreonf@gmail.com"; x-sender="pierreonf@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-it0-f41.google.com) identity=helo; client-ip=209.85.214.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pierreonf@gmail.com"; x-sender="postmaster@mail-it0-f41.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DTAwC0BsVXhinWVdFcg00BAQEBAXV8B6Z0hWOGRIUJggEch1wHORMBAgEBAQEBAQEBEgEBAQgLCwkZL4IyGIIwER0BGx4DEhA3AiQBEQEFAT0aiAMBAxeeWIIHgTI+Mos8gWqCXgWGXQoZJw1UgyACBhCSLYI9HQWIJoc1iXSBOYRniQyCO40ciEiGOBMegRAfAYJ5gXMgNIcWAQEB X-IPAS-Result: A0DTAwC0BsVXhinWVdFcg00BAQEBAXV8B6Z0hWOGRIUJggEch1wHORMBAgEBAQEBAQEBEgEBAQgLCwkZL4IyGIIwER0BGx4DEhA3AiQBEQEFAT0aiAMBAxeeWIIHgTI+Mos8gWqCXgWGXQoZJw1UgyACBhCSLYI9HQWIJoc1iXSBOYRniQyCO40ciEiGOBMegRAfAYJ5gXMgNIcWAQEB X-IronPort-AV: E=Sophos;i="5.30,254,1470693600"; d="scan'208,217";a="234467507" Received: from mail-it0-f41.google.com ([209.85.214.41]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 30 Aug 2016 06:13:41 +0200 Received: by mail-it0-f41.google.com with SMTP id g62so18644526ith.1 for ; Mon, 29 Aug 2016 21:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=HnY+waLCycxiMKX4BTWw47gjPu/f8axzcFgrM5g4zcY=; b=gR1uSyTLgga3GIEdg+6CikR0v6CyavoRhWReno/iaRt8FplEhC2xiXFaZrggvTegHb NAIOtSLVIBRWjVzz13NcS4InQ5Wdnbe1H/sJ4U+zczaPUPNCxMuXymJunFHPE27Be2Qb lpKNWlQqd9lceHZUTlnXXROetR3dqWtAgnNAi8EwqpwGfJlTutTWPOqV/kSlAYgl8HZa CLJvWFLVNaGZJ7h9+GVOrExZ1Dl3tzc8pS1Kaa0BN2bxUfvARD1xm8UjpxJIZwNDZuf7 EAiymnZY3i13eGALaHYwWpo7DOu5ahDXqPhkNSTNdp0hwWyEuk0Z+gza4OPt23boZnYc XqXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HnY+waLCycxiMKX4BTWw47gjPu/f8axzcFgrM5g4zcY=; b=AkrwY4gsPE18tSE7c8lbK7bt8v9rgeVP+ibGL+NI3I46Zm82Dw16hNOsKQv3z+Rlce 2zGJR6fBxZmJJ5IkJvFe5Q8vhFxy2p9F4o02MKnk7KL8KinCRGsLZQu4i9SlR9zxHmrM T1rDD3dVPg38ir7cqDjXffEe0B7R9aUvfWgzgwywulRLpa2mFYBcrfwN+NqeT7cuVDPG YHtUzO5d5jzoFg7gwKjm4cx4K9UplV9Fkh+A1j7SCeAnL0JyOCbMj+b6/VXDA0EzYPqL /XMb4Vv9JwjEhWPiDC7ggrWX5LxIBOzxseKImkv5BxFsGdhtu+y4ik7pRlkOUEvC/eO0 chIw== X-Gm-Message-State: AE9vXwMazxm2V47tv33NTYn4+8rNQW0TxxmQjRB/GgYCz9hnIM1D1G2DSKrtbqpo2FIeAfopP575paPd/ZRA4Q== X-Received: by 10.36.163.131 with SMTP id p125mr3286623ite.23.1472530419487; Mon, 29 Aug 2016 21:13:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.122.65 with HTTP; Mon, 29 Aug 2016 21:13:39 -0700 (PDT) From: =?UTF-8?Q?Pierre_M=C3=A9tras?= Date: Tue, 30 Aug 2016 00:13:39 -0400 Message-ID: To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=94eb2c1124d0936329053b423440 Subject: [Caml-list] Testsuite fileio.ml test fails depending on stdlib location --94eb2c1124d0936329053b423440 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, I'm trying to port OCaml 4.0.3 environment to Minix3 platform. The compiler test suite is invaluable to check that everything is working correctly. Minix3 does not have native threads and the tests have to be adapted to use vmthreads only. I've been hitting a wall for a few days because the fileio.ml test was failing: ... testing 'fileio.ml': ocamlcThread 19 killed on uncaught exception Sys_blocked_io Thread 20 killed on uncaught exception Sys_blocked_io cmp: EOF on /tmp/testio30da35 The test is compiled and then run with commands, from OCaml testsuite directory: $ ../byterun/ocamlrun ../ocamlc -g -nostdlib -I ../stdlib -w a -vmthread -I ../otherlibs/threads -I ../otherlibs/unix unix.cma threads.cma -I ../testsuite/lib tests/lib-threads/fileio.ml -o program $ ../byterun/ocamlrun -b -I ../stdlib -I ../otherlibs/threads -I ../otherlibs/unix program tests/lib-threads/fileio.ml 256-byte chunks, 256-byte chunks passed 4096-byte chunks, 4096-byte chunks passed 65536-byte chunks, 65536-byte chunks passed 256-byte chunks, 4096-byte chunks passed 4096-byte chunks, 256-byte chunks passed 4096-byte chunks, 65536-byte chunks passed 263-byte chunks, 4011-byte chunks passed 613-byte chunks, 1027-byte chunks passed 0...8192 byte chunks passed line per line Thread 19 killed on uncaught exception Sys_blocked_io Raised by primitive operation at unknown location Called from file "tests/lib-threads/fileio.ml", line 68, characters 6-38 Re-raised at file "tests/lib-threads/fileio.ml", line 53, characters 4-149 Called from file "thread.ml", line 131, characters 8-14 Thread 20 killed on uncaught exception Sys_blocked_io Raised by primitive operation at file "pervasives.ml", line 415, characters 4-749 Called from file "tests/lib-threads/fileio.ml", line 68, characters 23-38 Re-raised at file "tests/lib-threads/fileio.ml", line 53, characters 4-149 Called from file "thread.ml", line 131, characters 8-14 cmp: EOF on /tmp/testio2ce820 FAILED truncated line passed Being unable to understand why it was failing, I installed OCaml on my system. Now I can compile it directly with the system compiler and run it like: $ ocamlc -g -w a -vmthread unix.cma threads.cma -I ../testsuite/lib tests/lib-threads/fileio.ml -o program $ ./program tests/lib-threads/fileio.ml 256-byte chunks, 256-byte chunks passed 4096-byte chunks, 4096-byte chunks passed 65536-byte chunks, 65536-byte chunks passed 256-byte chunks, 4096-byte chunks passed 4096-byte chunks, 256-byte chunks passed 4096-byte chunks, 65536-byte chunks passed 263-byte chunks, 4011-byte chunks passed 613-byte chunks, 1027-byte chunks passed 0...8192 byte chunks passed line per line passed truncated line passed The problem occurs when the thread is reading from the pipe and the resource returns an EAGAIN error and fails when accessed another time. I've copied the ocaml-4.0.3 directory to a Linux environment, recompiling it and running the testsuite from the freshly compiled version and I've observed the same behavior. I've found that the difference in behavior is caused by the -nostdlib -I ../stdlib flags. I don't understand why when the compiler uses the stdlib at the default system location the resulting program runs and why it generates an error if I ask the compiler to use the same stdlib file from another directory. And the program deadlocks when I compile it with: $ ../byterun/ocamlrun ../ocamlc -g -nostdlib -I /usr/local/lib/ocaml -w a -vmthread -I ../otherlibs/threads -I ../otherlibs/unix unix.cma threads.cma -I ../testsuite/lib tests/lib-threads/fileio.ml -o program Can someone share some lights on why OCaml is so sensible to stdlib location? Is there a dynamic library failing to load without reporting an error? Thanks -- Pierre M=C3=A9tras --94eb2c1124d0936329053b423440 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I'm trying to port OCaml 4.0= .3 environment to Minix3 platform. The compiler test suite is invaluable to= check that everything is working correctly. Minix3 does not have native th= reads and the tests have to be adapted to use vmthreads only. I've been= hitting a wall for a few days because the fil= eio.ml test was failing:

=C2=A0... testing 'fileio.m= l': ocamlcThread 19 killed on uncaught exception Sys_blocked_io
Thread 20 kill= ed on uncaught exception Sys_blocked_io
cmp: EOF on /tmp/testio30da35

The test is compiled and then run with c= ommands, from OCaml testsuite directory:

$ ../= byterun/ocamlrun ../ocamlc -g -nostdlib -I ../stdlib =C2=A0 -w a -vmthread = -I ../otherlibs/threads -I ../otherlibs/unix unix.cma threads.cma -I ../tes= tsuite/lib tests/lib-threads/fileio.ml -o = program
$ ..= /byterun/ocamlrun -b -I ../stdlib -I ../otherlibs/threads -I ../otherlibs/u= nix program tests/lib-threads/fileio.ml
256-byt= e chunks, 256-byte chunks
passed
4096-byte chunks, 4096-byte chunks
<= font face=3D"monospace, monospace">passed
65536-byte chunks, 65536-byte chunks<= /div>
passed
256-byte chunks, 4096-= byte chunks
passed
409= 6-byte chunks, 256-byte chunks
passed
4096-byte chunks, 65536-byte chunks
=
passed
263-byte chunks, 4011-byte chunks
passed
613-byte chunks, 10= 27-byte chunks
passed
= 0...8192 byte chunks
passed
line per line
Thread 19 killed on uncaught exception Sys_blocked_io
=
Raised by primitive ope= ration at unknown location
Called from file "tests/lib-threads/fileio.ml", line 68, characters 6-38
=
Re-raised at file "tests= /lib-threads/fileio.ml", line 53, cha= racters 4-149
Called from file "thread.ml",= line 131, characters 8-14
Thread 20 killed on uncaught exception Sys_blocked_io
Raised by primit= ive operation at file "pervasives.ml<= /a>", line 415, characters 4-749
Called from file "tests/lib-threads/fileio.ml", line 68, characters 23-38=
Re-raised at file= "tests/lib-threads/fileio.ml", = line 53, characters 4-149
Called from file "thread.m= l", line 131, characters 8-14
cmp: EOF on /tmp/testio2ce820
FAILED
truncated line
passed

Being unable to understand why it was failing= , I installed OCaml on my system. Now I can compile it directly with the sy= stem compiler and run it like:
$ ocamlc -g =C2= =A0-w a -vmthread unix.cma threads.cma -I ../testsuite/lib tests/lib-thread= s/fileio.ml -o program

$ ./program tests/lib-threads/fileio.ml
256-byte chunks, 256-byte chunks
passed
4096-byte chunks, 4096-byte chunks
<= /div>
passed
65536-byte chunks, 65536-byt= e chunks
pa= ssed
256-by= te chunks, 4096-byte chunks
passed
4096-byte chunks, 256-byte chunks
= passed
4096-byte chunks, 65536-byte chunks<= /div>
passed
263-byte chunks, 4011-= byte chunks
passed
613= -byte chunks, 1027-byte chunks
passed
0...8192 byte chunks
passed
line per line
passed
truncated line
passed
=
The problem occurs when the thread is reading from the pipe = and the resource returns an EAGAIN error and fails when accessed another ti= me.
I've copied the ocaml-4.0.3 directory to a Linux= environment, recompiling it and running the testsuite from the freshly com= piled version and I've observed the same behavior.

=
I've found that the difference in behavior is caused by the = -nostdlib -I ../stdlib flags. I don't understand why when the compiler = uses the stdlib at the default system location the resulting program runs a= nd why it generates an error if I ask the compiler to use the same stdlib f= ile from another directory.

And the program de= adlocks when I compile it with:

$ ../byterun/ocamlrun ../ocamlc -g -nostdlib -I /usr/local/lib/ocaml= -w a -vmthread -I ../otherlibs/threads -I ../otherlibs/unix unix.cma threa= ds.cma -I ../testsuite/lib tests/lib-threads/f= ileio.ml -o program

Can so= meone share some lights on why OCaml is so sensible to stdlib location? Is = there a dynamic library failing to load without reporting an error?

Thanks
--
Pierre M=C3=A9tras
--94eb2c1124d0936329053b423440--