Skip to content

Assert failure in Lwt.fast_connect #349

Closed

Description

@domsj

Got the following error while running alba stress2 test suite:

alba: internal error, uncaught exception:
      "Assert_failure src/core/lwt.ml:511:8"
      Raised at file "src/core/lwt.ml", line 511, characters 8-20
      Called from file "camlinternalLazy.ml", line 27, characters 17-27
      Re-raised at file "camlinternalLazy.ml", line 34, characters 10-11
      Called from file "src/unix/lwt_unix.cppo.ml", line 133, characters 54-78
      Called from file "src/unix/lwt_engine.ml", line 188, characters 6-24
      Called from file "src/unix/lwt_engine.ml", line 188, characters 6-24
      Re-raised at file "src/unix/lwt_engine.ml", line 191, characters 12-15
      Called from file "src/unix/lwt_main.ml", line 41, characters 8-82
      Called from file "src/cmdliner_term.ml", line 27, characters 19-24
      Called from file "src/cmdliner.ml", line 106, characters 32-39

It looks like some internal lwt error. We use lwt 3.0.0 with the libev engine.

Activity

  1. aantron commented on May 10, 2017

    @aantron
    Collaborator

    Hmm, looks like my attempt to reply by email didn't work.

    Ouch. This very likely means a mistake in some internal assumptions made by Lwt, and a serious bug – though it could also be some kind of race condition, if you might be accidentally touching the same Lwt promise from multiple threads. I'll take a look later today or tomorrow.

    Thanks for running that stress test and for reporting this.

    The stack trace unfortunately isn't very helpful, I guess several functions that must have called fast_connect are missing due to inlining (?).

  2. aantron commented on May 10, 2017

    @aantron
    Collaborator

    ...and I don't see the potential mistake in Lwt. Have you been able to narrow it down to a small-ish example?

  3. domsj commented on May 11, 2017

    @domsj
    ContributorAuthor

    Hi @aantron,
    Thanks for looking into this quickly.

    I've tried reproducing it, but it seems like I only had this specific error once.
    The stress suite did fail with other random segfaults once in a while ... so something else is most likely wrong in alba.

    After my last change (openvstorage/alba#717 - use tail recursive List.map & friends everywhere) it seems so far that the stress suite now runs without problems, although it's too early to tell for sure. (If no errors come up in the next few hours I think the issue has been fixed...)

    Anyway I'll close this ticket as it was most likely a false alarm.

  4. aantron commented on May 11, 2017

    @aantron
    Collaborator

    Thanks for looking into it further. Please do let us know if this comes up again. We definitely don't want this type of error in the Lwt core, if that's where it came from.

    Lwt probably needs to get its own stress and/or fuzz testing, as well.

  5. aantron commented on Jun 27, 2017

    @aantron
    Collaborator

    This issue was most likely caused by a processor bug. Discussion continued from #315 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions