Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-10795

Add fflush calls in random_abort and other parent/child programs

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 5
    • StorEng - Defined Pipeline

      In WT-10789, random_abort running recovery in the parent process hit a segfault. The output from the program in the log seems to be missing output from the child and the parent. The output only shows:

      [2023/03/21 00:25:07.110] Parent: Create 5 threads; sleep 13 seconds
      [2023/03/21 00:25:07.110] CONFIG: test_random_abort -m -h WT_TEST.random-abort -T 5 -t 13
      [2023/03/21 00:25:07.110] Create 5 writer threads
      [2023/03/21 00:25:07.110] Spawned 5 writer threads
      [2023/03/21 00:26:01.533] Segmentation fault (core dumped)
      

      Missing is the startup of the threads and the Kill child message from the parent process. The reason is buffered output on stdout. Looking at the files and stack from the segfault it is clear the child has been started, ran and the parent killed the child and was running recovery.

      There are only a few calls to printf in the program for user-level output. This ticket should:

      • Calls to fflush(stdout) should be added to the locations in the child and parent to flush the output.
      • The other parent/child *_abort programs should also be looked at for a similar issue and fixes made there too.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: