xapi-project / vhd-tool

Command-line tools for streaming and manipulating vhd format data
Other
8 stars 26 forks source link

lwt produces unhelpful backtraces #71

Open nraynaud opened 6 years ago

nraynaud commented 6 years ago

I get this backtrace from an error I'm hunting:

vhd-tool: internal error, uncaught exception:#012
          End_of_file#012
          Raised at file "src/core/lwt.ml", line 3008, characters 20-29#012
          Called from file "src/unix/lwt_main.ml", line 42, characters 8-18#012
          Called from file "src/impl.ml", line 994, characters 4-23#012
          Called from file "src/cmdliner_term.ml", line 27, characters 19-24#012
          Called from file "src/cmdliner.ml", line 27, characters 27-34#012
          Called from file "src/cmdliner.ml", line 106, characters 32-39

It leads here: https://github.com/xapi-project/vhd-tool/blob/76a543f11ea62aa2e56c4ba55c2bb898f121d2b2/src/impl.ml#L994 which is not helpful.

Is there a way to get the backtraces in the LWT thread system?

At a deeper level, is lwt useful? vhd-tool seems to be called with the command line for every transaction in xen api, it is not a heavily loaded long-lived server with any meaningful concurrency. The only concurrency I see is read vs write and it's handled by sendfile(2).