Gourmet ate my database

Help
2008-01-15
2013-05-14
  • Thomas Munn
    Thomas Munn
    2008-01-15

    My recipe database was eaten by gourmet.  I was able to go to a previous backup, but I lost 6 recipes.  I will be using html from now on.  Gourmet just segfaults when trying I double click on the reciepe card. 

    I love the project, but data instability is just something that I cannot have.  The greciepe manager was the 0.13.7 which worked fine for quite a while.

    When I exported the 'horked' database to html, ingredents were missing.  I always closed gourmet properly, as well.

    Thomas

     
    • tom
      tom
      2008-01-15

      What platform are you on? Is there a chance you could e-mail me your actual sqlite database file -- it's possible I could recover your data. Regardless of whether the data is recoverable, I'd like as much information about what happened -- obviously an error this kind is a serious bug and needs to be resolved.

       
    • Thomas Munn
      Thomas Munn
      2008-01-15

      I will send you my recipes.  Please keep them private, as I am writing a cook book....

      I have been running on several variants of linux.  The variant that had the problem was mephis running php 2.4.  I was on recipe #46.  I just saved it, and then turned off the computer.  When I double clicked on the reciepe, Gourmet just 'dies' with a segfault.  Alas, I cannot reproduce it anymore, because I tried to 'rescue' gourmet, and tried the cvs version, which doesn't even load anymore. 

      The problem repeated itself on a totally new install of the OS.  Alas, I have hopelessly horked this install of linux with attempts at 'fixing' the gourmet.  I have no idea on how to uninstall it, and have even tried the 'cvs' version.

      Where should I mail the data file? 

      Thomas

       
      • tom
        tom
        2008-01-16

        You can mail the file to me at tm hi nk le @ gmail.com (remove all spaces -- that's my pathetic attempt to protect myself from the spambots).

        The last message where you see the corrupt db file, however, does not bode well. That suggests the culprit is an underlying library and not Gourmet... that said, if you can reproduce the corruption, that would mean its something Gourmet is doing.

        The CVS version of Gourmet is under heavy development, so I wouldn't be surprised if that doesn't work too well. To completely remove Gourmet, remove any packages you installed (i.e. apt-get remove or what have you) and then remove the directories /usr/share/gourmet/ and /usr/lib/python2.X/site-packages/gourmet*). That should get rid of anything that would interfere with new installs and so forth.

         
    • Thomas Munn
      Thomas Munn
      2008-01-15

      I am currently running frugalware linux....But had the problem in mephis as well.

      Mephis is a debinan based linux.  I was running with the 13.7 version as well from sourceforge, self installed.

      Thomas

       
    • Thomas Munn
      Thomas Munn
      2008-01-15

      I managed to reproduce the problmen by uninstalling the copies of gourmet.  Here is the strace:
      oll([{fd=6, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}], 6, 0) = 0
      select(7, [6], [6], NULL, NULL)         = 1 (out [6])
      writev(6, [{"\2\0\4\0:\3\240\1\1\0\0\0\0\0\0\0\2\0\4\0008\3\240\1\1\0\0\0\0\0\0\0"..., 4096}, {";\3\5\0b\1\240\1\0\0\0\0\0\0*\0F\0\34\0", 20}], 2) = 4116
      select(7, [6], [6], NULL, NULL)         = 2 (in [6], out [6])
      read(6, "\26o\25(:\3\240\1:\3\240\0019\3\240\1\221\0005\0H\0\31\0\0\0\0\1\1\0\0\300"..., 4096) = 352
      writev(6, [{"8\3\4\0b\1\240\1\4\0\0\0\372\372\373\0B\0\5\0\377\4\240\1b\1\240\1\376\3770\0"..., 4092}, {";\3\5\0c\1\240\1\0\0\0\0\0\0c\0/\0\34\0", 20}], 2) = 4112
      select(7, [6], [6], NULL, NULL)         = 1 (out [6])
      writev(6, [{"8\3\6\0c\1\240\1\0040\0\0\377\377\377\0\17\375\377\377\331\377\377\377B\4\5\0\377\4\240\1"..., 4084}, {"B\3\5\0\377\4\240\1N\0\240\0016\0c\0m\0c\0", 20}], 2) = 4104
      select(7, [6], [6], NULL, NULL)         = 1 (out [6])
      writev(6, [{";\3\5\0N\0\240\1\0\0\0\0005\0c\0\21\0\34\0B\3\5\0\377\4\240\1N\0\240\1"..., 892}], 1) = 892
      select(7, [6], [], NULL, NULL)          = 1 (in [6])
      read(6, "\1\0\307*\3\0\0\0!\0\0\0\1\0\1\1\377\377\377\377\0\0\0\0\0\1\2\0 \0\0\0"..., 4096) = 76
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      read(6, 0x81e0e24, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
      select(7, [6], [6], NULL, NULL)         = 1 (out [6])
      writev(6, [{"\2\32\4\0\35\3\240\1\0\10\0\0}\200B\0;\3\5\0/\1\240\1\0\0\0\0\0\0\0\0"..., 4080}, {";\3\5\0\10\5\240\1\0\0\0\0\0\0\0\0H\0\31\0", 20}], 2) = 4100
      select(7, [6], [6], NULL, NULL)         = 1 (out [6])
      writev(6, [{"8\3\4\0\10\5\240\1\4\0\0\0\377\377\377\0B\0\5\0\t\5\240\1\10\5\240\1G\0\1\0"..., 4044}, {"\237\24/\0\247\0\240\1\1\0\0\0\22\0\0\0\4\0\n\0\0\0\t\0\4\0\0\0\0\0\0\0"..., 188}], 2) = 4232
      select(7, [6], [6], NULL, NULL)         = 1 (out [6])
      writev(6, [{"\237\24C\0\247\0\240\1\1\0\0\0\331\21\0\0\6\0\n\0\0\0\n\0\7\0\0\0\0\0\0\0"..., 3940}, {"\237\24\200\0\36\5\240\1\1\0\0\0V\21\0\0\v\0\v\0\0\0\v\0\v\0\0\0\0\0\0\0"..., 512}], 2) = 4452
      select(7, [6], [6], NULL, NULL)         = 1 (out [6])
      writev(6, [{"\237\24G\0\36\5\240\1\1\0\0\0H\0\0\0\10\0\10\0\377\377\10\0\n\0\0\0\0\0\0\0"..., 4080}, {";\3\5\0c\1\240\1\0\0\0\0\213\2\0\0O\0/\0", 20}], 2) = 4100
      --- SIGSEGV (Segmentation fault) @ 0 (0) ---
      +++ killed by SIGSEGV +++

       
    • Thomas Munn
      Thomas Munn
      2008-01-15

      When I try the 'run as root' thing, gourmet says I have a corrypt database....

      Thomas

       
    • Thomas Munn
      Thomas Munn
      2008-01-15

      Traceback (most recent call last):
        File "/usr/lib/python2.5/site-packages/gourmet/GourmetRecipeManager.py", line 459, in init_recipes
          self.rd = recipeManager.RecipeManager(**recipeManager.dbargs)
        File "/usr/lib/python2.5/site-packages/gourmet/backends/sqlite_db.py", line 96, in __init__
          RecData.__init__(self,filename=file)
        File "/usr/lib/python2.5/site-packages/gourmet/backends/sqlite_db.py", line 32, in __init__
          rdatabase.RecData.__init__(self)
        File "/usr/lib/python2.5/site-packages/gourmet/backends/rdatabase.py", line 177, in __init__
          self.setup_tables()
        File "/usr/lib/python2.5/site-packages/gourmet/backends/rdatabase.py", line 209, in setup_tables
          self.infoview = self._setup_table(*self.INFO_TABLE_DESC) # For storing version info...
        File "/usr/lib/python2.5/site-packages/gourmet/backends/rdatabase.py", line 350, in _setup_table
          return self.setup_table(*args,**kwargs)
        File "/usr/lib/python2.5/site-packages/gourmet/backends/sqlite_db.py", line 35, in setup_table
          name = sql_db.RecData.setup_table(self,*args,**kwargs)
        File "/usr/lib/python2.5/site-packages/gourmet/backends/sql_db.py", line 131, in setup_table
          if not self.check_for_table(name):
        File "/usr/lib/python2.5/site-packages/gourmet/backends/sqlite_db.py", line 74, in check_for_table
          self.cursor.execute('SELECT name FROM sqlite_master WHERE NAME=%s'%self.qmark,[name])
      DatabaseError: database disk image is malformed