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

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          447d 3h 25m 1 Filipe Manana 09/Jan/11 16:14
          Filipe Manana made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 1.1 [ 12314933 ]
          Resolution Fixed [ 1 ]
          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
          Jan Lehnardt made changes -
          Fix Version/s 1.2 [ 12315198 ]
          Fix Version/s 0.12 [ 12314314 ]
          Paul Joseph Davis made changes -
          Skill Level Regular Contributors Level (Easy to Medium)
          Frank made changes -
          Attachment COUCHDB-538.patch [ 12442857 ]
          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.
          Noah Slater made changes -
          Fix Version/s 0.12 [ 12314314 ]
          Fix Version/s 0.11 [ 12313841 ]
          Adam Kocoloski made changes -
          Link This issue is related to COUCHDB-153 [ COUCHDB-153 ]
          Adam Kocoloski made changes -
          Field Original Value New Value
          Fix Version/s 0.11 [ 12313841 ]
          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.
          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
          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.
          Simon Eisenmann created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development