CouchDB
  1. CouchDB
  2. COUCHDB-538

Erlang crashing when log file cannot be written

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10
    • Fix Version/s: 1.1, 1.2
    • Component/s: Infrastructure
    • Labels:
      None
    • Environment:

      Linux Ubuntu 32bit and 64bit

    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      When couchdb cannot write to its log file erlang just crashes without any hint what is going wrong. This happens for instance if the log file directory path does not exists.

      In some older releases (0.9) it seemed to have created the missing directories automatically (if permissions are ok). 0.10 does not even try to create the directories. The log path needs to exist.

      At least a proper error message should be added to make clear that there is a problem writing the log file.

        Issue Links

          Activity

          Simon Eisenmann created issue -
          Hide
          Noah Slater added a comment -

          The directories are created as part of the "make install" command. Make sure you are running it as root, or installing into a user directory.

          Show
          Noah Slater added a comment - The directories are created as part of the "make install" command. Make sure you are running it as root, or installing into a user directory.
          Hide
          Simon Eisenmann added a comment -

          Thats true yes. But still if for whatever reason they do not exist any more or if the paths are changed in the configuration file, the user will never guess what the problem is, as there is no helping error message.

          I am not saything that it should not crash or something. Just catch the error and bail with a meaningful exception.

          Show
          Simon Eisenmann added a comment - Thats true yes. But still if for whatever reason they do not exist any more or if the paths are changed in the configuration file, the user will never guess what the problem is, as there is no helping error message. I am not saything that it should not crash or something. Just catch the error and bail with a meaningful exception.
          Hide
          Adam Kocoloski added a comment -

          Agreed – you're not the first to bring this up, and it's an easy thing to do.

          Show
          Adam Kocoloski added a comment - Agreed – you're not the first to bring this up, and it's an easy thing to do.
          Adam Kocoloski made changes -
          Field Original Value New Value
          Fix Version/s 0.11 [ 12313841 ]
          Adam Kocoloski made changes -
          Link This issue is related to COUCHDB-153 [ COUCHDB-153 ]
          Noah Slater made changes -
          Fix Version/s 0.12 [ 12314314 ]
          Fix Version/s 0.11 [ 12313841 ]
          Hide
          Frank added a comment -

          Patch description: If there is an error with opening the log file, the logger gives a reasonable error message and stops afterwards. The supervisor tries to restart a few times, but finally gives up and crashes couchdb.

          Show
          Frank added a comment - Patch description: If there is an error with opening the log file, the logger gives a reasonable error message and stops afterwards. The supervisor tries to restart a few times, but finally gives up and crashes couchdb.
          Frank made changes -
          Attachment COUCHDB-538.patch [ 12442857 ]
          Paul Joseph Davis made changes -
          Skill Level Regular Contributors Level (Easy to Medium)
          Jan Lehnardt made changes -
          Fix Version/s 1.2 [ 12315198 ]
          Fix Version/s 0.12 [ 12314314 ]
          Hide
          Filipe Manana added a comment -

          Closing this since it was fixed by COUCHDB-966

          Show
          Filipe Manana added a comment - Closing this since it was fixed by COUCHDB-966
          Filipe Manana made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 1.1 [ 12314933 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Simon Eisenmann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development