#100 Inotify doesn't detect any changes on a new empty folder

open
None
5
2011-12-26
2011-10-23
ddfsx
No

Latest v1.0.22.

Repro steps:
1. Create a new empty folder "TEST". ( "inotify.c info... Added watch to TEST" should appear in the console )
2. Try to copy several files at once in this folder.
3. Inotifiy is reporting nothing->folder is still empty in the database.

repro rate: 100%

Discussion

  •  ddfsx
    ddfsx
    2011-10-23

    note: seems that bug doesn't occur on the first try just after minidlna start, but 100% occurs every next time.

     
  • hiero
    hiero
    2011-11-13

    I got the cause of this issue. Inotify module removes a directory from the database, when all of the files is erased in the directory. Though this issue can be fixed not to remove the empty directory, I am not sure whether it makes any side effect.

     

  • Anonymous
    2011-12-04

    I have this exact same problem.

    I can repeat this over and over.

    I have minidlna watch a dir. But in that dir is a bunch of sym links made by mythlink.pl (http://www.mythtv.org/wiki/Mythlink.pl) it all works great until I run mythlink.pl again. One of it "features" is to remove all links and recreate them (it helps in cleaning up deleted recordings for mythtv) But when I do that. I do not see the video folder any more on my Sony SMP-N100. And I understand now why it disappears until I restart minidlna from the comment below. "I got the cause of this issue. Inotify module removes a directory from the
    database, when all of the files is erased in the directory." But the mythlink.pl does recreate the sym links. But for some reason it does not get picked up again by minidlna with out a restart (of the -R) which then does a rebuild of the files.db

    Also I noticed I think another issue, but might be my lack of understanding.

    Now if I disable inotify in the minidlna.conf and just do minidlna and if I do NOT killall minidlan then run minidlna -R it delete the files.db but does not create it if mindlna is already running. Not sure how to get minidlan to rescan/rebuild with a already running process.

    Thanks for your work on the project!

     

  • Anonymous
    2011-12-05

    I kinda of "fixed" my issue with minidlna wiping it own database when a directory changes to blank. So I did this work around....

    I created a 2 sec .mpg file called _.mpg in the root dir scanned by minidlna. This stopped the issue of inotify enable in the minidlna.conf file. When I run mythlink.pl as this would remove all sym links in the directory and minidlan would remove the video folder from my view on my Sony SMP-N100.

    Now minindlna works like a charm. I do see the file in the list (_ puts it at the bottom of the list) but I don't care I don't have to restart minidlna every time I run my Mythlink.pl script for my sym links to my .mpg files.

    Hope this helps someone else with the same issues I was having with Sony SMP-N100 and minidlna with mythlink.pl.

    FYI I turned off mythtv upnp (it does not work with the Sony SMP-N100) and seems to have other issues. They need to figure out how to work with minidlna programmers :) and integrate into mythtv then the two of them would make sweet music together. :)

    Again thanks for all the work the programmers do. Don't think it goes un-noticed. It does not.

     
  • Justin Maggard
    Justin Maggard
    2011-12-26

    • assigned_to: nobody --> jmaggard
     
  • Justin Maggard
    Justin Maggard
    2011-12-26

    I believe this might be fixed now in CVS. While trying to reproduce this, I did find a couple issues with inotify. Changes to the base-level folder were not being properly handled; and there was a caching issue with deleting-then-recreating a folder. Those are now fixed, and I'm not able to find any more issues in my testing. Please let me know if you guys still see problems.