Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006055OCamlstandard librarypublic2013-06-27 19:142015-12-11 19:23
Assigned To 
StatusclosedResolutionno change required 
PlatformOSLinux and Mac OSOS Version
Product Version4.00.1 
Target Version4.01.1+devFixed in Version 
Summary0006055: My program crashes on a call to Unix.write
DescriptionThe programs produced by patoline ( [^]) with our "Net" driver crash when used with safari.
The crash seems to occur on a call to Unix.write. It happens on each session, maybe not on the first slide. I could not give a small example.
Steps To ReproduceCompile the attached program with

ocamlfind ocamlopt -o slides_server -package "cryptokit,str" -thread -linkpkg

Then run it: ./slides_server -master master

Open firefox at localhost:8080/master
And safari/webkit at localhost:8080

Go back and forth between the slides.
After at most two or three slides, and/or a page reload in safari, the server silently crashes.
Additional InformationIn some versions of safari, the page may remain blank, due to a bug in my implementation of the old version of websockets they use. However, I believe that my program should not crash.
TagsNo tags attached.
Attached Files? file icon [^] (1,717,816 bytes) 2013-06-27 19:14

- Relationships

-  Notes
doligez (administrator)
2013-07-02 14:22
edited on: 2013-07-02 14:28

Reproduced on MacOS, but the server crash is not silent, I get this message:
  not pushed (Unix.Unix_error(Unix.EPIPE, "write", ""))

Note: I don't get the crash in the byte-code version.

doligez (administrator)
2013-07-25 09:45

Is there some hidden state in the server? At one point I had it crashing on every "back" keystroke, but then I removed Safari's cache for localhost, and now I can't make it crash at all.
gerd (reporter)
2013-07-26 01:02

EPIPE is a normal condition for a web server. Browsers sometimes reset the TCP connection to the server, and this is reported to the program as EPIPE (but ECONNRESET is also possible). Note that EPIPE implies a signal by default, hence the impression of a crash. You should set this signal to ignored (Sys.set_signal), and handle exceptions from Unix.write.
doligez (administrator)
2013-08-19 16:34

So do we agree that this is not a bug? pmeunier?
pmeunier (reporter)
2013-08-19 17:44

Yes, sorry for the noise.

- Issue History
Date Modified Username Field Change
2013-06-27 19:14 pmeunier New Issue
2013-06-27 19:14 pmeunier File Added:
2013-07-01 19:22 frisch Target Version => 4.01.0+dev
2013-07-02 14:22 doligez Note Added: 0009670
2013-07-02 14:22 doligez Status new => confirmed
2013-07-02 14:28 doligez Note Edited: 0009670 View Revisions
2013-07-25 09:45 doligez Note Added: 0009861
2013-07-25 09:45 doligez Status confirmed => feedback
2013-07-26 01:02 gerd Note Added: 0009862
2013-08-19 16:34 doligez Note Added: 0010198
2013-08-19 16:34 doligez Target Version 4.01.0+dev => 4.01.1+dev
2013-08-19 17:44 pmeunier Note Added: 0010203
2013-08-19 17:44 pmeunier Status feedback => new
2013-08-30 21:45 doligez Status new => resolved
2013-08-30 21:45 doligez Resolution open => no change required
2015-12-11 19:23 xleroy Status resolved => closed
2017-02-23 16:43 doligez Category OCaml standard library => standard library

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker